Skip to content

Commit 54fc370

Browse files
committed
Reenable workarounds for Razor projects
1 parent 3b344f4 commit 54fc370

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Directory.Build.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@
120120
<TargetingPackVersion Condition="'%(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' and '$(IsServicingBuild)' != 'true'">$(MicrosoftNETCoreAppRefPackageVersion)</TargetingPackVersion>
121121
</KnownFrameworkReference>
122122

123-
<!-- Workaround while there is no publicly released 5.0 SDK available for source build (except for Razor projects, which use a 5.0 SDK already) -->
123+
<!-- Workaround while there is no publicly released 5.0 SDK available for source build -->
124124
<FrameworkReference
125125
Update="Microsoft.NETCore.App"
126-
Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' and '$(DotNetBuildFromSource)' == 'true' and '$(RazorLangVersion)' == ''"
126+
Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' and '$(DotNetBuildFromSource)' == 'true'"
127127
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimeVersion)"
128128
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
129129
/>

eng/Workarounds.targets

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
</ItemGroup>
3939

4040
<!-- Source Build still uses a 3.0 SDK, which we need to retarget to 5.0 until the first 5.0 SDK is publicly released -->
41-
<!-- Razor projects already use a 5.0 SDK, so we shouldn't retarget those -->
42-
<ItemGroup Condition="'$(DotNetBuildFromSource)' == 'true' and '$(RazorLangVersion)' == ''">
41+
<ItemGroup Condition="'$(DotNetBuildFromSource)' == 'true'">
4342
<KnownFrameworkReference
4443
Include="@(KnownFrameworkReference->WithMetadataValue('TargetFramework', 'netcoreapp3.0'))"
4544
TargetFramework="netcoreapp5.0"

0 commit comments

Comments
 (0)