Skip to content

Commit 3e26080

Browse files
valadasbdukes
authored andcommitted
Fixed an issue where CodeDom would be disabled post-upgrade
Fixes #7213 A two step process was put in place to disable CodeDom compilation before its upgrade and re-enable it aftewards. This was implemented in #6455 However when upgrading from-to the same version, something did not go right and no changes were detected upon the last step of that process. With this PR the change detection appears to be fixed and the web.config saves after the second XmlMerge. I have tested upgrades from 10.2.4 and 10.3.0 as well as a clean install and the web.config is fine after each of those scenarios. This PR includes the changes from #7221 as I could not build without it, so merging the other first will make this one easier to review.
1 parent 3db13b3 commit 3e26080

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

DNN Platform/Components/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dnn

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@
3333
</uninstall>
3434
</config>
3535
</component>
36+
<component type="Assembly">
37+
<assemblies>
38+
<assembly Action="UnRegister">
39+
<path>bin</path>
40+
<name>Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</name>
41+
</assembly>
42+
</assemblies>
43+
</component>
3644
<component type="Cleanup" version="10.00.00">
3745
<files>
3846
<file>
@@ -194,7 +202,9 @@
194202
<node path="/configuration/system.codedom" action="update" targetpath="/configuration/system.codedom/compilers" collision="ignore">
195203
<compilers></compilers>
196204
</node>
197-
<node path="/configuration/system.codedom/compilers" action="update" key="extension" collision="overwrite">
205+
<node path="/configuration/system.codedom/compilers/compiler[@extension='.cs']" action="remove" />
206+
<node path="/configuration/system.codedom/compilers/compiler[@extension='.vb']" action="remove" />
207+
<node path="/configuration/system.codedom/compilers" action="add">
198208
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701;612;618" />
199209
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008,40000,40008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
200210
</node>

0 commit comments

Comments
 (0)