简体   繁体   English

.NETCore 3.1 - 错误 MC1000 未知构建错误,“找不到程序集”System.Web,版本 = 4.0.0.0

[英].NETCore 3.1 - Error MC1000 Unknown build error, 'Could not find assembly 'System.Web, Version=4.0.0.0

Using Visual Studio 16.6, migrating WPF app to target .netcore3.1(.300).使用 Visual Studio 16.6,将 WPF 应用程序迁移到目标 .netcore3.1(.300)。 Cannot compile with error below:无法编译并出现以下错误:

Error MC1000 Unknown build error, 'Could not find assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.错误 MC1000 未知的构建错误,'找不到程序集'System.Web,版本 = 4.0.0.0,文化 = 中性,PublicKeyToken = b03f5f7f11d50a3a'。 Either explicitly load this assembly using a method such as LoadFromAssemblyPath() or use a MetadataAssemblyResolver that returns a valid assembly.'要么使用 LoadFromAssemblyPath() 等方法显式加载此程序集,要么使用返回有效程序集的 MetadataAssemblyResolver。 MyApp C:\Program Files\dotnet\sdk\3.1.300\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.WinFX.targets 225 MyApp C:\Program Files\dotnet\sdk\3.1.300\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.WinFX.targets 225

I don't seem to have any need or reference for System.Web我似乎对 System.Web 没有任何需求或参考

I see similar things here but am on current versions: https://github.com/dotnet/wpf/issues/2648我在这里看到类似的东西,但在当前版本上: https://github.com/dotnet/wpf/issues/2648

Any ideas?有任何想法吗?

There seemed to be an issue with the structure of the project file.项目文件的结构似乎存在问题。 I don't reference System.Web but a third party DevExpress component does.我没有引用 System.Web 但第三方 DevExpress 组件可以。

When you target .netcoreapp31 AND net472, the Nuget packages do not seem to get pointed to the target frameworks correctly.当您以 .netcoreapp31 和 net472 为目标时,Nuget 包似乎没有正确指向目标框架。 The project file needed to be manually restructured to point them to the correct frameworks.需要手动重组项目文件以将它们指向正确的框架。

Details here: Issue on github dotnet/wpf详细信息: github dotnet/wpf 上的问题

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何修复错误 MC1000 未知构建错误,“找不到类型”System.Web.UI.TagPrefixAttribute” - How to fix error MC1000 Unknown build error, 'Could not find type 'System.Web.UI.TagPrefixAttribute' NUnit 测试错误:无法从程序集 'System.Web,版本 = 4.0.0.0 加载类型 'System.Web.HttpApplication' - NUnit Test Error: Could not load type 'System.Web.HttpApplication' from assembly 'System.Web, Version=4.0.0.0 天蓝色错误部署无法解析此参考。 无法找到程序集System.Web.Http,版本= 4.0.0.0 - Deploying in azure error Could not resolve this reference. Could not locate the assembly System.Web.Http, Version=4.0.0.0 出现错误-无法加载文件或程序集'System.Web.Mvc,版本= 4.0.0.0 - getting error-could not load file or assembly 'System.Web.Mvc, Version=4.0.0.0 无法加载文件或程序集“System.Web,Version = 4.0.0.0,Culture = neutral”或其依赖项之一。 访问被拒绝 - Could not load file or assembly 'System.Web, Version=4.0.0.0, Culture=neutral' or one of its dependencies. Access is denied 生成错误MC1000'对象引用未设置为 - Build error MC1000 'Object reference doen't set to instance of an 无法从程序集“System.Web,版本=4.0.0.0,文化=中性,PublicKeyToken=b03f5f7f11d50 - Could not load type 'System.Web.UI.ParseChildrenAttribute' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50 无法从程序集“System.Web,版本=4.0.0.0,Cult=neutral,PublicKeyToken=b03f5f7f11d50a3a”加载类型“System.Web.UI.ParseChildrenAttribute” - Could not load type 'System.Web.UI.ParseChildrenAttribute' from assembly 'System.Web, Version=4.0.0.0, Cult=neutral, PublicKeyToken=b03f5f7f11d50a3a' 无法加载文件或程序集'System.ServiceModel.Web,版本= 4.0.0.0' - Could not load file or assembly 'System.ServiceModel.Web, Version=4.0.0.0' 无法加载文件或程序集“ System.Web.MVC,版本4.0.0.0” - could not load file or assembly 'System.Web.MVC, version 4.0.0.0,'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM