Skip to content

Instantly share code, notes, and snippets.

@jdaigle
Last active September 29, 2019 17:11
Show Gist options
  • Save jdaigle/32b3584150f46f006c90888653955264 to your computer and use it in GitHub Desktop.
Save jdaigle/32b3584150f46f006c90888653955264 to your computer and use it in GitHub Desktop.
Web App csproj for .NET Core
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<DebugSymbols>true</DebugSymbols>
<DebugType>embedded</DebugType>
<RazorCompileOnBuild>true</RazorCompileOnBuild>
<RazorTargetName>$(MvcRazorOuputPath)$(MSBuildProjectName).PrecompiledViews</RazorTargetName>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<OutDir>bin\</OutDir>
<PublishDir>$(OutDir)\publish</PublishDir>
</PropertyGroup>
<Target Name="WriteAppOffline" BeforeTargets="BeforeBuild;BeforeClean">
<WriteLinesToFile Lines="Building..." File="app_offline.htm" />
</Target>
<Target Name="RemoveAppOffline" BeforeTargets="AfterBuild;AfterClean">
<Delete Files="app_offline.htm" />
</Target>
</Project>
@jdaigle
Copy link
Author

jdaigle commented Sep 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment