473,372 Members | 989 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

EnvDTE and EnvDTE80

I am using Visual Basic Express (May release) and I am trying to create a
solution programatically. How do I do this? I know I need to use the
AddFromTemplate but how do I determine the path to the template that I want
to use, let's say the template is the "winfxapplication" template, which on
my machine is

"C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\VBExpress\ProjectTemplatesCache\1033 \WindowsApplication.zip\windowsapplication.vstempl ate"

Or do I point it at the .vbproj file:

"C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\VBExpress\ProjectTemplatesCache\1033 \WindowsApplication.zip\windowsapplication.vbproj"

I'm assuming there are just a few lines of code required. First of all, I
want to create a VS2005 object. I have tried:

Dim env As EnvDTE80.DTE2 =
CType(Microsoft.VisualBasic.Interaction.CreateObje ct("VisualStudio.DTE.8.0",
""), EnvDTE80.DTE2)

but that tells me it cannot create the ActiveX object. I then tried:

Dim env As EnvDTE.DTE =
CType(Microsoft.VisualBasic.Interaction.CreateObje ct("VisualStudio.DTE.7.1",
""), EnvDTE.DTE)

and that creates the object, so when I do this:

ENV.Solution.ADDFromTemplate("C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\VBExpress\ProjectTemplatesCache\1033 \WinFXApplication.zip\WinFXApplication.vbproj",
"e:\mytests", "myproject.vbproj")

I get the message "The file blah blah is not a valid project file. The
project file is missing the 'VisualStudioProject' section." whatever that

I think I am on the right track here, can anybody out there just straighten
me out on this? I am starting to tear my hair out.

Thanks in advance,

Jul 21 '05 #1
0 2916

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: LC | last post by:
Hi There, I had made a Form Generator AddIn with EnvDte. Its all working well generating TextBox, CheckBox, ComboBox, etc, etc. Now I want the generator to make my forms using my UserControls...
by: Jindrich Hora | last post by:
This code is in MSDN as example for attach to active instance EnvDTE.DTE. (example in C#) EnvDTE.DTE myDTE = (EnvDTE.DTE)...
by: Christina Androne | last post by:
Hi Has anybody encountered this: EnvDTE.DTE env = new EnvDTE.DTE(); raises this exception: {"COM object with CLSID {3C9CFE1E-389F-4118-9FAD-365385190329} is either not valid or not...
by: amit | last post by:
I am using the ENVDTE object of dot net for a tool creation for Find and replace like tool. this works fine during debug mode but gives problems when u run it outside the development environment....
by: Allen Anderson | last post by:
due to some installer problems, I need to ship envdte.dll and put it on a client machine briefly during the install of one of my controls. Does anyone know if ms restricts the redistribution of...
by: Dean Slindee | last post by:
I would like to count lines in a project using code in a VB form. Need EnvDTE as an Imports statement. Can this be done? If so, I would then recode the following into VB: foreach...
by: Richard | last post by:
I am using Visual Basic Express (May release) and I am trying to create a solution programatically. How do I do this? I know I need to use the AddFromTemplate but how do I determine the path to the...
by: GS | last post by:
that causes this reference and redirect <assemblyIdentity name="EnvDTE" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/> <bindingRedirect oldVersion="" newVersion=""/>
by: Gerrit Beuze | last post by:
Hi all, I'd like to get at the real underlying type when using the EnvDTE.Debugger Currently I do this: EnvDTE.Thread thread = dte.Debugger.CurrentThread; foreach (StackFrame frame in...
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.