Tommie Jones
Tommie Jones

Reputation: 1011

dotnet run reporting '.NETFramework,Version=v4.8 were not found'

Im getting the following error when running 'dotnet run' on my Mac OS/usr/local/share/dotnet/sdk/5.0.300/Microsoft.Common.CurrentVersion.targets(1216,5): error MSB3644: The reference assemblies for .NETFramework,Version=v4.8 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 [/Users/tommie/projects/zzz/zzz/zzz.csproj]

My code is from Visual Studio 8.9 and only supports up to 4.8 on the .net frameworks However when I look at the 'https://aka.ms/msbuild/developerpacks' 4.8 is not available. Only 5.0 is available. 5.0 is apparently supported in Visual Studio 8.10 but is not a formal release yet.

Upvotes: 3

Views: 8612

Answers (2)

user322676
user322676

Reputation:

fixed almost exactly same error in a project with around 20 dependent projects (and multiple target frameworks) by retargetting the parent project to target no higher frameworks than were targetted by any of child projects.

Upvotes: 0

Jeff Mergler
Jeff Mergler

Reputation: 1512

I ran into this exact error on my Jenkins server performing a job using MSBUILD: error MSB3644: The reference assemblies for .NETFramework,Version=v4.8 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. There was some back and forth about Visual Studio and about MacOS which muddled things a little, but for me, installing ".NET Framework 4.8 Developer Pack Offline Installer" as suggested by Alsein corrected my problem. Link here https://dotnet.microsoft.com/en-us/download/dotnet-framework/thank-you/net48-developer-pack-offline-installer

Upvotes: 2

Related Questions