Hi there!
I am using a trick I learned from
@jfroma's blog, for automatically downloading missing nuget packages, so that I could keep the binaries out of the source control. This requires adding a custom BeforeBuild action in the csproj file:
Code:
<Target Name="BeforeBuild">
<Exec Condition="Exists('$(ProjectDir)packages.config')"
Command=""$(SolutionDir)Tools\nuget.exe" install "$(ProjectDir)packages.config" -o "$(SolutionDir)Packages"" />
</Target>
Unfortunately, it seems that NCrunch tries to execute this action even when I set in the configuration that Before/After build events for this projects should be disabled.
Since NCrunch copies the project to another location, the paths are no longer correct, and I get the following error:
Quote: (89): The command ""C:\Users\<my username>\AppData\Local\NCrunch\7872\280\tools\nuget.exe" install "C:\Users\<my username>\AppData\Local\NCrunch\7872\280\<my project>\packages.config" -o "C:\Users\<my username>\AppData\Local\NCrunch\7872\280\Packages"" exited with code 3.
I must temporary comment out the BeforeBuild target in my csproj file to make this work.
Please help :)
Thanks!