If you look at Microsoft.Bcl.Build.targets , it has many project configuration goals, for example:
EnsureBindingRedirects - identify which EnsureBindingRedirects links to redirect bindings, and update app.config with themBclBuildValidateNugetPackageReferences - this goal verifies that all Nuget packages installed in the current project also have their dependencies (transitive dependencies) installed in the current project.
Based on this assessment, I decided that this functionality is necessary only in the development environment when adding / removing / updating NuGet dependencies; and that it can be ignored in a CI environment where it causes problems.
Therefore, I want to keep the dependency in my * .csproj files, but ignore it when starting the CI build. I did this by adding conditional imports to the build environment's targets file (e.g. builder.targets), which includes this block:
<PropertyGroup> <BclBuildImported>Ignore</BclBuildImported> </PropertyGroup>
This causes targets to be ignored in the CI environment, but activated in the development environment. It works for me for more than a week, and no problems so far ...
I would still like to know if anyone has the best information about this package, which indicates that doing this is a bad idea. So far, I think this is a good idea.
Edit 2018-02-01:
Note that the ignore parameter can also be passed on the command line to skip the logic of Microsoft.Bcl.Build.targets :
msbuild (targets, etc) /p:BclBuildImported=Ignore
crimbo Apr 11 '14 at 23:43 2014-04-11 23:43
source share