I'm currently working on a Visual Basic project with a team of developers, some of which will be able to move to Visual Studio 2015 as soon as it is released, and some who will be stuck on Visual Studio 2013 for several months. In testing with the RC we have found that Visual Studio will open 2013 projects without a problem, but will happily let users use new language features, such as string interpolation, that are not available for users in VS 2013. If a 2015 user checks in this code the 2013 users will get compile errors. Is there any project, solution, or Visual Studio setting that will tell the compiler to restrict features to what is available in the previous version of VB.net? Ideally the compiler should return a compile error when trying to use these features in 2015.
This features is available in C# under Project Properties > Build > Language Version, but I can't find any equivalent for VB.net, and the google searches are failing me.
I just wanted to mention that setting the .Net runtime version to 4.5 doesn't help, as these new language features are compiler level features that work perfectly fine on older frameworks.
There is no UI feature to set the Language version, but you can unload the project file and add <LangVersion>11</LangVersion> to default Visual Basic to the 2012/2013 language settings. The C# project adds this property under the Project Configuration property groups, so for consistency's sake I've done the same in the sample below.
The C# property pages do the same thing, except that C# uses a different set of version numbers.
A full set of all the language versions can be found here.
2002 (VB 7.0)
2003 (VB 7.1)
2005 (VB 8.0)
2008 (VB 9.0)
2010 (VB 10.0)
2012 (VB 11.0)
2015 (VB 14)
Just tested and this works for me, but I did have to change the casing to:
This results in:
And a nice build failure:
Related
I need to build Class Library (.dll) as a part of my custom IIS (SharePoint 2010) web service for .NET Framework 3.5, but VS2019 (Community edition) using VB.NET refuses me to build it with the subjected error.
I found suggestions to disable "Pretty listing (reformatting) of code" in Options > Text Editor > Basic Advanced (in settings of Visual Studio), but I found this functionality useful otherwise so I would prefer any different solution.
Another suggestion was about deleting some "LangVersion" (or similar) tag from .vbproj file, but I don't have there any ;-(
p.s. I had troubles with these in VS2015 and VS2017 as well...
Any suggestions?
Thanks in advance. #JK
Is it possible to use ANTLR with Visual Studio 2013?
I installed ANTLR language support, which says it is for VS 2010 and 2012. And when I install the ANTLR 4 NUGET package into a VS 2012 project, then right-click the project and select add new item, a bunch of ANTLR-related file types come up in the menu -- ANTLR4 Combined Grammar, and so forth. But when I do the same thing in VS 2013, the ANTLR-related file types do not appear.
The ANTLR 4 NuGet package and the ANTLR Language Support extension are two completely independent products (neither depends on the other, although they are most often used together).
The ANTLR 4 NuGet package does not depend on any specific version of Visual Studio, so it works fine with Visual Studio 2013. As of today, the ANTLR Language Support extension has been released for Visual Studio 2010 through Visual Studio 2013.
I want to open a program (written in Visual basic 6) to be open in Visual Studio.net. Please guide, how could I do that?
While trying to open VB6 (.vbp file) program directly from the OPEN project option in visual studion.net, I was getting this error,
"Visual Basic 6 (.vbp) files cannot be opened in Visual Studio"
I am trying to open in VS 2010.
Visual Studio 2010 does not support VB6 projects. See the link here
From the msdn documentation:
Visual Studio 2010 does not provide tools for upgrading applications and projects from Visual Basic 6.0. If you want to upgrade your project from Visual Basic 6.0 to Visual Basic 2010, you can use the upgrade tools provided with earlier versions of Visual Studio and then upgrade the project again in Visual Studio 2010.
Visual Basic Tools for Visual Studio
There's a plugin called Visual Basic Tools for Visual Studio that provides the following features:
load classic VB workspace- and project-files and offers quick access to the extension´s options
integrates with the solution explorer and the code editor having support for syntax highlighting, basic outlining (allows to expand/collapse methods, properties and types) as well as navigation bar support.
Classes, Types, Modules, Forms and Controls can be inspected using the Object Browser and Class View.
From the reading, it's unclear if you can actually build the project, though it does say:
The import tool creates a new solution and MSBuild compatible projects.
Links to the plugin by VS Version
2012-2013
2015
2017
RAD Basic
There is also an independent IDE called RAD Basic that claims the following features:
New and modern IDE (Integrated Development Environment) with form designer supporting drag and drop, code completion, refactoring tools, etc.
RAD Basic Compiler: Compiler 100% compatible with your VB6 project (vbp, frm, bas and cls files). Generate native executables (exe and ocx) in both 32-bit and 64-bit.
RAD Basic Forms: Reimplementation of common VB6 controls and components supporting 32-bit and 64-bit.
etc.
Speaking from my experience, it's not easy to open a Visual Basic 6.0 project in any versions of Visual Studio above 2008.
Although 2008 and below versions do provide an automatic function to convert Vb6 code to the VB.net framework. But, the problem starts after the conversion - it can skip some code, add functions/variables on its own, or modify the functional behavior on its own, and with that the VB.proj will be created with errors and you will not be able to open it anywhere as a solution file. The same with any 3rd party tools.
If you want to open the VB6 code try Visual Basic 6.0 Portable edition.
But headache will still follow you there, please refer this link
Installation of VB6 on Windows 7 / 8 / 10
Make sure you are clicking on the project file itself... Right click on the file and select "Open With" and select your visual studio program. It may need to be converted and if so, it will prompt you to convert the project.
Thanks!
Download Visual Basic Tools for Visual Studio,allows to work with classic VB workspaces and projects
I am getting a few errors trying to download the new VS2012. Its a fresh install of windows 8 (did the windows update). I have tried not selecting all (no C++, lightswitch, blend, office tools)
I tried different mounting tools for the .ISO but no luck. VS2010 is still working. Running x86. Log file
Errors:
Critical: Microsoft Visual C++ 2012 x86 Minimum Runtime - 11.0.507 Cannot find the requested object.
Microsoft Visual Studio 2012 Pre-Clean Tool Cannot find the requested object
Microsoft Visual C++ 2012 x86 Additional Runtime - 11.0.507 Cannot find the requested object.
Microsoft Visual C++ 2012 Core Libraries, Team Foundation Server 2012, Microsoft Framework 4.5 Multi-Targeting pack.... and a few other ones cannot be found. Thanks!
Downloaded the web installer, and that seemed to work. It seems that the iso was corrupted as the MD5 did not match.
I want to be able to develop code using Visual Studio 2010. I just got VS2010 and I'm not able to get the languages I want on it. The main reason that I'm asking this is that I'm trying to migrate to ONE IDE that does it all for me. Thus far eclipse has been doing a good job, but I've been informed that VS2010 is better and I'm trying to get into the groove of that standard
So my question is two-fold.
I am not able to find a complete list of languages supported by VS2010. What are these languages?
How can I get VS2010 support for:
Python/IronPython
C/C++/C#/XNA
Java
My Googling has given me no promising/definitive results.
I'd really appreciate any help.
From Wikipedia (search Visual Studio 2010):
"Visual Studio supports languages by means of language services, which allow the code editor and debugger to support (to varying degrees) nearly any programming language, provided a language-specific service exists. Built-in languages include C/C++ (via Visual C++), VB.NET (via Visual Basic .NET), C# (via Visual C#), and F# (as of Visual Studio 2010[3]). Support for other languages such as M, Python, and Ruby among others is available via language services installed separately. It also supports XML/XSLT, HTML/XHTML, JavaScript and CSS. Language-specific versions of Visual Studio also exist which provide more limited language services to the user. These individual packages are called Microsoft Visual Basic, Visual J#, Visual C#, and Visual C++."