Missing Master Pages in Project Web Deployment Release

We seem to have a problem when launching our deployment project, that when compiling it seems to skip our master pages from the output.

Is there a way to “force” a project to include .master files, either by editing the .wdproj file, or using another method?

In addition, I read the MSBuildTasks community in the project and followed some of the sample documentation , but this does not work. The project will not exclude the files that I select, and does not seem to do compression. Has anyone else tried this extension that can provide feedback / guidance?

Thank you very much in advance

Update:

I fixed this by creating a group of elements and making a copy.

<ItemGroup>
  <MasterFiles Include="$(SolutionDir)\MVC\Views\Shared\Templates\**\*.master" />
</ItemGroup>

<Target Name="AfterBuild">
  <Copy SourceFiles="@(MasterFiles)" DestinationFiles="$(OutputPath)\Views\Shared\Templates\%(RecursiveDir)%(Filename)%(Extension)" />
</Target>
+3
3

, -, , , - . .wdproj. , .

.wdproj, MSBuild. , ExcludeFromBuild. , , , , :

<ItemGroup>
    <ExcludeFromBuild Include="$(SourceWebPhysicalPath)*.csproj"/>
    <!-- Below excludes svn folders -->
    <ExcludeFromBuild Include="$(SourceWebPhysicalPath)**\.svn\**\*"/>
</ItemGroup>

: Microsoft Build Engine: MSBuild Team Foundation Build

+2

, .

<ItemGroup>
  <MasterFiles Include="$(SolutionDir)\MVC\Views\Shared\Templates\**\*.master" />
</ItemGroup>

<Target Name="AfterBuild">
  <Copy SourceFiles="@(MasterFiles)" DestinationFiles="$(OutputPath)\Views\Shared\Templates\%(RecursiveDir)%(Filename)%(Extension)" />
</Target>

0

Whether you are using a "web deployment project", if so, you can include "Primary Output" and "Content Files" or specifically include a .master file.

-1
source

Source: https://habr.com/ru/post/1710834/


All Articles