msbuild-projectreference

MSBuild ProjectReference:private (“Copy Local”) - what are the allowed values and behaviour?

拈花ヽ惹草 提交于 2020-02-17 08:04:11
问题 TL;DR Is there any official documentation that describes in detail how the <private> / "Copy Local" option works with MSBuild ? And what values are supposed to go into it? When you add a project reference from one project in Visual Studio to another, it will add a <ProjectReference Include=".....csproj"> to the .csproj MSBuild file. When you add a file reference from one project in Visual Studio to an assembly file in the file system, it will add a <Reference Include="Foo"> <HintPath>....Foo

Configuration for ProjectReference in MSBuild

泪湿孤枕 提交于 2020-01-01 09:12:22
问题 Is it possible to set the configuration of ProjectReference in MSBuild? Scenario: I have a build script (web deploy) that has a number of configurations where the only difference has to do with how they are deployed and not the build it self. I would hate to have to maintain configurations for my solution/projects that are build as a part of the deploy process just because I need those configurations for deployment. Any way I can accomplish this? 回答1: Another possible method of setting

Configuration for ProjectReference in MSBuild

a 夏天 提交于 2020-01-01 09:12:11
问题 Is it possible to set the configuration of ProjectReference in MSBuild? Scenario: I have a build script (web deploy) that has a number of configurations where the only difference has to do with how they are deployed and not the build it self. I would hate to have to maintain configurations for my solution/projects that are build as a part of the deploy process just because I need those configurations for deployment. Any way I can accomplish this? 回答1: Another possible method of setting

Assembly in GAC is not copied to output in project that references a project that references the GAC assembly with CopyLocal=true

不想你离开。 提交于 2019-12-18 19:10:25
问题 I have a "Project A" that references System.Web.Mvc with CopyLocal=TRue. System.Web.Mvc is in the GAC both on my local maching and on the buildserver. I also have a "Project B" that references "Project A" in the output for "Project B" System.Web.Mvc is not copied to during the build. I suspect that this is because it is in the GAC. Is this true? And can I do something to make MSBuild copy it to the output folder? I read the answer from Muse VsExtensions in this thread, which talks about only

Conditional reference in Visual Studio Community 2017

我怕爱的太早我们不能终老 提交于 2019-12-10 01:45:45
问题 I am creating a multi-platform application. I have a multi-targeted shared library (targeting .netstandard 2.0 and .net 4.5)...See project file: <PropertyGroup> <TargetFrameworks>netstandard2.0;net45</TargetFrameworks> </PropertyGroup> When I build the project in visual studio 2017 on windows, I get two directories in the output (netstandard2.0, net45) and the corresponding dlls. The build is a success. When I build the exact same project (same code) in visual studio 2017 on a mac, I get

Conditional reference in Visual Studio Community 2017

青春壹個敷衍的年華 提交于 2019-12-05 00:58:25
I am creating a multi-platform application. I have a multi-targeted shared library (targeting .netstandard 2.0 and .net 4.5)...See project file: <PropertyGroup> <TargetFrameworks>netstandard2.0;net45</TargetFrameworks> </PropertyGroup> When I build the project in visual studio 2017 on windows, I get two directories in the output (netstandard2.0, net45) and the corresponding dlls. The build is a success. When I build the exact same project (same code) in visual studio 2017 on a mac, I get errors of this nature: The type 'OptionAttribute' exists in both 'CommandLine.DotNetStandard, Version=1.0

Configuration for ProjectReference in MSBuild

时光总嘲笑我的痴心妄想 提交于 2019-12-04 05:08:30
Is it possible to set the configuration of ProjectReference in MSBuild? Scenario: I have a build script (web deploy) that has a number of configurations where the only difference has to do with how they are deployed and not the build it self. I would hate to have to maintain configurations for my solution/projects that are build as a part of the deploy process just because I need those configurations for deployment. Any way I can accomplish this? Another possible method of setting ProjectReference configuration and platform is to use a property picked up the MSBuild's reference handling code

Assembly in GAC is not copied to output in project that references a project that references the GAC assembly with CopyLocal=true

北城余情 提交于 2019-11-30 17:42:44
I have a "Project A" that references System.Web.Mvc with CopyLocal=TRue. System.Web.Mvc is in the GAC both on my local maching and on the buildserver. I also have a "Project B" that references "Project A" in the output for "Project B" System.Web.Mvc is not copied to during the build. I suspect that this is because it is in the GAC. Is this true? And can I do something to make MSBuild copy it to the output folder? I read the answer from Muse VsExtensions in this thread, which talks about only the direct reference to the GAC, however we have an indirect reference through "Project A": .NET