Skip to content

Commit

Permalink
Remove the cast from the empty web project template (#33393)
Browse files Browse the repository at this point in the history
* Remove the cast

* Add language version preview

* Remove implicit Microsoft.Net.Compilers.TooSet dependency
  • Loading branch information
davidfowl authored Jun 13, 2021
1 parent d2ab01b commit 5f8fce6
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions eng/tools/GenerateFiles/Directory.Build.targets.in
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@
Condition=" '$(IsServicingBuild)' != 'true' ">${MicrosoftAspNetCoreAppRefVersion}</TargetingPackVersion>
</KnownFrameworkReference>

<PackageReference Include="Microsoft.Net.Compilers.Toolset"
Version="${MicrosoftNetCompilersToolsetVersion}"
PrivateAssets="all"
IsImplicitlyDefined="true" />
</ItemGroup>

<!-- Warn if the "just-built" ASP.NET Core shared framework does not exist. -->
Expand Down
1 change: 0 additions & 1 deletion eng/tools/GenerateFiles/GenerateFiles.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
MicrosoftAspNetCoreAppRuntimeVersion=$(SharedFxVersion);
MicrosoftNETCoreAppRefVersion=$(MicrosoftNETCoreAppRefVersion);
MicrosoftNETCoreAppRuntimeVersion=$(MicrosoftNETCoreAppRuntimeVersion);
MicrosoftNetCompilersToolsetVersion=$(MicrosoftNetCompilersToolsetVersion);
SupportedRuntimeIdentifiers=$(SupportedRuntimeIdentifiers.Trim())
</_TemplateProperties>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<TargetFramework>${DefaultNetCoreTargetFramework}</TargetFramework>
<NoDefaultLaunchSettingsFile Condition="'$(ExcludeLaunchSettings)' == 'True'">True</NoDefaultLaunchSettingsFile>
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">Company.WebApplication1</RootNamespace>
<LangVersion>preview</LangVersion>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
app.UseDeveloperExceptionPage();
}

app.MapGet("/", (Func<string>)(() => "Hello World!"));
app.MapGet("/", () => "Hello World!");

app.Run();

0 comments on commit 5f8fce6

Please sign in to comment.