简体   繁体   English

asp.net Web 应用程序编译失败,出现 .net 版本错误

[英]An asp.net Web Application fails compile with .net version error

When I build an Asp.Net Web Application, the code files in the App_Code directory come up with the error: Reference assemblies for target .NET Framework version not found;当我构建 Asp.Net Web 应用程序时,App_Code 目录中的代码文件出现错误:未找到目标 .NET 框架版本的参考程序集; please ensure they are installed, or select a valid target version.请确保它们已安装,或者 select 是有效的目标版本。 All the projects as well as the Website have been built under.Net 4.8.1 (I'm dealing with some legacy code).所有项目以及网站都是在.Net 4.8.1 下构建的(我正在处理一些遗留代码)。 I'm not sure where to find the flag that might be causing this.我不确定在哪里可以找到可能导致此问题的标志。 Each time I build, one of the code files in App-Code raises the error.每次构建时,App-Code 中的一个代码文件都会引发错误。 The next time I build another code file raises the same error.下次我构建另一个代码文件时会引发同样的错误。 Where might VS2022 HIDE this information? VS2022 可能在哪里隐藏这些信息? I reboot and the same thing happens.我重新启动,同样的事情发生了。 I'm looking for guidance, since the solution consists of 15 large projects, so passing on a sample would be onerous.我正在寻找指导,因为该解决方案由 15 个大型项目组成,因此传递样本会很繁重。 Thanks Abbott谢谢雅培

AI bulled my way through the issue by cloning a complete copy of the project from a machine that worked.人工智能通过从一台正常工作的机器上克隆项目的完整副本来解决这个问题。 Still not sure why.仍然不确定为什么。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM