tags:

views:

7

answers:

1

Hi,

I got an another query.

I am doing a UI to create precompiled assemblies for different framework using MSBUILD.My questions are as follows.

1.How to change the "AssemblyVersion" attribute in Assemblyinfo file through.Is there any properties available or i have to step down into the file and change that attribut.

2.If i have references to other dll,such as for example i have created two seperate dll, x.dll and y.dll and i have added that to "z" project .how to resolve these references,if it is not resolved how can we get notified.

Thanks for your help.

Regards, Lokesh.

A: 

But are you usign MSBuild to create those assemblies, or what? If you want to change AssemblyVersion attribute from the MSBuild script:

<Target Name="VersionAssemblies" DependsOnTargets ="GetAssemblyInfos">
<Attrib Files="@(AssemblyInfos)" ReadOnly="false"/>
<FileUpdate Files="@(AssemblyInfos)" Regex="AssemblyFileVersion\(&quot;[^&quot;]*&quot;\)"
            ReplacementText ="AssemblyFileVersion(&quot;$(ParamYear).$(ParamMonth).$(ParamHour).$(ParamSecond)&quot;)" />
<FileUpdate Files="@(AssemblyInfos)" Regex="AssemblyVersion\(&quot;[^&quot;]*&quot;\)"
            ReplacementText ="AssemblyVersion(&quot;2.0.$(DefinedBuildNumer).$(ChangesetNumber)&quot;)" />

Leszek Wachowicz