1. Create a Razor v1 web site
2. Open web.config and add the following entry in <appSettings />.
<add key="webPages:Version" value="1.0.0.0" />
3. Open the NuGet package manager and install version 2 of the package Microsoft.AspNet.Webpages.
Result: In web.config, the app setting isn't updated to 2.0, even as the assembly references are. If you attempt to build the site, compilation will fail with multiple errors of the form
The type 'System.Web.WebPages.HelperPage' exists in both 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.WebPages\v4.0_2.0.0.0__31bf3856ad364e35\System.Web.WebPages.dll' and 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.WebPages\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.dll' c:\Users\fwtlaba\AppData\Local\Temp\Temporary ASP.NET Files\school\37312387\916963f9\App_Code.np9dbukn.8.cs
Expected: We should transform web.config to update the webpages:Version setting as well.
Comments: There are two components to this issue: 1. We should show a proper error message (something like assemblies in bin do not match version in web.config) 2. Transform the web.config (through XDT and not Power Shell)
2. Open web.config and add the following entry in <appSettings />.
<add key="webPages:Version" value="1.0.0.0" />
3. Open the NuGet package manager and install version 2 of the package Microsoft.AspNet.Webpages.
Result: In web.config, the app setting isn't updated to 2.0, even as the assembly references are. If you attempt to build the site, compilation will fail with multiple errors of the form
The type 'System.Web.WebPages.HelperPage' exists in both 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.WebPages\v4.0_2.0.0.0__31bf3856ad364e35\System.Web.WebPages.dll' and 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.WebPages\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.dll' c:\Users\fwtlaba\AppData\Local\Temp\Temporary ASP.NET Files\school\37312387\916963f9\App_Code.np9dbukn.8.cs
Expected: We should transform web.config to update the webpages:Version setting as well.
Comments: There are two components to this issue: 1. We should show a proper error message (something like assemblies in bin do not match version in web.config) 2. Transform the web.config (through XDT and not Power Shell)