Skip to content

Commit e5cc7cd

Browse files
committed
Workaround for WebSPA publish issue
Due to aspnet/websdk dotnet-architecture#114, dotnet publish only copies to the output directory files which existed before the command was run.
1 parent ed87b6b commit e5cc7cd

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/Web/WebSPA/WebSPA.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@
7878
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.0-msbuild3-final" />
7979
</ItemGroup>
8080

81+
<!-- workaround for https://github.com/aspnet/websdk/issues/114 -->
82+
<Target Name="AddGeneratedContentItems" BeforeTargets="AssignTargetPaths" DependsOnTargets="PrepareForPublish">
83+
<ItemGroup>
84+
<Content Include="wwwroot/**" CopyToPublishDirectory="PreserveNewest" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);@(Content)" />
85+
</ItemGroup>
86+
</Target>
87+
8188
<ItemGroup>
8289
<None Update="Dockerfile">
8390
<CopyToOutputDirectory>Always</CopyToOutputDirectory>

0 commit comments

Comments
 (0)