Given aspnet project with folders:
/
/sql
/WebApp
/Client
/wwwroot
/Views
On project.json I used
"publishOptions": {
"include": [
"..\sql",
"wwwroot",
"Views",
"web.config"
]
}
And after dotnet publish
there was sql
, wwwroot
and Views
folders.
After migration to csproj (Microsoft.NET.Sdk.Web), I got
<None Update="..sql***;wwwroot***;Views***">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</None>
After msbuild15 /t:publish
(cli not works for me) there is wwwroot
, Views
AND Client
with only json
files inside. Files from sql
copied but flattened.
I also try to change it to:
<Content Include="..sql**" CopyToPublishDirectory="PreserveNewest" />
<Content Remove="Client*" CopyToPublishDirectory="Never" />
and got same output.
How to remove Client
and preserve folder structure for sql
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…