-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
Describe the bug
I want to create a legacy .NET Framework 4.8 WPF app in Visual Basic as SDK style project. For C# I can just create a .NET WPF project and change the target framework to net48. Doing the same with Visual Basic results in the error below.
To Reproduce
In Visual Studio:
- create a Visual Basic .NET 6 WPF project
- change TargetFramework to
net48 - build
Exceptions (if any)
1>Target MarkupCompilePass1:
1> C:\Program Files\dotnet\sdk\7.0.102\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.WinFX.targets(211,9): error MC1000: Unknown build error, 'Could not find assembly 'mscorlib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Either explicitly load this assembly using a method such as LoadFromAssemblyPath() or use a MetadataAssemblyResolver that returns a valid assembly.'
1>Done building target "MarkupCompilePass1" in project "WpfApp1.vbproj" -- FAILED.
Further technical details
Microsoft Visual Studio Professional 2022
Version 17.4.4
VisualStudio.17.Release/17.4.4+33213.308
Microsoft .NET Framework
Version 4.8.04084
Installed Version: Professional
Visual Basic Tools 4.4.0-6.22608.27+af1e46ad38d900023f8b1a2839484e471ece1502
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.