Visual Studio style editor for an application-specific scripting language? - c#

Right now I only know about Visual Studio 2008 Shell and the custom control used in the Snippet Compiler.
Also is VS shell suitable for this job? I don't know if it's a custom control or a standalone app? Any tutorials about it?
I would imagine the Snippet Compiler's custom control to be usable and therefore should work, but I still want to know if there are better alternatives out there?
It doesn't have to have everything like step through debuggers which the app itself doesn't support.
My editor will be similar to what Photoshop has for a script editor.

Have you looked at the Visual Studio SDK? Also, there are many resources available on Visual Studio Extensibility.

Related

Creating Visual Studio project system with MEF and VSIX

I'm looking to create a custom project system for Visual Studio. But some of the materials online have me somewhat confused. They all refer to VSPackages, and as far as I can tell, these are quite different things from VSIX. My existing extension functionality is offered through a VSIX. Is it impossible to offer a new project type through VSIX?
I also looked at their sample code and it's some hideous COM stuff. Is there no new shiny MEF stuff for projects like there is for extending the editor with syntax highlighting and stuff?
There is no MEF support/API for implementing support for a new project system. There are two ways you could go about implementing support.
Implement the Visual Studio API directly. This option is extremely complicated, but does not limit you to a particular build system or file format. If you choose this, you are basically on your own.
Use the Managed Package Framework (MPF) library as a starting point. This option is much easier, as long as you are restricted to using MSBuild for your project format and build system.
I'll assume you are going with option #2.
The MPF library was once part of the Visual Studio SDK, but eventually moved to CodePlex around the time Visual Studio 2010 was released. Rather than use that one, this post will focus on a version of this library that I modified and released on GitHub. This version of the library has many advantages over other previous releases, some of which are documented in the readme that shows when you follow this link.
Managed Package Framework for Visual Studio 2010
To implement support for your language, you'll need to do the following.
Implement command line MSBuild support for your language.
Create a project file.
Create one or more MSBuild *.targets necessary for building projects in your language.
This will likely involve creating an assembly to hold custom build tasks as well.
Create a VSPackage to implement support for your MSBuild project within the IDE. This will allow Visual Studio to open/save/close project files with the extension you chose.
Create one or more "Project templates" to allow users to create a new project for your language within the IDE.
Create one or more "Project Item templates" to allow users to easily add files to the project.
This answer only skims the surface right now, but you've asked a very broad question and unfortunately I don't have time right now to go into detail on all aspects of this.
Edit: Regarding deployment - you can and should include your VSPackage inside of a VSIX. However, since your extension will need to install MSBuild extensions in a location that user projects have standard access to (C:\Program Files\MSBuild or C:\Program Files (x86)\MSBuild), you'll have to wrap the whole thing in an installer to provide a custom installation. I recommend using WiX for this; it's not trivial but it's free, works exceptionally and reliably well, and isn't too challenging to use once you get the hang of it.
Unfortunately, Visual Studio API is really ugly. If you’ll make a deep integration with internal mechanisms of Visual Studio, you’ll have to use “hideous COM”. Directly or through managed wrappers (Interop Assemblies). To avoid confusion I try to explain concepts of Visual Studio Extensibility and post useful links to documentation. Hope it will help you.
You can extend Visual Studio by using macros, add-ins, VSPackages, and Managed Extensibility Framework (MEF) extensions. Starting with Visual Studio 2012, Visual Studio Extensions no longer supports macros! However, use VSPackages provide more opportunities. For more details see
MSDN: Walkthrough: Creating a VSPackage
MSDN: Creating Add-ins and Wizards
MSDN: Get Started with Extending Visual Studio
MSDN: Inside the Visual Studio SDK
MSDN: Developing Visual Studio Extensions
Starting with Visual Studio 2010, you can use MEF to customize the Visual Studio editor only. However, you can combine a MEF extension with a VSPackage. How to do it you can read the following links.
MSDN: Getting Started with Editor Extensions
MSDN: Managed Extensibility Framework in the Editor
In my opinion the use of MEF has minor advantages.
To create a custom project type for Visual Studio you should use Visual Studio Templates. This is technology separate from VSPackage and another extended methods. It allow Visual Studio to support new type of projects and add new project wizard.
MSDN: Creating Visual Studio Templates
CodePlex: Multi-Project Templates with Wizard: Visual Studio 2010 Sample
To distribute the package you can use VSIX or MSI files. Any of them can contain VSPackage, Visual Studio Templates, dependent libraries, icons, configuration files, etc. VSIX and MSI installers supported visualstudiogallery portal. However, Visual Studio can automatically update only VSIX file from the visualstudiogallery.
Visual Studio Blog: VSIX and MSI
MSDN: VSIX Deployment
MSDN: How to: Prepare Extensions for Windows Installer Deployment
Visual Studio Blog: VSIX Best Practices
By default, VSIX (as deployment package) and VSPackage (as start point of plugin) are in the same project, but you can divide into different projects or use msi instead vsix.

