Skip to content

Commit fba1655

Browse files
authored
fix: resolve aspire project build issue #84 (#85)
1 parent ff6e021 commit fba1655

File tree

7 files changed

+4260
-7
lines changed

7 files changed

+4260
-7
lines changed

src/Server/Bit.TemplatePlayground.Server.Api/Data/Migrations/20250807145738_Inital.Designer.cs

Lines changed: 1690 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Server/Bit.TemplatePlayground.Server.Api/Data/Migrations/20250807145738_Inital.cs

Lines changed: 871 additions & 0 deletions
Large diffs are not rendered by default.

src/Server/Bit.TemplatePlayground.Server.Api/Data/Migrations/AppDbContextModelSnapshot.cs

Lines changed: 1687 additions & 0 deletions
Large diffs are not rendered by default.

src/Server/Bit.TemplatePlayground.Server.Api/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static async Task Main(string[] args)
2020
{
2121
await using var scope = app.Services.CreateAsyncScope();
2222
var dbContext = scope.ServiceProvider.GetRequiredService<AppDbContext>();
23-
await dbContext.Database.EnsureCreatedAsync(); // It's recommended to start using ef-core migrations.
23+
await dbContext.Database.MigrateAsync(); // It's recommended to start using ef-core migrations.
2424
}
2525

2626
app.ConfigureMiddlewares();

src/Server/Bit.TemplatePlayground.Server.Api/appsettings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@
7777
"ProductImagesDir": "attachments/products/",
7878
"GoogleRecaptchaSecretKey": "6LdMKr4pAAAAANvngWNam_nlHzEDJ2t6SfV6L_DS",
7979
"GoogleRecaptchaSecretKey_Comment": "Create one at https://console.cloud.google.com/security/recaptcha/create for Web Application Type and use site key in Client.Core",
80+
"Hangfire": {
81+
"UseIsolatedStorage": true,
82+
"UseIsolatedStorage__Comment": "Useful for testing or in production when managing multiple codebases with a single database."
83+
},
8084
"Authentication": {
8185
"Google": {
8286
"Comment": "https://learn.microsoft.com/en-us/aspnet/core/security/authentication/social/google-logins",

src/Server/Bit.TemplatePlayground.Server.AppHost/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
// Check out appsettings.json for credential settings.
88

99

10-
var serverWebProject = builder.AddProject<Bit.TemplatePlayground_Server_Web>("serverweb") // Replace . with _ if needed to ensure the project builds successfully.
10+
var serverWebProject = builder.AddProject<Bit_TemplatePlayground_Server_Web>("serverweb") // Replace . with _ if needed to ensure the project builds successfully.
1111
.WithExternalHttpEndpoints();
1212

1313

1414

1515

1616
// Blazor WebAssembly Standalone project.
17-
builder.AddProject<Bit.TemplatePlayground_Client_Web>("clientwebwasm"); // Replace . with _ if needed to ensure the project builds successfully.
17+
builder.AddProject<Bit_TemplatePlayground_Client_Web>("clientwebwasm"); // Replace . with _ if needed to ensure the project builds successfully.
1818

1919
if (builder.ExecutionContext.IsRunMode) // The following project is only added for testing purposes.
2020
{
2121
// Blazor Hybrid Windows project.
22-
builder.AddProject<Bit.TemplatePlayground_Client_Windows>("clientwindows") // Replace . with _ if needed to ensure the project builds successfully.
22+
builder.AddProject<Bit_TemplatePlayground_Client_Windows>("clientwindows") // Replace . with _ if needed to ensure the project builds successfully.
2323
.WithExplicitStart();
2424
}
2525

src/Server/Bit.TemplatePlayground.Server.Web/Program.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
using Bit.TemplatePlayground.Server.Api.Data;
1+
using Bit.TemplatePlayground.Client.Core.Services.Contracts;
2+
using Bit.TemplatePlayground.Server.Api.Data;
23
using Bit.TemplatePlayground.Server.Web.Services;
3-
using Bit.TemplatePlayground.Client.Core.Services.Contracts;
4+
using Microsoft.EntityFrameworkCore;
45

56
namespace Bit.TemplatePlayground.Server.Web;
67

@@ -30,7 +31,7 @@ public static async Task Main(string[] args)
3031
{
3132
await using var scope = app.Services.CreateAsyncScope();
3233
var dbContext = scope.ServiceProvider.GetRequiredService<AppDbContext>();
33-
await dbContext.Database.EnsureCreatedAsync(); // It's recommended to start using ef-core migrations.
34+
await dbContext.Database.MigrateAsync(); // It's recommended to start using ef-core migrations.
3435
}
3536

3637
app.ConfigureMiddlewares();

0 commit comments

Comments
 (0)