Is there a way to override VS project settings?
In my VS 2015 project file there is a setting:
<ItemGroup>
<None Include="..\ConnectionStrings.config">
<Link>ConnectionStrings.config</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
I was wondering if there was a way to override the "CopyToOutputDirectory" setting. This is failing in my build and short of modifying the project file I was hoping that maybe there might be a way around this...
Any thoughts?
Please sign in to leave a comment.
Hi Kevin,
Not directly, unless you have the project configured in separate files for your local and teamcity environment, which is usually bad. First of all, I would consider why the build fails with that setting and whether that should be fixed instead of being replaced.
Otherwise, you can use the File Content Replacer build feature. It will run after the files have been pulled from source control, replace your defined text in it just for the build, and then leave them back as they were originally once the build finishes: https://confluence.jetbrains.com/display/TCD18/File+Content+Replacer