Just installed NCrunch to give it a try. But encountering a build problem:
In a solution of 61 projects this is the error for one assembly that pops up:
--
NCrunch: If you are experiencing problems in getting this project to build, have a look at https://www.ncrunch.net/documentation/troubleshooting_project-build-issues
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamTest\Microsoft.TeamTest.targets (14)#1: Could not load file or assembly 'Haddock.Business.Product, Version=2.9.0.7591, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
--
It seems to be saying this for the unittest-project that references all the other projects in the solution.
This means that the UnitTest project is unable to build.
NCrunch also mentions:
--
This component makes use of MS Test private method accessors, which require referenced assemblies to be copied to the component build output directory. This will have an impact on the performance of NCrunch, as extra work must be done to rebuild this component every time one of its dependencies changes.
--
We have actually "solved" this issue by configuration of NCrunch to switch the copy local attribute for ALL projects in the solution. Problem with this is that it takes NCrunch to a halt, it is far too slow.
Other interesting things that might be of interest:
- All csproj files are in its own subfolder, solution is in the main folder.
- Within the csproj files, we have deliberately inluded a small XML files which states what the SHARED output folder is like this:
I wish I could give you a better solution than needing to enable the 'Copy referenced assemblies to workspace' option (which you've already discovered), but unfortunately there is a very solid technical limitation around the way that MSTest accessors work during the build process. The build step required for the MSTest private method accessors physically requires referenced assemblies to exist in the same output directory as the test assembly. This constraint means that NCrunch isn't able to perform build optimisations as the test project must be rebuilt for any change further down the dependency tree.
So I'm afraid the only other option I can give you is to stop using MSTest accessors.
I wish I could give you a better solution than needing to enable the 'Copy referenced assemblies to workspace' option (which you've already discovered), but unfortunately there is a very solid technical limitation around the way that MSTest accessors work during the build process. The build step required for the MSTest private method accessors physically requires referenced assemblies to exist in the same output directory as the test assembly. This constraint means that NCrunch isn't able to perform build optimisations as the test project must be rebuilt for any change further down the dependency tree.
So I'm afraid the only other option I can give you is to stop using MSTest accessors.
Cheers,
Remco
Not sure if I understand the problem. Actually, we are already letting Visual Studio output all binaries to the same output directory, so why would this problem be there for our case? All the projects have the sharedconfig.xml included so are outputed to the same output folder, right?
Also, personally I am not sure what MSTest private accessors are at the moment (but will look that up)
I wish I could give you a better solution than needing to enable the 'Copy referenced assemblies to workspace' option (which you've already discovered), but unfortunately there is a very solid technical limitation around the way that MSTest accessors work during the build process. The build step required for the MSTest private method accessors physically requires referenced assemblies to exist in the same output directory as the test assembly. This constraint means that NCrunch isn't able to perform build optimisations as the test project must be rebuilt for any change further down the dependency tree.
So I'm afraid the only other option I can give you is to stop using MSTest accessors.
Cheers,
Remco
Hi Remco! Ok we removed the MSTest private accessor, it indeed existed for the haddock.business.product project.
Now the unittest project is building but gives the following exception:
--
NCrunch: If you are experiencing problems in getting this project to build, have a look at https://www.ncrunch.net/documentation/troubleshooting_project-build-issues
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamTest\Microsoft.TeamTest.targets (14)#1: The "BuildShadowTask" task failed unexpectedly.
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.VisualStudio.TestTools.BuildShadowReferences.BuildShadowTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)
--
I wish I could give you a better solution than needing to enable the 'Copy referenced assemblies to workspace' option (which you've already discovered), but unfortunately there is a very solid technical limitation around the way that MSTest accessors work during the build process. The build step required for the MSTest private method accessors physically requires referenced assemblies to exist in the same output directory as the test assembly. This constraint means that NCrunch isn't able to perform build optimisations as the test project must be rebuilt for any change further down the dependency tree.
So I'm afraid the only other option I can give you is to stop using MSTest accessors.
Cheers,
Remco
Hi Remco! Ok we removed the MSTest private accessor, it indeed existed for the haddock.business.product project.
Now the unittest project is building but gives the following exception:
--
NCrunch: If you are experiencing problems in getting this project to build, have a look at https://www.ncrunch.net/documentation/troubleshooting_project-build-issues
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamTest\Microsoft.TeamTest.targets (14)#1: The "BuildShadowTask" task failed unexpectedly.
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.VisualStudio.TestTools.BuildShadowReferences.BuildShadowTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)
--
What would this mean?
Ok: sorry, had to remove the Private Accessor from the solution as well, and now NCrunch is happily zooming... will give some more feedback later..