Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 517
Bill Hall Avatar asked Apr 26 '21 22:04

Bill Hall


1 Answers

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.

like image 114
Jan Avatar answered Nov 12 '22 13:11

Jan