.NET Framework 4.0 SDK in VS 2022 image

slepov's Avatar


13 Jan, 2023 12:25 PM

I am getting the following error while using the VS 2022 image and trying to target .NET 4:

error MSB3644: The reference assemblies for .NETFramework,Version=v4.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks


Can we install the .NET 4 targeting pack/ sdk in the VS 2022 image please?

  1. Support Staff 1 Posted by Feodor Fitsner on 13 Jan, 2023 06:38 PM

    Feodor Fitsner's Avatar

    This is a script that being used to install .NET Framework SDKs on a build image: https://github.com/appveyor/build-images/blob/master/scripts/Window...

    As you see 4.8 DevPack is being installed. If you know what pack is missing you can try installing it during the build to see if that works and if it does we can roll it out during the next image update.

  2. 2 Posted by slepov on 14 Jan, 2023 03:21 PM

    slepov's Avatar

    Hi Feoder, thanks for your response.

    While looking for the .NET 4.0 Dev Pack, I found this:

    Starting with Visual Studio 2022, Visual Studio no longer includes .NET Framework components for .NET Framework 4.0 - 4.5.1 because these versions are no longer supported. Visual Studio 2022 and later versions can't build apps that target .NET Framework 4.0 through .NET Framework 4.5.1. To continue building these apps, you can use Visual Studio 2019 or an earlier version.


    Targeting .NET 4.0 in VS 2022 works on my machine, probably because I also have VS 2019 installed.

    Well, if Microsoft dropped support for .NET 4.0, maybe it is time for us library developers to drop it too.

  3. Support Staff 3 Posted by Feodor Fitsner on 15 Jan, 2023 05:09 AM

    Feodor Fitsner's Avatar

    Or you can use VS 2019 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

Recent Discussions

27 Jan, 2023 08:06 PM
27 Jan, 2023 08:05 PM
25 Jan, 2023 03:23 PM
25 Jan, 2023 03:22 PM
23 Jan, 2023 03:29 PM