3

enter image description here

Got this in my warnings from today, still don't know why, but seems like the entire solution is running perfectly.

Should I be worried?

Can I just remove it from References?

fr0zie
  • 73
  • 8
  • Try remove it, if your project no longer builds then figure out why. My understanding which could be wrong, the Microsoft.VisualBasic namespace is primarily for legacy VB6 functions that have been superseded anyway – Hursey Apr 13 '21 at 20:29
  • 1
    This has been happening to me for a while. The projects appear to reference Microsoft.VisualBasic, but if I check the csproj file they do not. If I remove the reference in Visual Studio that fixes it temporarily. but then closing and reopening Visual Studio makes the warning come back. – Mark Nash Apr 21 '21 at 09:52
  • 1
    Yes I happened to me also. Everytime I start VS it comes back. But anyway, it seems that it doesn't change anything during runtime. – fr0zie Apr 22 '21 at 14:50
  • This started hapenning to me after replacing the computer and installing the Microsoft.NETFramework.ReferenceAssemblies.net45 Nuget package (see https://stackoverflow.com/questions/70022194/open-net-framework-4-5-project-in-vs-2022-is-there-any-workaround) in a couple of projects. After removing the package this stopped. – yibup Mar 02 '23 at 11:55

1 Answers1

2

The projects appear to reference Microsoft.VisualBasic, but if you check the csproj file you will see that they do not. If you remove the reference in Visual Studio that will fix it temporarily, but then closing and reopening Visual Studio makes the warning come back.

No, you should not be worried. This appears to be a bug in Visual Studio, hopefully they will fix it in the next version.

Mark Nash
  • 184
  • 10
  • 4/26/2023 And it is still a problem for me in a legacy VB project. Also, mscorlib could not be found. And as above, removing them is temporary. It comes back when reopening. – ScottinTexas Apr 27 '23 at 14:33