Skip to content

Commit 52251c3

Browse files
committed
Revert "remove /langversion from web.config"
This reverts commit f34cded.
1 parent f34cded commit 52251c3

4 files changed

Lines changed: 86 additions & 2 deletions

File tree

src/Packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.nuproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
<NuGetContent Include="Content\net45\*">
2424
<Destination>content\net45</Destination>
2525
</NuGetContent>
26+
<NuGetContent Include="Content\net46\*">
27+
<Destination>content\net46</Destination>
28+
</NuGetContent>
2629
<NuGetContent Include="build\*">
2730
<Destination>build\net45</Destination>
2831
</NuGetContent>

src/Packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/content/net45/web.config.install.xdt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
extension=".cs"
2929
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
3030
warningLevel="4"
31-
compilerOptions="/nowarn:1659;1699;1701"
31+
compilerOptions="/langversion:6 /nowarn:1659;1699;1701"
3232
xdt:Transform="Insert" />
3333
</compilers>
3434
</system.codedom>
@@ -51,7 +51,7 @@
5151
extension=".vb"
5252
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
5353
warningLevel="4"
54-
compilerOptions="/nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"
54+
compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"
5555
xdt:Transform="Insert" />
5656
</compilers>
5757
</system.codedom>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
3+
<!-- If system.codedom tag is absent -->
4+
<system.codedom xdt:Transform="InsertIfMissing">
5+
</system.codedom>
6+
7+
<!-- If compilers tag is absent -->
8+
<system.codedom>
9+
<compilers xdt:Transform="InsertIfMissing">
10+
</compilers>
11+
</system.codedom>
12+
13+
<!-- If a .cs compiler is already present, the existing entry needs to be removed before inserting the new entry -->
14+
<system.codedom>
15+
<compilers>
16+
<compiler
17+
extension=".cs"
18+
xdt:Transform="Remove"
19+
xdt:Locator="Match(extension)" />
20+
</compilers>
21+
</system.codedom>
22+
23+
<!-- Inserting the new compiler -->
24+
<system.codedom>
25+
<compilers>
26+
<compiler
27+
language="c#;cs;csharp"
28+
extension=".cs"
29+
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
30+
warningLevel="4"
31+
compilerOptions="/langversion:7 /nowarn:1659;1699;1701"
32+
xdt:Transform="Insert" />
33+
</compilers>
34+
</system.codedom>
35+
36+
<!-- If a .vb compiler is already present, the existing entry needs to be removed before inserting the new entry -->
37+
<system.codedom>
38+
<compilers>
39+
<compiler
40+
extension=".vb"
41+
xdt:Transform="Remove"
42+
xdt:Locator="Match(extension)" />
43+
</compilers>
44+
</system.codedom>
45+
46+
<!-- Inserting the new compiler -->
47+
<system.codedom>
48+
<compilers>
49+
<compiler
50+
language="vb;vbs;visualbasic;vbscript"
51+
extension=".vb"
52+
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
53+
warningLevel="4"
54+
compilerOptions="/langversion:15 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"
55+
xdt:Transform="Insert" />
56+
</compilers>
57+
</system.codedom>
58+
</configuration>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
3+
<system.codedom>
4+
<compilers>
5+
<compiler
6+
extension=".cs"
7+
xdt:Transform="Remove"
8+
xdt:Locator="Match(extension)" />
9+
</compilers>
10+
</system.codedom>
11+
<system.codedom>
12+
<compilers>
13+
<compiler
14+
extension=".vb"
15+
xdt:Transform="Remove"
16+
xdt:Locator="Match(extension)" />
17+
</compilers>
18+
</system.codedom>
19+
<system.codedom>
20+
<compilers xdt:Transform="Remove" xdt:Locator="Condition(count(child::*) = 0)" />
21+
</system.codedom>
22+
<system.codedom xdt:Transform="Remove" xdt:Locator="Condition(count(child::*) = 0)" />
23+
</configuration>

0 commit comments

Comments
 (0)