I need to change the value of Copy local based on the active configuration,
below is the solution I was given to do this, but it requires I manually
edit the project file.
This is where the add in comes into play, I am able to get the list of
references and such from the project object, so I've got it started at
least. However, I'm having trouble with the following:
1) How to add the CopyLocal to the property Configuration once I have the
config (know how to get that)
2) How to retrieve the CopyLocal from the Configuration (probably will be
obvious once item 1 is working)
3) How to set the Private property to $(CopyLocal) once the configs have the
value all set up
4) How to know that private is set to $(CopyLocal) vs. True/False.
Thanks
Wayne
You can conditionally set a property on a basis of current configuration:
Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "
At the top of your *.csproj or *.vbproj you'll find a per configuration
section, so you can just add a new property to that section:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'Debug|AnyCPU' ">
<CopyLocal>true</CopyLocal>
</PropertyGroup>
Using this you set the Private attribute on the references on the basis of
the current configuration. If the private attribute is true the "CopyLocal"
is set to true.
<ProjectReference Include="..\MyProj.csproj">
<Project>{A4E9A2C2-....}</Project>
<Private>$(CopyLocal)</Private>
</ProjectReference>
Carlos J. Quintero [VB MVP] - 21 Mar 2006 16:28 GMT
I answered in the Microsoft forum for Visual Studio 2005 extensibility.
http://forums.microsoft.com/msdn/showforum.aspx?forumid=57&siteid=1

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 change the value of Copy local based on the active
> configuration, below is the solution I was given to do this, but it
[quoted text clipped - 39 lines]
> <Private>$(CopyLocal)</Private>
> </ProjectReference>
Wayne Sepega - 21 Mar 2006 19:07 GMT
Saw that, I also replied to your reply there as well :)
Wayne
>I answered in the Microsoft forum for Visual Studio 2005 extensibility.
>
[quoted text clipped - 43 lines]
>> <Private>$(CopyLocal)</Private>
>> </ProjectReference>