Use Visual Studio for custom script language - visual-studio-2010

We are using a commercial software that has its own scripting language with which you can customize the product. It is very tedious to write code in it without any help from an IDE and it has its own compiler.
Is it possible to use Visual Studio and create an environment for me to write scripts in this language and get the help of intellisense and syntax highlightning and other good things you find in an IDE? Ideally I would like to bind a button in VS to launch the external compiler and compile the code so I don't have to switch windows all the time as well.
If this is possible is it a very hard thing to accomplish?

Yes, this is certainly possible. You need to create a Visual Studio Shell add-in with custom language services and text editors. You need to install the appropriate Visual Studio SDK and then you'd continue to:
Create a custom Editor and/or designer
Add a language service
Add Project and Item templates
You're allowed to ship Visual Studio Isolated Shell with your application (license required and there are some limitations) so that your users don't need to have Visual Studio Professional installed.
There are a number of open-source projects that provide a custom editor, language services etc in Visual Studio, these could provide a nice place to research how things are done, next to teh Visual Studio SDK documentation:
PyTools, which is a Visual Studio editor for IronPython
Phalanger, which contains a Visual Studio editor for PHP
PoShTools, a Visual Studio service for PowerShell editing right inside Visual Studio
You'll probably want to dig into MsBuild as well, since Visual Studio will expect you to create a project file if you want to edit a collection of files and compile them. MsBuild could in turn call your own compiler, like it calls csc to compile C# code for example.
Creating Project Types

Related

Opening a VB6 project [duplicate]

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

What do I need to do to program an MFC/STL program in Visual Studio?

I've installed Visual Studio on my private PC, the version is "Microsoft Visual Studio Community 2019", version 16.1.6.
In order to prepare a job interview, I'd like to do some basic MFC/AFX programming, starting by the basic CMapStringToString example from the Microsoft website.
This, however, seems not to work, as I don't have access to the mentioned file afxcoll.h. Indeed: there is no file, called afx*.h on my PC.
Is this a limitation of my free downloaded Visual Studio installation, or is there any add-in, add-on, extension or whatever I can install in order to work with CMapStringToString objects?
Thanks in advance
You need to explicitly install MFC support in Visual Studio - which you can do on Community editions:
Open Visual Studio Installer from your Start Menu
Click the Modify button
Select the Individual Components tab
Scroll down to SDKs, Libraries and frameworks
Check the various MFC/ATL options for various platforms

Visual Studio macOS can't generate HTML documentation for Xamarin.Forms app

I have created a Xamarin.Forms application on a Mac, and I understand that there's a way to generate the methods and classes documentation into HTML. But most of the tools mentioned online do not seem to work on Visual Studio for macOS.
I've tried the recommended eVisual Studio Extensions MacOS version of Visual Studio does not seem to be able to implement Visual Studio extensions ( .vsix files).
Is there a way to generate documentation in Visual Studio?
Or do I have to move the project to a Windows machine with Visual Studio to Generate the docs?
There are a number of cross-platform html generation tools that support the XML document schema that MSBuild produces via:
globally in a solution via GenerateDocumentationFile in a prop file
the DocumentationFile filename property in individual projects .csproj
Tools such as Doxygen, DocFX, etc.. run on Windows|macOS|Linux, but these tools, outside of Windows, are mainly cmd-line based.
The ones that I use:
https://dotnet.github.io/docfx/
http://www.doxygen.nl
Do a Google/Bing for more alternatives.

Using Visual Studio (Isolated Shell?) to program ARM device

I want to use Visual Studio (maybe Isolated Shell) to create a custom IDE for programming a custom ARM-based device in C. The device has no OS and is being used like a microcontroller.
Atmel's AVR Studio 5 uses the Visual Studio 2010 Isolated Shell and I would like to do something similar. I am currently using a gcc-based ARM compiler.
I've already been through MSDN's documentation for extending Visual Studio, but I can't find anything specific to this task. Can someone give me an idea of how to approach this? For example, is there some way for me to leverage the Visual C++ editor without having to use Babel to re-teach Visual Studio about C?
MSDN documentation is not enough if you want to create a new IDE in fact. My personal suggestion is that you learn from existing large samples, such as this Python IDE,
http://pytools.codeplex.com/
It is designed by Microsoft, so it provides much useful information that does not appear in MSDN.
However, reusing Visual C++ editor means you cannot use only Visual Studio 2010 Isolated Shell (I think), as that may require some assemblies that only full Visual Studio has.

Why do Visual Studio solutions need to be upgraded with every release of Visual Studio?

This is easily one of the most annoying "features" of Visual Studio in its history and I don't understand why it exists -- ever.
Why would a CodePlex project need to care what version of Visual Studio I am using?
Off the top of my head, the only thing I can think of is that some versions of Visual Studio might introspect assemblies searching for attributes to determine what to display in "Visual Designers" and "Property Editors". But why would that cause Visual Studio to not be able to open the project and allow me to browse its contents and compile?
It seems to me like Open Source in .NET is somewhat limited by the stupid dependency management exhibited by Visual Studio. In other words, if I am using Visual Studio 2008 and you are using Visual Studio 2010, then we have different solution files.
http://blogs.msdn.com/b/visualstudio/archive/2010/03/15/why-does-visual-studio-2010-convert-my-projects.aspx
Here's an example from the site as to why Visual Studio converts your projects to 2010 format.
For instance, Visual Studio runs
custom tools such as single file
generators for designers in order to
output code representing the changes
made to the designer. Many of these
custom tools are upgraded or
completely replaced in the newer IDE.
During conversion, the IDE knows which
custom tools to replace or upgrade. In
order to make round-tripping work, VS
would need old and new custom tools to
understand each other so as to ensure
that old and new designers can work
side by side. Other than designers,
the following files would also be
affected: resource editors, wizards,
code snippets, item and project
templates, diagramming and modeling
tools, and many more.tools, and many more.
Since 2010 knows about what tools 2008 has, it can convert forward to be compatible with the custom tools 2010 uses. 2008 has no idea about what 2010 is using, how could it? Therefore, it is impossible to convert backwards since it doesn't know what it needs to convert, nor how to.
I believe the purpose of this touches on what you stated in your comments. If you are using 2008 and I 2010 and I compile it, how could you possibly run it again? 2010 is backwards compatible but 2008 has no way to make itself forward compatible.
Thus, by recompiling the project in 2010 I ensure that no 2008 user may mistakenly think they can compile it.

Resources