An API to locate MSBuild assemblies from an installed Visual Studio location. Use this to ensure that calling the MSBuild API will use the same toolset that a build from Visual Studio or msbuild.exe would.
Other
220
stars
83
forks
source link
Is it safe to use ExcludeAssets="runtime;contentfiles"? #89
A PackageReference to Microsoft.Build.* without ExcludeAssets="runtime" exists in your project. This will cause MSBuild assemblies to be copied to your output directory, causing your application to load them at runtime. To use the copy of MSBuild registered by MSBuildLocator, set ExcludeAssets="runtime" on the MSBuild PackageReferences. To disable this check, set the property DisableMSBuildAssemblyCopyCheck=true in your project file (not recommended as you must distributed all of MSBuild + associated toolset). Package(s) referenced: Microsoft.Build.Runtime"
It's caused by the fact that instead of specifying ExcludeAssets="runtime" I specified ExcludeAssets="runtime;contentfiles" to get rid of all the included assets as well since AFAIK they should all be present in the located MSBuild installation. The application seems to work this way well, so I just want to ask if there's any catch I'm missing or I can just ignore the error using DisableMSBuildAssemblyCopyCheck. Thanks.
Hi, when I try to compile this minimalistic project
the following build error occurs:
It's caused by the fact that instead of specifying
ExcludeAssets="runtime"
I specifiedExcludeAssets="runtime;contentfiles"
to get rid of all the included assets as well since AFAIK they should all be present in the located MSBuild installation. The application seems to work this way well, so I just want to ask if there's any catch I'm missing or I can just ignore the error usingDisableMSBuildAssemblyCopyCheck
. Thanks.