Morteza Jangjoo
Morteza Jangjoo

Reputation: 1790

how to publish .net core project in visual studio include View and area Folders

i have problem after publish my Project(.net core 2.2) in visual studio 2019

after publish no exist View Folder and Area Folder in Published Files. how to publish my project include view and area folders?

Upvotes: 2

Views: 373

Answers (1)

Peter Lakatus
Peter Lakatus

Reputation: 46

edit your.csproj file and add PreserveCompilationContext as true and MvcRazorCompileOnPublish as false

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
</PropertyGroup>

then views will be included in publish

Upvotes: 2

Related Questions