Hi I've got a CSPROJ with CopyLocal set to true for two reference assemblies and set to false for all others. When NCrunch creates its workspace version of the CSPROJ it removes all the <Private>false</Private> and <Private>true</Private> elements from the References, causing my build to fail. I'm using the assemblies that have been set to be locally copied to build a list of assemblies that are going to be merged into the main assembly. So when NCrunch messes up the copy settings the build fails. Editing the workspace CSPROJ to include the <Private> tags immediately fixes the problem but of course every time NCrunch creates a new workspace it will remove them.
Does anyone know of any workarounds for this problem?
Build/Test Issues
NCrunch does not honor CopyLocal settings in project file.
Started by jimitndiaye on 5,062 views
Remco NCrunch Developer
#4182
27 May 2013 11:30 UTC
Hi,
Thanks for sharing this issue. NCrunch currently doesn't acknowledge the Private properties as assigned to reference elements in the build script - I'll make a note to include a future fix for this.
I can't think of any workaround that will prevent NCrunch from removing these properties from the script, so I think the best option may be to look at other ways of the solving the problem (i.e. making sure the right files get copied). Would it be possible to rig up a post-build event that automatically deletes any of the files you don't want to have in the build output directory? If you set the Copy referenced assemblies to workspace setting to TRUE for the project in question, NCrunch will by default copy ALL referenced assemblies into the output directory, and you can then delete the ones you don't want to include in the merge process by using the post-build event.
Thanks for sharing this issue. NCrunch currently doesn't acknowledge the Private properties as assigned to reference elements in the build script - I'll make a note to include a future fix for this.
I can't think of any workaround that will prevent NCrunch from removing these properties from the script, so I think the best option may be to look at other ways of the solving the problem (i.e. making sure the right files get copied). Would it be possible to rig up a post-build event that automatically deletes any of the files you don't want to have in the build output directory? If you set the Copy referenced assemblies to workspace setting to TRUE for the project in question, NCrunch will by default copy ALL referenced assemblies into the output directory, and you can then delete the ones you don't want to include in the merge process by using the post-build event.
Post a reply
Log in to reply.