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 / June 2006

Tip: Looking for answers? Try searching our database.

Getting the solution name from a project wizard

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mattias Beermann - 12 Jun 2006 03:28 GMT
I need to get the name of the solution from my wizard that implements IWizard.

I've tried to use:
string name = dte.Solution.FullName;

...but it returns an empty string. Is there some way to do this except
parsing the path of the project?
Carlos J. Quintero [VB MVP] - 12 Jun 2006 09:10 GMT
Hi Mattias,

Solution.FullName may return "" in the following cases:

- If there is no solution loaded (although DTE.Solution never returns null,
always return an instance and you can use Solution.IsOpen to know if there
is a solution loaded or not).

- If the solution is not saved yet. This is the case of temporary solutions
of VS 2005

Are you in one of those cases? What kind of wizard are you using (Project  /
ProjecItem / Custom ?)

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

>I need to get the name of the solution from my wizard that implements
>IWizard.
[quoted text clipped - 4 lines]
> ...but it returns an empty string. Is there some way to do this except
> parsing the path of the project?
Mattias Beermann - 13 Jun 2006 07:04 GMT
Hi again,

I have a .vstemplate file with the type "ProjectGroup". The wizard is
started from this file. The runKind parameter has the value "AsMultiProject"
(in the method RunStarted).

I'm trying to get the name of the solution from the RunFinished() method.

I just found out that I can get it from:
((SolutionClass)dte.Solution).Properties.Item("Name").Value

Regards,
Mattias

> Hi Mattias,
>
[quoted text clipped - 18 lines]
> > ...but it returns an empty string. Is there some way to do this except
> > parsing the path of the project?

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.