By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,870 Members | 1,224 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,870 IT Pros & Developers. It's quick & easy.

Can EnvDTE be imported into a VB application?

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
* "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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.