Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAspireSharedProject>true</IsAspireSharedProject>
<UseMauiCore>true</UseMauiCore>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,15 @@ public void AspireServiceDefaultsTemplateUsesCorrectProjectName(string projectNa
Assert.IsTrue(File.Exists(Path.Combine(projectDir, "Extensions.cs")),
"Expected Extensions.cs file was not created.");

// Verify we can build it (even if restore fails due to placeholder tokens, the project structure should be valid)
// Verify the project file contains required properties
var projectContent = File.ReadAllText(expectedProjectFile);
Assert.IsTrue(projectContent.Contains("<IsAspireSharedProject>true</IsAspireSharedProject>", StringComparison.Ordinal),
"Project file should contain Aspire-specific properties.");
Assert.IsTrue(projectContent.Contains("<UseMauiCore>true</UseMauiCore>", StringComparison.Ordinal),
"Project file should contain UseMauiCore property.");

// Verify the project actually builds
Assert.IsTrue(DotnetInternal.Build(expectedProjectFile, "Debug", properties: BuildProps, msbuildWarningsAsErrors: true),
$"Project {Path.GetFileName(expectedProjectFile)} failed to build. Check test output/attachments for errors.");
}
}
Loading