Skip to content

Commit a80a229

Browse files
ErikEJaaronpowell
andauthored
Fix showstopper bug in SQL Projects hosting extension: (#519)
- Use correct assembly reference to determine configuration - Add more logging to console logs Co-authored-by: Aaron Powell <[email protected]>
1 parent a85e060 commit a80a229

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/SqlProjectPublishService.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ await resourceNotificationService.PublishUpdateAsync(resource,
2626
state => state with { State = new ResourceStateSnapshot(KnownResourceStates.FailedToStart, KnownResourceStateStyles.Error) });
2727
return;
2828
}
29+
else
30+
{
31+
logger.LogInformation("SQL Server Database project package found at path {DacpacPath}.", dacpacPath);
32+
}
2933

3034
var options = resource.GetDacpacDeployOptions();
3135

src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/SqlProjectResource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ string IResourceWithDacpac.GetDacpacPath()
1717
var projectPath = projectMetadata.ProjectPath;
1818
using var projectCollection = new ProjectCollection();
1919

20-
var attr = GetType().Assembly.GetCustomAttribute<AssemblyConfigurationAttribute>();
20+
var attr = Assembly.GetEntryAssembly()?.GetCustomAttribute<AssemblyConfigurationAttribute>();
2121
if (attr is not null)
2222
projectCollection.SetGlobalProperty("Configuration", attr.Configuration);
2323

0 commit comments

Comments
 (0)