c# - 更新到 httpRuntime targetFramework="4.7.2" 时出现 Webforms InvalidOperationException
问题描述
我正在将我的旧代码更新为目标 4.7.2,以在我们的应用程序中创建一致性。这是一个旧的网络表单应用程序。它是一个 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.2,我会收到以下错误
[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
我可以毫无问题地将其一直更新到 4.7.1。
此处列出的任何内容似乎都不适用https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/runtime/4.7.1-4.7.2
解决方案
推荐阅读
- input - Android 10 adb shell输入keyevent返回0
- laravel - 如何通过 laravel 应用程序使用数字海洋服务器从另一台服务器在远程服务器上运行脚本文件
- c# - How can I have custom asserts with Shouldly and maintain the call-site-specific assertion messages?
- react-native - React Navigation - 从其他选项卡屏幕打开抽屉
- python - 在我的 kivymd 文件中显示 MDList 不起作用
- ruby-on-rails-6 - 我是否需要继续构建我的模型,直到控制器和视图或创建另一个模型来创建每个模型的关联?
- php - 将文件存储在 s3 存储桶中 Laravel
- mysql - 如何将“UPPER”应用于 Eloquent 查询?
- javascript - 打印查询 - graphql 打印机
- ios - CoreData 未显示查询条件