Anyone know of any examples on creating plug in's for VS2008 - preferably with VB.net?
If you can wait for VS2010, it should be lot easier because of new extensibility framework they use (MEF). Basically the extensibility hooks are now managed and are very decoupled.
Otherwise, I know this framework. I have never used it.
Or you can use the "Visual Studio Add-in" project template included in VS2008 ( File > New Project > Other project types > Extensibility > Visual Studio Add-in). It is hard to learn and debug, but it works.
Finally, if it is for internal use, you can just create simple VS macros that reference normal .Net assemblies. This is how I do internal extensibility projects because there is zero friction. You just create small macros that call your assemblies (to show a Windows Forms dialog for instance). Then you add that macro to VS toolbar or define a keyboard shortcut for it.
I hope this helps
Related
I successfully created in VB6 the VB6_IDE_Add_In, that has references to Microsoft "Visual Basic 6.0 Extensibility". However, to use this add-in in VBA IDE (Excel, Access) I obliged to make a copy of VB6_IDE_Add_In project, rename it to VBA_IDE_Add_In, rename its properties etc. and, the main, change mentioned reference to "Microsoft Visual Basic for Applications Extensibility 5.3".
Finally I have two dll - the one for VB6, and the second - for VBA. Both of them I must to "regsvr32" and manually move VBA-IDE-Add-In registry key from VB6 key "[HKCU\Software\Microsoft\Visual Basic\6.0\Addins]" to VBA key [HKCU\Software\Microsoft\VBA\VBE\6.0\Addins]...
Is there a way to compile a single dll that will use right reference accordingly to the VB6 or the VBA environment, using conditional compilation or command line parameter?
Unfortunately, this is my first add-in and my experience is insufficient in this matter...
I doubt you'll be able to compile a single add-in in VB6 for VB6 and VBA, as both libraries share the same name VBIDE and your VB6 project won't allow two references with the same name. MZTools 3.0, when it was written in VB6, used to publish a version for VB5 (which uses yet another, earlier version of VB extensibility library), VB6 and VBA. Since the release of MZ Tools Version 8, the source has been migrated to .NET, and it is much easier to support multiple environments and 32-bit/64-bit versions of VB/VBA hosts.
You would be wise to follow the lead, and develop a solution using .NET. A .NET solution like MZ Tools, or Rubberduck VBA, can be used by 32-bit and 64-bit hosts, and by creating your own Interop Assemblies (and embedding their types) from the VBIDE type libraries, you can create a single dll for VB5, VB6 and VBA.
Rubberduck VBA hasn't yet added support for VB6, but we're working on it:
Shared VB6 and VBA extensibility add-in with OnConnect and OnDisconnect handling
Does anyone know if the code editor used by VSTO IDE is available to use in my own projects?
I need to use a code editor in my project. I Googled to try to find one, but I found several third party solutions (pay or free) but they don't fit my needs.
In same way as Webbrowser control, is the "sourcecodeeditor" control of VSTO available to use as a project component?
In same way as Webbrowser control, is the "sourcecodeeditor" control of VSTO available to use as a project component?
[. . .]
Exists the class "MSVSTOSourceCodeEditor"? This is the question. Thanks
Unfortunately, no. Microsoft doesn't allow you to subclass its source code editor, nor do they provide a version for use in your own projects. As I mentioned before, they don't really want to encourage you to rewrite Visual Studio. They'd prefer that you bought it instead!
Have you considered creating a plug-in or extension for Visual Studio instead? It's a little bit different way of going about it, but it just might work for you. Your developers might find it more convenient since they won't have to switch back and forth between two programs.
If you're really set on rolling your own custom solution, probably the best thing to do is check the source code for some of the open-source, Visual Studio-style IDEs, and see how they've written the code editor:
MonoDevelop
SharpDevelop
KDevelop
Is it possible to have visual studio 2010 automatically add namespaces to classes within folders just like c#?
No this is not possible with the VB.Net project system. I would encourage you to share this opinion with the Visual Basic IDE team. They closely monitor suggestions and I know this has come up in the past (although I don't know if there is a current outstanding request for it).
http://connect.microsoft.com
We are in the process of creating active-x controls used within our application.
Since Microsoft stopped supporting classic Visual Basic, is it wise to use Visual Basic to develop the Active X control or the latest VC++/ATL/MFC libraries provide more feature where we can create controls faster by leaving Visual Basic flexibility?
We will not be able to use .NET/VB.NET/C# since the application is supposed to work inside containers and containers may not support latest .NET runtime.
Any other language is best fit for Active X control development other than VB and VC++?
I, personally, would recommend using Delphi for this. It is still actively developed, and has the control you get with C++, but a rapid development environment more like VB.NET.
#nobugz: If you are really interested what is ActiveX in Delphi, look at docwiki. Normally it is 100% source code (yours + VCL, VCL is also available as sources) with autogenerated COM wrappers. So all potential security problems are also in source code. If you find a security problem in VCL, please send a bug report to Quality Central.
Here is a good example on how to create ActiveX Controls with C# .NET
http://www.codeproject.com/KB/cs/CreateActiveXDotNet.aspx
By all means VB6 is the best language. After reading your question I feel that you are a VB6 developer. If you know VB6 and use it then why hesitate using it for producing ActiveX controls.
I program in Delphi as well as VB6 along with VB.NET and C# but creating ActiveX controls is the easiest in VB6 compares to all other development tools.
If you are hell bent on not using VB and if you are looking for an alternative then try out PowerBasic (commercial - very costly) or PureBasic (commercial but affordable) Get it from here or better still MinGW (a GNU C++ compiler).
I have to say that VB6 with a good book like Developing COM/ActiveX Components with VB6: A Guide to the Perplexed you will be up and running faster.
I have an ASP.NET VB.NET web project that references a VB.NET class library.
I add a new property to a class in the class library, then, from the web app, I expect to be able to use it immediately w/o errors and with full intellisense.
It used to work in 2008.
When I compile the class library, it becomes available but not until.
Was this nice feature taken away, perhaps in the interest of speed?
What's likely happening here is that the Class Library and ASP.Net applications are targeting different versions of the framework. If they are using incompatible versions of the framework then VB.Net will treat it as a file reference instead of a project reference and would give you the behavior you're seeing.
Right click on the project, select the Appilication Tab and make sure that both have the same value selected for Target Framework. That should fix the problem.
Visual Studio 2010 will officially launch on April 12, 2010. I'd say there's a good chance that problem will be fixed in it. Go see.
EDIT: corrected the date.