Adding Reference to a Project from PMC

May 29, 2011 at 12:52 PM

hi,

I am trying to add a reference to a project form Package Manager Console but I am failing. I am doing it like as follows;

PM>$project = 'PerformanceMonitor'

PM>$project.Object.References.Add("System.Web"

Apparently, it is not the correct syntax. anybody knows how to do that?

May 29, 2011 at 12:58 PM

$project = get-project
That will get you the current. If you need to cycle through to find projects, I am sure there is a better way, but you can use $dte and look through the projects until you find the one you are interested in.

____
Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder

On May 29, 2011 7:52 AM, "tugberk_ugurlu_" <notifications@codeplex.com> wrote:
> From: tugberk_ugurlu_
>
> hi,I am trying to add a reference to a project form Package Manager Console but I am failing. I am doing it like as follows;PM>$project = 'PerformanceMonitor'PM>$project.Object.References.Add("System.Web") Apparently, it is not the correct syntax. anybody knows how to do that?
>
>
May 29, 2011 at 1:03 PM

@ferventcoder

this is so helpful. gets me on the right track. thanks a lot!