我在VS 2017中创建了一个ASP.NET Core 2.0项目.当我发布我的项目时,Views文件夹不存在,但wwwroot文件夹是.
我可以在我的.csproj文件中设置以下内容:
<ItemGroup>
<Content Update="appsettings.json;web.config" CopyToOutputDirectory="PreserveNewest"/>
<Content Update="Views\**\*" CopyToOutputDirectory="PreserveNewest" />
<Content Update="wwwroot\**\*" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
Run Code Online (Sandbox Code Playgroud)
但没有奏效.
asp.net-core-mvc asp.net-core visual-studio-2017 asp.net-core-2.0