* Remove the cast * Add language version preview * Remove implicit Microsoft.Net.Compilers.TooSet dependency
@@ -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. -->
@@ -17,7 +17,6 @@
MicrosoftAspNetCoreAppRuntimeVersion=$(SharedFxVersion);
MicrosoftNETCoreAppRefVersion=$(MicrosoftNETCoreAppRefVersion);
MicrosoftNETCoreAppRuntimeVersion=$(MicrosoftNETCoreAppRuntimeVersion);
- MicrosoftNetCompilersToolsetVersion=$(MicrosoftNetCompilersToolsetVersion);
SupportedRuntimeIdentifiers=$(SupportedRuntimeIdentifiers.Trim())
</_TemplateProperties>
</PropertyGroup>
@@ -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>
</Project>
@@ -10,6 +10,6 @@ if (app.Environment.IsDevelopment())
app.UseDeveloperExceptionPage();
}
-app.MapGet("/", (Func<string>)(() => "Hello World!"));
+app.MapGet("/", () => "Hello World!");
app.Run();