Could not locate the assembly "System"

slepov's Avatar


03 Aug, 2022 10:03 AM

While building a library that targets netstandard2.0 and net35 using the Visual Studio 2022 image, I get these errors:

C:\Program Files\dotnet\sdk\6.0.302\Microsoft.Common.CurrentVersion.targets(2302,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

...and many more errors for System libraries:

Removing net35 from target frameworks fixes the build:

It used to build fine with net35 until I switched the image from VS 2019 to VS 2022.

AppVeyor maintainers, can you please check if the .NET 3.5 Targeting Pack is installed in the VS 2022 image?

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac