all groups > dotnet windows forms designtime > march 2006 >
You're in the

dotnet windows forms designtime

group:

Retrieving project location at designtime


Retrieving project location at designtime Thomas Due
3/20/2006 12:36:52 AM
dotnet windows forms designtime:
I am currently designing an extender which needs to save a file in the
project location. Any ideas on how I retrieve the project location at
designtime from a component?

--
Thomas Due
Posted with XanaNews version 1.18.1.0

"There is always some madness in love. But there is also always some
reason in madness."
Re: Retrieving project location at designtime InK_
3/29/2006 5:27:39 PM
Hi

try something like this:

EnvDTE.ProjectItem item =
(EnvDTE.ProjectItem)this.Site.GetService(typeof(EnvDTE.ProjectItem));

string path =
(string)((System.Array)item.DTE.Solution.SolutionBuild.StartupProjects).GetV
alue(0);

It will need also some processing...

--
Regards,
Inna Stetsyak aka InK_

[quoted text, click to view]


Re: Retrieving project location at designtime Thomas Due
4/3/2006 1:30:33 AM
[quoted text, click to view]

Wouldn't that require that the provider assembly references the EnvDTE
assembly (a designtime assembly) which in turn is referenced by the
project?

In others word won't I have a reference to a designtime assembly which
will carry over into runtime.

Is it possible to get the project name at design time without
referencing assemblies that will carry over into runtime?

It is not difficult to get the project name(assembly name) at runtime,
but I find it difficult getting it at designtime.

--
Thomas Due
Posted with XanaNews version 1.18.1.2

"I never give them hell. I just tell the truth and they think it's
hell."
AddThis Social Bookmark Button