From 5f8fce6221c5cdfa9f337b9694ee4bee527be275 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 12 Jun 2021 18:36:37 -0700 Subject: [PATCH] Remove the cast from the empty web project template (#33393) * Remove the cast * Add language version preview * Remove implicit Microsoft.Net.Compilers.TooSet dependency --- eng/tools/GenerateFiles/Directory.Build.targets.in | 4 ---- eng/tools/GenerateFiles/GenerateFiles.csproj | 1 - .../Web.ProjectTemplates/EmptyWeb-CSharp.csproj.in | 1 + .../Web.ProjectTemplates/content/EmptyWeb-CSharp/Program.cs | 2 +- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/eng/tools/GenerateFiles/Directory.Build.targets.in b/eng/tools/GenerateFiles/Directory.Build.targets.in index 72b61969c194..53cd9040e933 100644 --- a/eng/tools/GenerateFiles/Directory.Build.targets.in +++ b/eng/tools/GenerateFiles/Directory.Build.targets.in @@ -54,10 +54,6 @@ Condition=" '$(IsServicingBuild)' != 'true' ">${MicrosoftAspNetCoreAppRefVersion} - diff --git a/eng/tools/GenerateFiles/GenerateFiles.csproj b/eng/tools/GenerateFiles/GenerateFiles.csproj index 7bc01b380d46..0ae5c9753e78 100644 --- a/eng/tools/GenerateFiles/GenerateFiles.csproj +++ b/eng/tools/GenerateFiles/GenerateFiles.csproj @@ -17,7 +17,6 @@ MicrosoftAspNetCoreAppRuntimeVersion=$(SharedFxVersion); MicrosoftNETCoreAppRefVersion=$(MicrosoftNETCoreAppRefVersion); MicrosoftNETCoreAppRuntimeVersion=$(MicrosoftNETCoreAppRuntimeVersion); - MicrosoftNetCompilersToolsetVersion=$(MicrosoftNetCompilersToolsetVersion); SupportedRuntimeIdentifiers=$(SupportedRuntimeIdentifiers.Trim()) diff --git a/src/ProjectTemplates/Web.ProjectTemplates/EmptyWeb-CSharp.csproj.in b/src/ProjectTemplates/Web.ProjectTemplates/EmptyWeb-CSharp.csproj.in index f685d2d72dac..29cbeb320f96 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/EmptyWeb-CSharp.csproj.in +++ b/src/ProjectTemplates/Web.ProjectTemplates/EmptyWeb-CSharp.csproj.in @@ -4,6 +4,7 @@ ${DefaultNetCoreTargetFramework} True Company.WebApplication1 + preview diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/Program.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/Program.cs index 95163f97f58f..ba1fabff931e 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/Program.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/Program.cs @@ -10,6 +10,6 @@ app.UseDeveloperExceptionPage(); } -app.MapGet("/", (Func)(() => "Hello World!")); +app.MapGet("/", () => "Hello World!"); app.Run();