I've recently installed Update 3 of Visual Studio 2015 and also the .NET Compiler Platform SDK v1.3.0.60420 from
https://visualstudiogallery.msdn.microsoft.com/2ddb7240-5249-4c8c-969e-5d05823bcb89 (which seems to be required to get the Analyzer and Code Fix templates).
If I create a brand new "Analyzer with Code Fix (NuGet+ VISX)" project, NCrunch is unable to build the analyzer project (which in turn stops the test project that the template also creates from building). The project's status in the
NCrunch Tests window is 'Build failure' and it reports this error:
Quote:NCrunch: If you are experiencing problems in getting this project to build, have a look at
http://www.ncrunch.net/d...ng_project-build-issues
The system cannot find the path specified.
The command ""C:\Users\Ian\AppData\Local\NCrunch\14232\1\packages\NuGet.CommandLine.2.8.5\tools\NuGet.exe" pack Diagnostic.nuspec -NoPackageAnalysis -Version 1.0.6031.11810 -OutputDirectory ." exited with code 3.
I've seen this on both of the two machines I've tried it on. I'm running NCrunch 2.23.0.2
I was able to work around this by adding
packages\NuGet.CommandLine\2.8.5\**.* in the solution's
Additional Files To Include, but I'm not sure this should be necessary - the relevant file seems to be used from an
AfterBuild target:
Code:
<Target Name="AfterBuild">
<GetAssemblyIdentity AssemblyFiles="$(OutDir)\$(AssemblyName).dll">
<Output TaskParameter="Assemblies" ItemName="AnalyzerAssemblyInfo" />
</GetAssemblyIdentity>
<Exec Command=""$(SolutionDir)packages\NuGet.CommandLine.2.8.5\tools\NuGet.exe" pack Diagnostic.nuspec -NoPackageAnalysis -Version %(AnalyzerAssemblyInfo.Version) -OutputDirectory ."
WorkingDirectory="$(OutDir)" LogStandardErrorAsError="true" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
</Exec>
</Target>
In my NCrunch configuration for the project,
Run post-build events is disabled. So why is it even attempting to run this step? I'm fairly sure this isn't something I'd actually want as part of NCrunch's build. (I think it's there to ensure that any NuGet packaging problems get reported as a build error, which you want when building the project normally, but I think it's just going to slow things down unnecessarily for NCrunch.)