Skip to content
Merged
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 @@ -7,8 +7,8 @@
<NoDefaultLaunchSettingsFile Condition="'$(ExcludeLaunchSettings)' == 'True'">true</NoDefaultLaunchSettingsFile>
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">Company.WebApplication1</RootNamespace>
<ServerGarbageCollection>false</ServerGarbageCollection>
<InvariantGlobalization>true</InvariantGlobalization>
<!--#if (NativeAot) -->
<InvariantGlobalization>true</InvariantGlobalization>
<PublishAot>true</PublishAot>
<!--#endif -->
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<TargetFramework>${DefaultNetCoreTargetFramework}</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization>
<!--#if (NativeAot) -->
<InvariantGlobalization>true</InvariantGlobalization>
<PublishAot>true</PublishAot>
<!--#endif -->
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<TargetFramework>${DefaultNetCoreTargetFramework}</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization>
<!--#if (NativeAot) -->
<InvariantGlobalization>true</InvariantGlobalization>
<PublishAot>true</PublishAot>
<!--#endif -->
<UserSecretsId>dotnet-Company.Application1-53bc9b9d-9d6a-45d4-8429-2a2761773502</UserSecretsId>
Expand Down
5 changes: 4 additions & 1 deletion src/ProjectTemplates/test/Templates.Tests/ApiTemplateTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ private async Task ApiTemplateCore(string languageOverride, string[] args = null
: new[] { "http", "IIS Express" };
await project.VerifyLaunchSettings(expectedLaunchProfileNames);

await project.VerifyHasProperty("InvariantGlobalization", "true");
if (nativeAot)
{
await project.VerifyHasProperty("InvariantGlobalization", "true");
}

// Avoid the F# compiler. See https://github.com/dotnet/aspnetcore/issues/14022
if (languageOverride != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ private async Task GrpcTemplateCore(string[] args = null)
var expectedLaunchProfileNames = new[] { "http", "https" };
await project.VerifyLaunchSettings(expectedLaunchProfileNames);

await project.VerifyHasProperty("InvariantGlobalization", "true");
if (nativeAot)
{
await project.VerifyHasProperty("InvariantGlobalization", "true");
}

// Force a restore if native AOT so that RID-specific assets are restored
await project.RunDotNetPublishAsync(noRestore: !nativeAot);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ private async Task WorkerTemplateCoreAsync(string language, string[] args)

await project.RunDotNetNewAsync("worker", language: language, args: args);

await project.VerifyHasProperty("InvariantGlobalization", "true");
if (nativeAot)
{
await project.VerifyHasProperty("InvariantGlobalization", "true");
}

// Force a restore if native AOT so that RID-specific assets are restored
await project.RunDotNetPublishAsync(noRestore: !nativeAot);
Expand Down