C# 更新到httpRuntime targetFramework时Webforms InvalidOperationException=";4.7.2“;

C# 更新到httpRuntime targetFramework时Webforms InvalidOperationException=";4.7.2“;,c#,asp.net,webforms,.net-4.7.2,C#,Asp.net,Webforms,.net 4.7.2,我正在将我的旧代码更新为目标4.7.2,以在我们的应用程序中创建一致性。这是一个旧的webforms应用程序。它是一个aspx和一个主文件 我使用visual studio将目标更改为4.7.2,这更新了我的csproj和webconfig <system.web> <compilation debug="true" targetFramework="4.7.2"/> <httpRuntime targetFr

我正在将我的旧代码更新为目标4.7.2,以在我们的应用程序中创建一致性。这是一个旧的webforms应用程序。它是一个aspx和一个主文件

我使用visual studio将目标更改为4.7.2,这更新了我的csproj和webconfig

<system.web>
    <compilation debug="true" targetFramework="4.7.2"/>
    <httpRuntime targetFramework="4.5.2"/>
</system.web>
我可以一路更新到4.7.1,没有问题


此处列出的内容似乎不适用

谢谢!我们在目标框架4.7.2和4.8上看到了完全相同的问题。您的问题可能为我节省了一天的疑难解答:-)appskinmaster\u master的构造函数的访问修饰符是什么?当更新到4.8版本时,我在项目中的一个webforms页面上收到了相同的错误消息,该版本有一个受保护的构造函数。当我把它改成公共的时候,它起作用了。
[InvalidOperationException: Server could not create ASP.appskinmaster_master.]
   __ASP.FastObjectFactory_app_web_31ycbdmm.Create_ASP_appskinmaster_master() in c:\Users\ME\AppData\Local\Temp\Temporary ASP.NET Files\property_tax\cc244ff3\3e690eb6\App_Web_31ycbdmm.1.cs:0
   System.Web.Compilation.BuildResultCompiledType.CreateInstance() +31
   System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +826
   System.Web.UI.Page.get_Master() +56
   System.Web.UI.Page.ApplyMasterPage() +15
   System.Web.UI.Page.PerformPreInit() +54
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +302