dotnet / dotnet/roslyn

Visual Studio automatically interprets VB6 as VB.Net and formats .frm, .vbp, .cls & .bas as such

Open
#82,489 0 comments 0 reactions 0 assignees View on GitHub
Area-IDE Language-VB
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/Visual-Studio-automatically-interprets-V/10997844)._

---
[severity:I'm unable to use this version]
it seems like a syntax conversion being applied Visual Studio when it thinks the file is a VB.NET file, not a VB6 file.

I have tried forcing it to interpret the file as Source Code (text) Editor with Encoding by going to Tools -> Options -> Text Editor -> File Extension

And adding:

.cls | Source Code (text) Editor with Encoding
.bas | Source Code (text) Editor with Encoding
.vbp | Source Code (text) Editor with Encoding
.frm | Source Code (text) Editor with Encoding

But when i change the following in my .cls-file;

Option Explicit
'SomeComment

It still automatically changes it to:

Option Explicit **On**
'SomeComment

If i run the changed code through a VB6-IDE, it cant interpret the automatically added "On" - so it essentially breaks the code.

Best regards,
Niclas

---
### Original Comments

#### Feedback Bot on 11/13/2025, 00:23 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

#### Feedback Bot on 2/12/2026, 11:50 PM:

Thank you for taking the time to share your feedback. While we strive to address as many reported issues as possible, we have to prioritize based on overall impact and available engineering capacity. This issue hasn’t received much recent activity, votes, or comments in the past 90 days, and based on user engagement, severity, and current priorities, it is unlikely to be addressed in the near term. If this issue is still affecting and blocking you or your team, sharing additional updates or details about its impact, and encouraging others who are affected to vote or comment, can help increase the signal on this issue and allow us to reassess its priority.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in Visual Studio with the reported .cls, .bas, .vbp, and .frm extensions, including the Option Explicit example. Trace which editor or language service applies the VB.NET formatting; done means VB6 files remain unchanged and are no longer rewritten with VB.NET syntax.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.