How to use the Visual Studio form designer for other windowing systems?

I'm creating a windowing system, comparable to WinForms or WPF, in XNA for a game I'm making.
Now, it would be nice to be able to use the Visual Studio form designer to make my windows.
I've googled a bit but I couldn't find anything. However, it might be possible because Microsoft uses the same basic designer interface/structure for many different things. (WinForms designing, WPF designing, Workflow designing, User Control designing, ...)
Is it possible to achieve this with Visual Studio's plugin system or will I have to make something custom to do it?
I don't know how you can use VS, but before starting to make something custom, I would recommend to take a look at http://sharpdevelop.net/opensource/sd/
Well, you must have a lot of programmers in your team if you intend to reprogram something like the Visual Studio forms designer on your own ;-)
In fact, I don't know if it will be possible with the VS plugin system, but if I were in your situation, I would use VS to create a Winforms or WPF GUI, and create a code generator which maps the code generated by VS to the classes of your windowing system. Most likely you will have to restrict yourself in using Winforms/WPF components for which you provide something similar in your framework.
I think it is very complicated things to do but you can do that.
At first you have to know about Visual Studio SDK.
Usually you have to download separately from the main products.
AFAIK CMIIW it is version dependent. So if you are installed VS 2010 with SP1 you have to use VS 2010 SP1 SDK.
The other you have to choose that is your products is isolated or integrated shell. The isolated means your shell will launch on separated vs 2010 instance(not in vs 2010). The example is SQL Server management studio from microsoft itself is isolated. Integrated shell means your products will integrated in VS 2010.
You can see on MSDN in here http://msdn.microsoft.com/en-us/library/bb166441(v=VS.100).aspx how to use that SDK.

Component library to create embedded Windows GUI like Visual Studio?

Is there a component library (free or commercial) to do so ?
I don't want to develop a programmers editor so Visual Studio Shell won't fit I think, I just want the GUI Window system alone for example for drawing charts with panels on the left to configure the charts.
I'm beginner so I prefer something that is well documented.
We use WeifenLuo DockPanel Suite (link) which provides a VS like window environment. It's open source so we've been able to modify it to support a bunch of new features as well.
Yes. There's Visual Studio Isolated Shell, and Visual Studio Integrated Shell: http://msdn.microsoft.com/en-us/library/bb685612.aspx

Design tool for ASP.Net Pages

I am looking for some tool so that I can design my web pages(layout, color etc...). Does anything exist like that? (Other than Visual Studio, Dreamweaver...)
(I dont want to write css for now)
Dreamweaver I hear helps with that. I use Visual Studio and create CSS files.
Dreamweaver: http://www.adobe.com/products/dreamweaver/
Visual Studio: http://www.microsoft.com/exPress/download/
How about Visual Web developer? You can download the express edition for free
Visual Studio Express (Free), Expression Web and lots more . Do you have any particular requirement?
Tools used to create the design are usually Adobe Illustrator, Photoshop or equivalents, these will help create the images and can build basic layouts.
You can use Dreamweaver or equivalent to build layouts but if you are doing a lot of databinding you may want to use visual studio too.

Visual Studio 2005/2008 Add-In

I am writing a plug for Visual Studio 2005/2008. I want gain access the controls in the following picture:alt text http://img145.imageshack.us/img145/2773/82813838.jpg
How do it ?
Intellisense in Visual Studio 2008 also works for javascript source code. You don't need an extra add-in for that but rather just documentation file for your javascript. It will also work for Prototype library but you won't have any documentation nor will it work in chaining multiple functions, because it doesn't know return types.
Anyway, this should be a nice start (since it's for 1.6.0 RC1 version):
Prototype VS2008 Intellisense

Categories

Resources