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; please ensure they are installed, or select a valid target version. All the projects as well as the Website have been built under .Net 4.8.1 (I'm dealing with some legacy code). 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. The next time I build another code file raises the same error. Where might VS2022 HIDE this information? 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. Thanks Abbott
Asked
Active
Viewed 145 times
-1
-
Does [this](https://stackoverflow.com/questions/44548780/the-reference-assemblies-for-framework-netframework-version-v4-6-2-were-not-f) can help you? – Jingmiao Xu-MSFT Sep 15 '22 at 05:33
1 Answers
0
AI bulled my way through the issue by cloning a complete copy of the project from a machine that worked. Still not sure why.

BedfordNYGuy
- 383
- 2
- 9
-
Hi, glad to know you've found the solution to resolve this issue! Please consider adding an answer and changing its status to Answered. See [can I answer my own question..](https://stackoverflow.com/help/self-answer), Just a reminder :) – Jingmiao Xu-MSFT Sep 23 '22 at 06:21