Android app that has a Visual Basic .Net standard 2.0 library

Is there an example of a Xamarin app written in C# that pulls in a .NETStandard 2.0 library written in Visual Basic? I tried ported one of my C# .NETStandard 2.0 library to VB .NETStandard 2.0 library and it runs well in Debug on Windows. However, when I switched over to Android Emulator, it had a loading error. I don't have the exact message right now. It was something like "not able to resolve Microsoft.VisualBasic reference". I guessing that I'm missing some NuGet package Xmarin.Android.VB or something in my Android project.

Answers

  • Nukepayload2Nukepayload2 Member ✭✭

    VB runtime should be embedded in your VB class libraries.
    Do not install nuget package "Microsoft.VisualBasic" or reference to "Microsoft.VisualBasic.dll" in your class libraries. By default, in new .NET Standard 2.0 VB class library projects, VB runtime is embedded.

Sign In or Register to comment.