Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / October 2006

Tip: Looking for answers? Try searching our database.

Detect Project Type

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Parkinson - 11 Oct 2006 14:36 GMT
Hi,

Does anyone know how you can determine which type a project file in the
solution is? For example i have a C# Class Library, an ASP.NET 2.0 Website
and a VB.NET Class Library and I would like to differentiate between these
three.

I think the "Kind" property might hold this information but I couldnt find
any documentation of what all the different GUID's mean. Is there a
structure with translations for these GUID values?

Cheers,

David
Carlos J. Quintero [VB MVP] - 13 Oct 2006 08:37 GMT
You have some project GUIDs defined in VSLangProj.dll assembly, PrjKind
class. Others in VSLangProj2.dll assembly, PrjKind2 class. And you will have
to define others by hand.

About the Windows/Web distinction, you have to use
Project.Properties("Type") (IIRC) and compare to VSLangProj.prjProjectType
(Local/Web values).

Finally, you can distinguish a Web Site ASP.NET 2.0 because Project.Object
returns a VSWebSite object (VSWebSite.Interop assembly).

See also my article:

HOWTO: Get the language of a project or file from a Visual Studio .NET macro
or add-in
http://www.mztools.com/resources_vsnet_addins.htm

Signature

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com

> Hi,
>
[quoted text clipped - 10 lines]
>
> David

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.