Unable to Resolve Microsoft.VisualBasic.dll Reference in .NET Standard 2.0 Project After Migrating from .NET Framework 4.8

191 views Asked by At

I've recently migrated a VB.NET class library from .NET Framework 4.8 to .NET Standard 2.0. Post-migration, I'm encountering a persistent build error related to Microsoft.VisualBasic.dll. Despite not having any direct references to this DLL in my project, the build process seems to require it. The error occurs during the build with the message: Error BC2017: could not find library 'Microsoft.VisualBasic.dll'.

Steps Taken:

Restored all packages to their .NET Standard 2.0 equivalents. Verified successful build of other components. Imported Microsoft.VisualBasic using NuGet, but the build process still fails to find the DLL. Manually verified the DLL's presence at C:\Users<myuser>.nuget\packages\microsoft.visualbasic\10.3.0\ref\netstandard2.0\Microsoft.VisualBasic.dll. Attempted adding a direct reference to the DLL in the .vbproj file.

I've tried cleaning and rebuilding the project, checking for correct framework targeting, and ensuring no discrepancies in platform target (x86/x64/AnyCPU). SDK and Visual Studio are up-to-date. I've been troubleshooting this issue for a couple of months without success and haven't found any online resources addressing this specific problem. I would greatly appreciate any guidance or suggestions on how to resolve this.

0

There are 0 answers