Skip to content

Commit 08eafcd

Browse files
authored
[Templating][Fixes #14920] Exclude app.db from publish to single file (#14921)
Otherwise the published application fails when the code tries to access the missing database.
1 parent 87a110a commit 08eafcd

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/ProjectTemplates/Web.ProjectTemplates/BlazorServerWeb-CSharp.csproj.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<!--#if (IndividualLocalAuth && !UseLocalDB) -->
1313
<ItemGroup>
14-
<None Update="app.db" CopyToOutputDirectory="PreserveNewest" />
14+
<None Update="app.db" CopyToOutputDirectory="PreserveNewest" ExcludeFromSingleFile="true" />
1515
</ItemGroup>
1616

1717
<!--#endif -->

src/ProjectTemplates/Web.ProjectTemplates/RazorPagesWeb-CSharp.csproj.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<!--#endif -->
1515
<ItemGroup Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True' ">
16-
<None Update="app.db" CopyToOutputDirectory="PreserveNewest" />
16+
<None Update="app.db" CopyToOutputDirectory="PreserveNewest" ExcludeFromSingleFile="true" />
1717
</ItemGroup>
1818

1919
<!--#if (IndividualB2CAuth || IndividualLocalAuth || OrganizationalAuth) -->

src/ProjectTemplates/Web.ProjectTemplates/StarterWeb-CSharp.csproj.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<!--#endif -->
1515
<ItemGroup Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True' ">
16-
<None Update="app.db" CopyToOutputDirectory="PreserveNewest" />
16+
<None Update="app.db" CopyToOutputDirectory="PreserveNewest" ExcludeFromSingleFile="true" />
1717
</ItemGroup>
1818

1919
<!--#if (IndividualB2CAuth || IndividualLocalAuth || OrganizationalAuth) -->

src/ProjectTemplates/Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</ItemGroup>
2828

2929
<ItemGroup Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True' ">
30-
<None Update="app.db" CopyToOutputDirectory="PreserveNewest" />
30+
<None Update="app.db" CopyToOutputDirectory="PreserveNewest" ExcludeFromSingleFile="true" />
3131
</ItemGroup>
3232
<ItemGroup>
3333
<!-- Don't publish the SPA source files, but do show them in the project files list -->

src/ProjectTemplates/Web.Spa.ProjectTemplates/React-CSharp.csproj.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</ItemGroup>
2525

2626
<ItemGroup Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True' ">
27-
<None Update="app.db" CopyToOutputDirectory="PreserveNewest" />
27+
<None Update="app.db" CopyToOutputDirectory="PreserveNewest" ExcludeFromSingleFile="true" />
2828
</ItemGroup>
2929
<ItemGroup>
3030
<!-- Don't publish the SPA source files, but do show them in the project files list -->

0 commit comments

Comments
 (0)