Embed Visual Studio editor into my app - c++

Is it possible to embed Visual Studio 2010 (Express ?) source code editor into my application.
What is another most preferred way to interconnect my application with Visual Studio?
Don't want to embed my app into visual studio for some religious reasons =)

If you don't want to make your application a plug-in then make a plug-in that provides an interface for your application using some sort of IPC.
Also see Embed Visual Studio 2010 Editor into a Tool Window. As far as I understand, application has to be a plug-in/extension in order to do that.

MSDN How to: Get References to the DTE and DTE2 Objects
http://msdn.microsoft.com/en-us/library/68shb4dw.aspx
is interesting starting point for solving my problem.

Related

Visual Studio 2017 - can't find Visual C++ Windows Forms

So, I'm in awkward situation - I wanted to create Windows Form App using Visual Studio, but I can't find any place to create Visual C++ Windows Form template. I tried even to reinstall Visual C++, add other libraries and search answer online - no results.
I can of course create new Winforms in C#:
But not in C++:
Also, all possible modules in Visual Studio Update was checked:
I tried even add template from Online list:
What should I do next? I use Visual Studio 2017 Community Edition.
Ok, I found a working way to creating Windows Forms in Visual Studio 2017.
Create new CLR Empty Project:
Add .cpp file for main function.
In project add new item from UI->Windows Forms:
(If we didn't add main loop before the error will occur)
Now we can add new elements to form from the Toolbox to the left (i spent measurable time looking for that).
To run application we have to declare this instead of main function:
Also we need to tell Visual Studio that we are making Windows Application instead of Console Application:
WinForms designer support for C++/CLI was dropped a long time ago in VS 2012. MS suggests using C# for your WinForms code, and only use C++/CLI if you need to interop with native code.
And if you do end up using C++/CLI for interop, keep that layer as small as possible. It's a second-class citizen in the .NET world and isn't even mentioned in Microsoft's recent post on their language strategy.

Word (Office) Automation Visual Studio 2013 C++

I have to make a program which can operate with Word documents (edit, view, create) and use C++ with Visual Studio 2013.
I have searched the net and found out VSTO is only available for Visual Basic and C#.
On the Microsoft site there is "How to create an automation project using MFC and a type library" here but seems it is written for very old versions of Visual Studio (like 5.0 and 6.0). When I reach the ninth step "Select the Automation tab." it seems there is no such tab in ClassWizzard in my version of Visual Studio.
Is there any way to perform automation with C++ in newer versions of Visual Studio like 2013?
I found a way here. Actually I am using the "import" method and it worked for me in console mode(COM method also worked, but it seems to me more complicated), I haven`t tested it for GUI yet. There is not C++ documentation, but can be used Visual Basic API with a bit thinking here.

Visual Studio 2010/2012 Add-in Project Questions

I have already created a simple source code analyses tool for C/C++, but I wanted it to be an extension or tool for Visual Studio 2010 and 2012 editions. It is written completely in C++. For this reason I created it using "Create an Add-in using Visual C++/ATL" option. And then under "Choose Add-in Options", I have some problems. I don't know which one or ones to select. I want it to have a name and icon under Tools section, but on the other hand, my code analyzer can be used from command line too. If someone can advice me which option(s) to select there I would be glad.
My second question is this, when I have opened a source file in Visual Studio, and if I go to Tools -> MyAddin, and press it, I want it to do its job and analyze the code, and show the results in the output section below.
And my last question is that, if I have a C/C++ project with few files let's say, and if I right-click one of the files, I want to see my add-in and be able to execute the add-in from there, not to go always to Tools -> MyAddin. And also the same thing to work if I right-click the project, then it should analyze the all files and show the problems in the output section.
Please note that I have already created the source code analyzer tool in C++, and I have it as a DLL. I can also use it in Linux from terminal, and if I want I can also create a GUI for it, which I plan to do later. But I'm not that much experienced with Visual Studio, especially about add-ins, that's why I need your help. As you can see my first question is a kind of advice, but I think my second and third questions require some source code. I know that it is very hard for you to give me some help without seeing my code, but if you would help me somehow I would be glad.
For Visual Studio 2010 and 2012 you should consider using Extensions, not Add-Ins. It is a new technology introduced in Visual Studio 2010. Extensions come in form of a VSIX packages and are automatically installed in all applicable versions of Visual Studio. If you are not targeting Visual Studio version prior to 2010, I strongly recommend using extensions.
From this point of view, I will not answer any of your technical questions about Add-Ins. Here are a couple of links to start using extensions instead:
Anatomy of a VSIX Package
Building and publishing an extension for Visual Studio 2010
VSX FAQ
Walkthrough: Creating an Options Page
I think you will find valuable information on this topic here: Developing extension packages for Visual Studio 2005/2008/2010/2012 using C# with real-life samples

How to create interface for C++ application with XAML?

How to create interface for C++ application with XAML? (I SEARCH FOR SOME APP LIKE EXPRESSION BLEND (OR even beter a plug in for it))
Visual Studio Pro 2008 does support C++ .Net and XAML interface designer so it should do what you are looking for.
PS : Visual Studio 2010 is going to be released soon. I never tried XAML with this one but it should have a better support.

Is there a way to get Visual Studio to unload dlls?

I have a Visual Studio 2008 project with some legacy native C++ DLL projects, and some newer WPF projects that use the DLLs. When I open the WPF xaml windows in the designer, Visual Studio loads up the native DLLs to be able to display the window.
The problem is, is that if I now need to make a change in the legacy DLLs, I need to close all the WPF windows and restart visual studio to be able to build them. Obviously, I need to close the tabs that are using the DLLs, but after I do that, is there a way to tell Visual Studio to unload those DLLs without a full restart?
I've had similar problems. A little bit better than restarting is removing references to the dlls, then adding the references back in.
Sounds like a bug in VS. You could try getting VS 2008 SP1 to see if that fixes it.
Otherwise, go here and report it: http://connect.microsoft.com/VisualStudio. They'll help with any workaround if there is one.