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

DTE get all using statement

P: n/a
I am writing an automation utility with the DTE model in C#. I need
to open up a C# file and read all the "using statements" contained in
that file.
I do not see a way to be able to do this with the ProjectItem.

Have I missed something? Can someone please suggest a way to
accomplish this?
Thanks.
Nov 16 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
> I am writing an automation utility with the DTE model in C#. I need
to open up a C# file and read all the "using statements" contained in
that file.
I do not see a way to be able to do this with the ProjectItem.

Have I missed something? Can someone please suggest a way to
accomplish this?

For what do you need all using statements?

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
Nov 16 '05 #2

P: n/a

I am auto-generating the C# files. In the generation I have tied the
using statement to the reference assemblies I have created.

For example:
If I parse the following line
using Utility.Logger;
I will need to add the following reference
Utility.Logger.dll

Besides opening and reading the file line-by-line to parse the using
statement lines...can someone suggest a better alternative?

Thanks,
Ha


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3

P: n/a
> I am auto-generating the C# files. In the generation I have tied the
using statement to the reference assemblies I have created.

For example:
If I parse the following line
using Utility.Logger;
I will need to add the following reference
Utility.Logger.dll

Besides opening and reading the file line-by-line to parse the using
statement lines...can someone suggest a better alternative?

I have no clue what a DTE model is, but you could explain it to me.
However why don't you just use reflection on the correcponding assemly to
get the namespaces of the classes?

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.