'Global.Micrsoft.VisualBasic.ApplicationsServices... is not defined error BC30002

I'm converting some old legacy VB apps from .NET framework to .NET 5, and have worked through most of the issues, however, I'm lost on these:

Error   BC30002 Type 'Global.Microsoft.VisualBasic.ApplicationServices.ApplicationBase' is not defined.
Error   BC30002 Type 'Global.Microsoft.VisualBasic.ApplicationServices.User' is not defined.
Error   BC30002 Type 'Global.Microsoft.VisualBasic.Devices.Computer' is not defined.
Error   BC30002 Type 'Global.Microsoft.VisualBasic.MyServices.Internal.ContextValue' is not defined.

VisualBasic 10.3.0 package is included in the project.

Any tips are appreciated.

Thanks, Bill



Solution 1:[1]

I came accross the same issue today trying to update a .net framework (4.6 but I guess it applies to 4.x generally) to .net 5 using Microsofts Upgrade assistent.

I found the solution in this bug report on github:

Simply put, add the following to your newly created .vbproj-file:

<PropertyGroup>
  <MyType>Empty</MyType>
</PropertyGroup>

Place at the end of of .vbproj-file just before </Project> end tag.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 jjthebig1