I have an ASP.NET Core application. In project.jsonI have a publish option configured as below
"publishOptions": {
"include": [
"wwwroot",
"**/*.cshtml",
"appsettings.json",
"appsettings.development.json",
"appsettings.staging.json",
"appsettings.production.json",
"web.config"
]
},
I am using the default project template created vs 2015 for asp.net core web projects. Thus, all files .cshtmlare in the folder Views.
when i execute the command dotnet publish -c Developmentdotnet publishes Views to
C: \ MySolutionDir \ Src \ MyUIProjectDir \ Bin \ Development \ netcoreapp1.0 \ publish \ Views
then I will repeat the same command. This time cshtml files already exist in bin\Development\netcoreapp1.0\publish\Views, so this time the publish command additionally creates the following folder structure
C: \ MySolutionDir \ Src \ MyUIProjectDir \ Bin \ Development \ netcoreapp1.0 \ publish \ Bin \ Development \ netcoreapp1.0 \ publish \ Views
,
C:\MySolutionDir\Src\MyUIProjectDir\Bin\\netcoreapp1.0\\Bin\Development\netcoreapp1.0\\Bin\\netcoreapp1.0\\Views
.cshtml "MyUIProjectDir" "".
,
C:\MySolutionDir\Src\MyUIProjectDir\bin\Staging
C:\MySolutionDir\Src\MyUIProjectDir\bin\Production
publish cshtml "Staging" "Production" .
, publish cshtml "MyUIProjectDir\Views" ( bin).