Skip to content

Commit 516bceb

Browse files
committed
Add config de/hydration to un/install to support updates without clobbering custom config changes from users.
1 parent 213c6bd commit 516bceb

17 files changed

Lines changed: 351 additions & 472 deletions

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

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,41 @@
2929
<Source>$(OutputPath)</Source>
3030
<Destination>tasks</Destination>
3131
</NuGetContent>
32-
<NuGetContent Include="Content\net45\*">
33-
<Destination>content\net45</Destination>
32+
<NuGetContent Include="Content\config.install.xdt">
33+
<Destination>content\net45\app.config.install.xdt</Destination>
3434
</NuGetContent>
35-
<NuGetContent Include="Content\net46\*">
36-
<Destination>content\net46</Destination>
35+
<NuGetContent Include="Content\config.install.xdt">
36+
<Destination>content\net45\web.config.install.xdt</Destination>
3737
</NuGetContent>
38-
<NuGetContent Include="Content\net472\*">
39-
<Destination>content\net472</Destination>
38+
<NuGetContent Include="Content\config.uninstall.xdt">
39+
<Destination>content\net45\app.config.uninstall.xdt</Destination>
40+
</NuGetContent>
41+
<NuGetContent Include="Content\config.uninstall.xdt">
42+
<Destination>content\net45\web.config.uninstall.xdt</Destination>
43+
</NuGetContent>
44+
<NuGetContent Include="Content\config.install.xdt">
45+
<Destination>content\net46\app.config.install.xdt</Destination>
46+
</NuGetContent>
47+
<NuGetContent Include="Content\config.install.xdt">
48+
<Destination>content\net46\web.config.install.xdt</Destination>
49+
</NuGetContent>
50+
<NuGetContent Include="Content\config.uninstall.xdt">
51+
<Destination>content\net46\app.config.uninstall.xdt</Destination>
52+
</NuGetContent>
53+
<NuGetContent Include="Content\config.uninstall.xdt">
54+
<Destination>content\net46\web.config.uninstall.xdt</Destination>
55+
</NuGetContent>
56+
<NuGetContent Include="Content\config.install.xdt">
57+
<Destination>content\net472\app.config.install.xdt</Destination>
58+
</NuGetContent>
59+
<NuGetContent Include="Content\config.install.xdt">
60+
<Destination>content\net472\web.config.install.xdt</Destination>
61+
</NuGetContent>
62+
<NuGetContent Include="Content\config.uninstall.xdt">
63+
<Destination>content\net472\app.config.uninstall.xdt</Destination>
64+
</NuGetContent>
65+
<NuGetContent Include="Content\config.uninstall.xdt">
66+
<Destination>content\net472\web.config.uninstall.xdt</Destination>
4067
</NuGetContent>
4168
<NuGetContent Include="build\*">
4269
<Destination>build\net45</Destination>

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

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
3+
34
<!-- If system.codedom tag is absent -->
45
<system.codedom xdt:Transform="InsertIfMissing">
56
</system.codedom>
@@ -23,13 +24,7 @@
2324
<!-- Inserting the new compiler -->
2425
<system.codedom>
2526
<compilers>
26-
<compiler
27-
language="c#;cs;csharp"
28-
extension=".cs"
29-
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
30-
warningLevel="4"
31-
compilerOptions="/langversion:6 /nowarn:1659;1699;1701;612;618"
32-
xdt:Transform="Insert" />
27+
<compiler extension=".cs" xdt:Transform="Insert" />
3328
</compilers>
3429
</system.codedom>
3530

@@ -46,13 +41,7 @@
4641
<!-- Inserting the new compiler -->
4742
<system.codedom>
4843
<compilers>
49-
<compiler
50-
language="vb;vbs;visualbasic;vbscript"
51-
extension=".vb"
52-
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
53-
warningLevel="4"
54-
compilerOptions="/langversion:14 /nowarn:41008,40000,40008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"
55-
xdt:Transform="Insert" />
44+
<compiler extension=".vb" xdt:Transform="Insert" />
5645
</compilers>
5746
</system.codedom>
5847
</configuration>

src/Packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/content/net46/app.config.uninstall.xdt renamed to src/Packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/content/config.uninstall.xdt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
33
<appSettings>
4-
<add key="aspnet:RoslynCompilerLocation" value="roslyn" xdt:Transform="Remove" xdt:Locator="Match(key)" />
4+
<add key="aspnet:RoslynCompilerLocation" value="roslyn" xdt:Transform="Remove" xdt:Locator="Condition(@key='aspnet:RoslynCompilerLocation' and @value='roslyn')" />
55
</appSettings>
66
<appSettings xdt:Transform="Remove" xdt:Locator="Condition(count(child::*) = 0)">
77
</appSettings>

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

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/Packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/content/net45/app.config.uninstall.xdt

Lines changed: 0 additions & 29 deletions
This file was deleted.

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

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/Packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/content/net46/app.config.install.xdt

Lines changed: 0 additions & 66 deletions
This file was deleted.

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

Lines changed: 0 additions & 58 deletions
This file was deleted.

src/Packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/content/net46/web.config.uninstall.xdt

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)