Changing the AssemblyName property causes referenced projects output assemblies to have the same exact name?


  • Basically here is what I am seeing:

    I have a C# Winforms application (MainProject) that references 2 other projects (Project1, Project2).  When I call the Build target for MainProject.csproj with a new AssemblyName (Test) it builds Project1 and Project2 and tries to output their assemblies as Test.dll (rather than Project1.dll and Project2.dll as specified in the project properties)

    <MSBuild Projects="MainProject.csproj" Targets="Build" Properties="AssemblyName=Test;" />

    This leads to the following error because because Project1 is version and Project2 is version 

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets : warning MSB3243: No way to resolve conflict between "Test, Version=, Culture=neutral, PublicKeyToken=ddbe980ea63b8a34" and "Test, Version=, Culture=neutral, PublicKeyToken=ddbe980ea63b8a34". Choosing "Test, Version=, Culture=neutral, PublicKeyToken=ddbe980ea63b8a34" arbitrarily.

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets : warning MSB3247: Found conflicts between different versions of the same dependent assembly.

    Why are the referenced project being built with the passed in AssemblyName?  How do I change the assembly name using the MSBuild and keep my referenced assemblies named to their original names?



    Wednesday, July 19, 2006 7:27 PM