Bug 12861 - Error VBNC99997 in simple console application
Summary: Error VBNC99997 in simple console application
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: VisualBasic ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2013-06-25 03:05 UTC by Adam McKenney
Modified: 2013-06-27 11:03 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Adam McKenney 2013-06-25 03:05:21 UTC
When creating a simple console application on my Debian Wheezy (stable) and Debian Jessie (testing) you run into an error.

In Visual Studios, when you do "Imports System.Console" you can type Title = "Foobar" without a problem. Even Mono Develop doesn't mark this as an error until you try to compile. Using vbnc, even when you import System.Console, you will get this message:

<long path>/t.vb (5,10) : Error VBNC99997: You've encountered something in the compiler which is not implemented. Please file a bug (see instructions here: http://mono-project.com/Bugs)
<long path>/t.vb (5,10) : Error VBNC30451: Could not resolve the name 'Title'
There were 2 errors and 0 warnings.
Compilation took 00:00:01.5417320

To fix it you have to add Console.Title which is a pain if you have around 20 lines that require it.
This bug works for other things in System.Console like ForegroundColor and BackgroundColor.

If you do not import System.Console, then you get this simple error:

<long path>/t.vb (5,10) : Error VBNC30451: Could not resolve the name 'Title'
There were 1 errors and 0 warnings.
Compilation took 00:00:01.5512160

Test Application's Code:

Imports System.Console
Class Test

        Shared Sub Main
                Title = "Test"
                Console.ForegroundColor = ConsoleColor.Cyan
                Console.Write("==> ")
                Dim inpt As String = Console.ReadLine()
                Console.WriteLine(inpt)
        End Sub
End Class
Comment 1 Rolf Bjarne Kvinge [MSFT] 2013-06-27 11:03:32 UTC
Fixed.

master: e61c2d1449f7fd2d91d8438ec70e561e040947b7