Microsoft.VisualBasic is not automatic imported

To reproduce, create a new project from the Mercury Console - .Net Framework template

Create this sub main:

Sub Main()
    WriteLn("Test" & vbTab & "the vbTab character")
End Sub

Compile the code, and you get the error:
image

I believe that’s as designed. We tried changing that a while back to attempt to fix some other issue, and IIRC all hell broke loose when we did, breaking all kinds of things.

In that case, the Mercury templates should have it as default use.

1 Like

Okay. I’ll add that

1 Like

WinForms already has

<DefaultUses>Microsoft.VisualBasic;System;System.Collections;System.Collections.Generic;System.Data;System.Drawing;System.Diagnostics;System.Windows.Forms;System.Linq;System.Xml.Linq;System.Threading.Tasks</DefaultUses>

should I add there same set to all? (minus actual System.Windows.Forms in the non-WInForms ones)?

Yes, except for system.windows.forms and System.Drawing - that is only needed for winforms.

Default imported in a framework Copnsole app (VB):
image

So that set is correct.

1 Like