473,395 Members | 1,484 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,395 software developers and data experts.

Can EnvDTE be imported into a VB application?

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 (EnvDTE.Project project in applicationObject.Solution.Projects)

{

LocalLines=0;

foreach (EnvDTE.ProjectItem item in project.ProjectItems)

{

count(item);

}

report.AppendFormat("{0}: {1} lines\r\n", project.Name, LocalLines);

Lines+=LocalLines;

}

Thanks,

Dean Slindee
Nov 21 '05 #1
3 2450
* "Dean Slindee" <sl*****@charter.net> scripsit:
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 (EnvDTE.Project project in applicationObject.Solution.Projects)


Add a reference to "Microsoft Development Environment 7.0" ("dte.olb"),
then import the namespace/class.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2
Hi,

http://msdn.microsoft.com/library/de...gdteobject.asp

Ken
----------------------
"Dean Slindee" <sl*****@charter.net> wrote in message
news:10*************@corp.supernews.com...
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 (EnvDTE.Project project in applicationObject.Solution.Projects)

{

LocalLines=0;

foreach (EnvDTE.ProjectItem item in project.ProjectItems)

{

count(item);

}

report.AppendFormat("{0}: {1} lines\r\n", project.Name, LocalLines);

Lines+=LocalLines;

}

Thanks,

Dean Slindee

Nov 21 '05 #3
Thanks to both of you, just what I needed.

"Dean Slindee" <sl*****@charter.net> wrote in message
news:10*************@corp.supernews.com...
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 (EnvDTE.Project project in applicationObject.Solution.Projects)

{

LocalLines=0;

foreach (EnvDTE.ProjectItem item in project.ProjectItems)

{

count(item);

}

report.AppendFormat("{0}: {1} lines\r\n", project.Name, LocalLines);

Lines+=LocalLines;

}

Thanks,

Dean Slindee

Nov 21 '05 #4

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

Similar topics

0
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...
0
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...
0
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)...
2
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...
3
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...
1
by: Gustavo De la Espriella | last post by:
Hi, I'm starting to build a wizard application that needs to add controls to a form using the EnvDTE library (in VB.NET). I guess it's something like what the Dataform wizard does. Is there some...
2
by: GS | last post by:
that causes this reference and redirect <assemblyIdentity name="EnvDTE" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0"/>
0
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...
6
by: =?Utf-8?B?TUNN?= | last post by:
What is the difference between importing a namespace at the: 1. Project level 2. web.config level 3. Page level What are the requirements/benefits of each? If I import a namespace such as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.