0

Package 'PresentationFramework 4.6.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net7.0'. This package may not be fully compatible with your project.

It is a console application. Severe Warning

  1. Updated targetFramework field with 'net7.0' as value in presentationframework.nuspec file. ans: Build succeded but threw exception at runtime. System.BadImageFormatException HResult=0x80131058 Message=Could not load file or assembly 'PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Reference assemblies cannot be loaded for execution. (0x80131058) Source= StackTrace:

Inner Exception 1: BadImageFormatException: Cannot load a reference assembly for execution.

  1. Tried moving PresentationFramework.dll to lib/net7.0 folder. Chronogeran answer ans: Build Failed
  • 1
    Why do want to you use PresentationFramework.dll in an ADO .NET console application? Why do you want to reference it from a NuGet package, which [supports](https://www.nuget.org/packages/PresentationFramework#supportedframeworks-body-tab) .NET Framework only? Or, if you really need this package why do you target .NET 7.0? PresentationFramework.dll is part of WPF so if you [add](https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props-desktop) the `UseWPF` element to your csproj file and target `net7.0-windows`, then it should work without that NuGet reference. – György Kőszeg Feb 25 '23 at 11:35

0 Answers0