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

    Question

  • 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 1.0.11.0 and Project2 is version 1.0.2.0. 

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets : warning MSB3243: No way to resolve conflict between "Test, Version=1.0.11.0, Culture=neutral, PublicKeyToken=ddbe980ea63b8a34" and "Test, Version=1.0.2.0, Culture=neutral, PublicKeyToken=ddbe980ea63b8a34". Choosing "Test, Version=1.0.11.0, 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?

    Thanks!
    Mike

     

    Wednesday, July 19, 2006 7:27 PM

Answers