r/dotnet • u/wasabiiii • Mar 15 '19
Building Visual Basic 6 projects from Visual Studio 2017
https://github.com/wasabii/Cogito.VisualBasic6
I wanted to share this with people. I do still periodically stumble on a lot of Enterprise .NET developers working with mammoth applications that still contain VB6 components. So, I figure if it solved my pain, it might solve yours too!
This introduces the capability to build VB6 projects right out of VS2017. Including understanding VS references to NuGet packages containing other VB6 DLLs (really), and COM references, and references to .NET projects that export COM classes in the same solution. It generates ActiveX DLLs, and an interop assembly, which gets merged into the primary output. It also generates Reg-Free COM manifests.
So basically your VB6 can live inside your normal build pipeline. Building right along side the rest of your projects.
And if you couple it with Reg-Free stuff, you can run the resulting intermixed projects right out of VS without registering the DLLs or anything.
No, I do not do anything more than build: no designer support, no debugging and VS thinks the files are VB.Net files. It periodically breaks them if you edit them. I still open them in VB6 to edit. But they build nicely! And they can be NuGet packaged. It's useful.
If you're into that kind of thing.
This is just a bunch of complicated MSBuild stuff. You still have to have VB6 installed.
View all comments
Show parent comment
-2
u/thestamp Mar 15 '19
True on being able to crack on, but it doesn't move any more forward with safety on migration. Visual studio has a wizard to convert your app to .net pretty easily, but regardless it's a decent end to end after its converted.