In the previous post, Use XProj/SDK project files with ASP.NET Web Apps, I describe creating a custom AfterBuild Target which would copy over the files from the standard `/bin/{configuration}/{architecture}` dll output location to the standard `/bin` webapp output location.
A coworker pointed output can be controlled with the `<OutDir>` build property. Which is way easier to use. So, here’s an updated .csproj file:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup Label="Globals"> | |
<GenerateDocumentationFile>true</GenerateDocumentationFile> | |
<NoWarn>$(NoWarn);CS1591;CA1724;CS1574</NoWarn> | |
<OutDir>$(MSBuildProjectDirectory)\bin\</OutDir> | |
</PropertyGroup> | |
<PropertyGroup> | |
<TargetFramework>net48</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.7" /> | |
<PackageReference Include="Microsoft.AspNet.TelemetryCorrelation" Version="1.0.8" /> | |
<PackageReference Include="Microsoft.AspNet.WebApi" Version="5.2.7" /> | |
<PackageReference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" Version="3.6.0" /> | |
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" /> | |
<PackageReference Include="Microsoft.Owin" Version="3.0.1" /> | |
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" /> | |
</ItemGroup> | |
<ItemGroup> | |
<Content Include="Web.Int.config"> | |
<DependentUpon>Web.config</DependentUpon> | |
</Content> | |
<Content Include="Web.QA.config"> | |
<DependentUpon>Web.config</DependentUpon> | |
</Content> | |
<Content Include="Web.Prod.config"> | |
<DependentUpon>Web.config</DependentUpon> | |
</Content> | |
</ItemGroup> | |
</Project> |
0 comments:
Post a Comment