
The one used by dotnet build, on the other hand, gets the reference assemblies from a NuGet package: 45. NET Framework reference assemblies in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5, which doesn’t exist on my machine. NET CLI actually use a slightly different version of MSBuild. NET Framework 4.5.1, but it’s annoying…įortunately, there’s an easy solution! And it has something to do with why it still works with dotnet build… Visual Studio and the.

NET Framework for which a developer pack is available is 4.5.1. NET 4.5 from this page… Except it isn’t there!įor some reason, the oldest version of. OK, fine, I’ll just install the targeting pack for. Strangely, building from the command line with dotnet build still works fine. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed Then, when I tried to build one of my libraries in VS 2022, I started getting this error:Įrror MSB3644: The reference assemblies for framework “.NETFramework,Version=v4.5” were not found. NET (I don’t have much space on this machine!). NET 4.5 wasn’t much of a problem, but today I hit a snag… Before installing VS 2022 on my Surface Pro, I removed VS 2019 and old versions of.

NET Framework 4.5 (among others).NET 4.5 has long been out of support, but I try to keep supporting older frameworks in my libraries as long as it’s not a major inconvenience, because many people maintain old applications that can’t easily be updated to a newer framework.Īnyway, until recently, supporting. I maintain a few libraries that still target.
