Rank: Member
Groups: Registered
Joined: 9/1/2012(UTC) Posts: 12
Thanks: 3 times Was thanked: 4 time(s) in 4 post(s)
|
Hello, I am currently using the StrongNameSigner tool, a NuGet package which doesn't add any references, but injects a tool into the build process which automatically applies a strong name signature to any assemblies without one, given that I still strong name all my own assemblies but this is making it a nightmare trying to work with third party libraries that aren't strong named. The use of this package has been working well for me for the last week or so. Next I started adding tests for some of the assemblies which reference this package (either directly or indirectly via another reference) and more often than not, NCrunch will fail to build the project, printing out errors similar to the following (mostly the former, only occasionally the latter) Code:
..\..\..\..\..\packages\Brutal.Dev.StrongNameSigner.2.7.1\build\Brutal.Dev.StrongNameSigner.targets (6, 5): FileNotFoundException: Could not load file or assembly 'Mono.Cecil,
Version=0.11.1.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e' or one of its dependencies. The system cannot find the file specified.
at Brutal.Dev.StrongNameSigner.SigningHelper.GetAssemblyInfo(String assemblyPath, String[] probingPaths)
at Brutal.Dev.StrongNameSigner.AutomaticBuildTask.Execute()
or Code:
System.Exception: An exception was thrown in the remote environment: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. --->
nCrunch.Common.UserException: Errors occurred while trying to load the project file:
FileNotFoundException: Could not load file or assembly 'Mono.Cecil, Version=0.11.1.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e' or one of its dependencies.
The system cannot find the file specified.
at Brutal.Dev.StrongNameSigner.SigningHelper.GetAssemblyInfo(String assemblyPath, String[] probingPaths)
at Brutal.Dev.StrongNameSigner.AutomaticBuildTask.Execute()
at nCrunch.Compiler.ComponentAnalysisContext.()
at nCrunch.Compiler.ComponentAnalysisContext.AnalyseComponentBuild()
at nCrunch.Compiler.RemoteBuildRunner.AnalyseComponentBuild(ComponentLoadParameters parameters)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.(CallMethodMessage )
at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.ProcessMessageReturningResult(Byte[] data)
at nCrunch.TaskRunner.Ipc.RemoteInstance.(Byte[] )
at nCrunch.TaskRunner.Ipc.RemoteInstance.Invoke(IMessage msg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at nCrunch.Compiler.IRemoteBuildRunner.AnalyseComponentBuild(ComponentLoadParameters parameters)
at nCrunch.Core.BuildManagement.BuildProcessLauncher..(IRemoteBuildRunner )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , FilePath , String , ExternalProcess )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , EffectiveProcessorArchitecture , GridClientId , BuildSystemParameters , IList`1 , Nullable`1 , GridAddress )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.AnalyseComponentBuildInExternalProcess(ComponentLoadParameters parameters, IList`1 customEnvironmentVariables)
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.(EffectiveProcessorArchitecture , String )
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.CreateComponentFromXml(FilePath projectFilePath, ParsedBuildXml projectXml, FilePath solutionFilePath,
String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile, VisualStudioVersion vsVersion, ComponentUniqueName componentName, TaskSettings componentTaskSettings,
Exception parseException, String targetFramework)
..\..\..\..\..\packages\Brutal.Dev.StrongNameSigner.2.7.1\build\Brutal.Dev.StrongNameSigner.targets (6, 5): FileNotFoundException: Could not load file or assembly
'Mono.Cecil, Version=0.11.1.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e' or one of its dependencies. The system cannot find the file specified.
at Brutal.Dev.StrongNameSigner.SigningHelper.GetAssemblyInfo(String assemblyPath, String[] probingPaths)
at Brutal.Dev.StrongNameSigner.AutomaticBuildTask.Execute()
I have already tried setting the "Copy referenced assemblies to workspace" option to "True" for affected projects but as expected it had no effect as this package never adds any references. On browsing to the NCrunch working directory for a failing project, I could see that the "packages" folder had been generated but only 3 of the StrongNameSigner files were present and there should have been quite a few more (including Mono.Cecil). I'm not entirely sure if the problem is with NCrunch or this NuGet package I'm using, any suggestions?
|