Skip to content

Commit f48a503

Browse files
committed
Fix issue error when building the SPA app from the CLI dotnet-architecture#164
1 parent 9e17d9c commit f48a503

2 files changed

Lines changed: 7 additions & 14 deletions

File tree

eShopOnContainers-ServicesAndWebApps.sln

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,10 @@ EndProject
3939
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.Infrastructure", "src\Services\Ordering\Ordering.Infrastructure\Ordering.Infrastructure.csproj", "{95F1F07C-4D92-4742-BD07-E5B805AAB651}"
4040
EndProject
4141
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTest", "test\Services\UnitTest\UnitTest.csproj", "{7796F5D8-31FC-45A4-B673-19DE5BA194CF}"
42-
ProjectSection(ProjectDependencies) = postProject
43-
{A579E108-5445-403D-A407-339AC4D1611B} = {A579E108-5445-403D-A407-339AC4D1611B}
44-
{F16E3C6A-1C94-4EAB-BE91-099618060B68} = {F16E3C6A-1C94-4EAB-BE91-099618060B68}
45-
EndProjectSection
4642
EndProject
4743
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Identity.API", "src\Services\Identity\Identity.API\Identity.API.csproj", "{A579E108-5445-403D-A407-339AC4D1611B}"
4844
EndProject
4945
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{FEA0C318-FFED-4D39-8781-265718CA43DD}"
50-
ProjectSection(ProjectDependencies) = postProject
51-
{A579E108-5445-403D-A407-339AC4D1611B} = {A579E108-5445-403D-A407-339AC4D1611B}
52-
{5B810E3D-112E-4857-B197-F09D2FD41E27} = {5B810E3D-112E-4857-B197-F09D2FD41E27}
53-
{F16E3C6A-1C94-4EAB-BE91-099618060B68} = {F16E3C6A-1C94-4EAB-BE91-099618060B68}
54-
{F0333D8E-0B27-42B7-B2C6-78F3657624E2} = {F0333D8E-0B27-42B7-B2C6-78F3657624E2}
55-
{42681D9D-750A-4DF7-BD9F-9292CFD5C253} = {42681D9D-750A-4DF7-BD9F-9292CFD5C253}
56-
{2110CBB0-3B38-4EE4-A743-DF6968D80D90} = {2110CBB0-3B38-4EE4-A743-DF6968D80D90}
57-
{CFE2FACB-4538-4B99-8A10-306F3882952D} = {CFE2FACB-4538-4B99-8A10-306F3882952D}
58-
{231226CE-690B-4979-8870-9A79D80928E2} = {231226CE-690B-4979-8870-9A79D80928E2}
59-
EndProjectSection
6046
EndProject
6147
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebSPA", "src\Web\WebSPA\WebSPA.csproj", "{F16E3C6A-1C94-4EAB-BE91-099618060B68}"
6248
EndProject

src/Web/WebSPA/WebSPA.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
1414
<TypeScriptCompileOnSaveEnabled>false</TypeScriptCompileOnSaveEnabled>
1515
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
16+
<GeneratedItemPatterns>wwwroot/dist/**</GeneratedItemPatterns>
17+
<DefaultItemExcludes>$(DefaultItemExcludes);$(GeneratedItemPatterns)</DefaultItemExcludes>
1618
</PropertyGroup>
1719

1820
<ItemGroup>
@@ -67,9 +69,14 @@
6769
<PackageReference Include="Microsoft.Extensions.Options" Version="1.1.0" />
6870
</ItemGroup>
6971

72+
<!-- workaround for https://github.com/aspnet/websdk/issues/114 -->
7073
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
7174
<Exec Command="npm install" />
7275
<Exec Command="npm run build:prod" />
76+
<ItemGroup>
77+
<_GeneratedFiles Include="$(GeneratedItemPatterns)" />
78+
<ContentWithTargetPath Include="@(_GeneratedFiles)" TargetPath="%(Identity)" CopyToPublishDirectory="PreserveNewest" />
79+
</ItemGroup>
7380
</Target>
7481

7582
<ItemGroup>

0 commit comments

Comments
 (0)