@@ -50,13 +50,25 @@ Copyright (c) .NET Foundation. All rights reserved.
50
50
51
51
<PropertyGroup Condition =" '$(RazorLangVersion)'==''" >
52
52
<RazorLangVersion Condition =" '$(_TargetingNETCoreApp30OrLater)' == 'true'" >3.0</RazorLangVersion >
53
+
54
+ <!--
55
+ For dev16 the Razor toolings bits don't currently understand 3.0 projects. Therefore, we default to 2.1 which is currently
56
+ functionally equivalent. This will be undone in the near future.
57
+ -->
58
+ <RazorLangVersion Condition =" '$(_TargetingNETCoreApp30OrLater)' == 'true' AND '$(DesignTimeBuild)' == 'true'" >2.1</RazorLangVersion >
53
59
</PropertyGroup >
54
60
55
61
<!--
56
62
Set the primary configuration supported by this SDK as the default configuration for Razor.
57
63
-->
58
64
<PropertyGroup Condition =" '$(RazorDefaultConfiguration)'==''" >
59
65
<RazorDefaultConfiguration Condition =" '$(_TargetingNETCoreApp30OrLater)' == 'true'" >MVC-3.0</RazorDefaultConfiguration >
66
+
67
+ <!--
68
+ For dev16 the Razor toolings bits don't currently understand 3.0 projects. Therefore, we default to 2.1 which is currently
69
+ functionally equivalent. This will be undone in the near future.
70
+ -->
71
+ <RazorDefaultConfiguration Condition =" '$(_TargetingNETCoreApp30OrLater)' == 'true' AND '$(DesignTimeBuild)' == 'true'" >MVC-2.1</RazorDefaultConfiguration >
60
72
</PropertyGroup >
61
73
62
74
<ItemGroup >
@@ -65,16 +77,33 @@ Copyright (c) .NET Foundation. All rights reserved.
65
77
it here. The IDE is hardcoded to inject 2.0 support when needed. The settings flowing through MSBuild should reflect
66
78
the project's runtime.
67
79
-->
68
- <RazorConfiguration Include =" MVC-3.0" >
80
+ <RazorConfiguration Include =" MVC-3.0" Condition = " '$(DesignTimeBuild)' != 'true' " >
69
81
<Extensions >MVC-3.0;$(CustomRazorExtension)</Extensions >
70
82
</RazorConfiguration >
83
+
84
+ <!--
85
+ For dev16 the Razor toolings bits don't currently understand 3.0 projects. Therefore, we default to 2.1 which is currently
86
+ functionally equivalent. This will be undone in the near future.
87
+ -->
88
+ <RazorConfiguration Include =" MVC-2.1" Condition =" '$(DesignTimeBuild)' == 'true'" >
89
+ <Extensions >MVC-2.1;$(CustomRazorExtension)</Extensions >
90
+ </RazorConfiguration >
71
91
</ItemGroup >
72
92
73
93
<ItemGroup >
74
- <RazorExtension Include =" MVC-3.0" >
94
+ <RazorExtension Include =" MVC-3.0" Condition = " '$(DesignTimeBuild)' != 'true' " >
75
95
<AssemblyName >Microsoft.AspNetCore.Mvc.Razor.Extensions</AssemblyName >
76
96
<AssemblyFilePath >$(RazorSdkDirectoryRoot)extensions\mvc-3-0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll</AssemblyFilePath >
77
97
</RazorExtension >
98
+
99
+ <!--
100
+ For dev16 the Razor toolings bits don't currently understand 3.0 projects. Therefore, we default to 2.1 which is currently
101
+ functionally equivalent. This will be undone in the near future.
102
+ -->
103
+ <RazorExtension Include =" MVC-2.1" Condition =" '$(DesignTimeBuild)' == 'true'" >
104
+ <AssemblyName >Microsoft.AspNetCore.Mvc.Razor.Extensions</AssemblyName >
105
+ <AssemblyFilePath >$(RazorSdkDirectoryRoot)extensions\mvc-2-1\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll</AssemblyFilePath >
106
+ </RazorExtension >
78
107
</ItemGroup >
79
108
80
109
<ItemGroup Condition =" '$(GenerateRazorAssemblyInfo)'=='true' AND '$(ResolvedRazorCompileToolset)'=='RazorSdk' AND ('$(RazorCompileOnBuild)' == 'true' OR '$(RazorCompileOnPublish)' == 'true')" >
0 commit comments