Updating Assembly information with MSBuild failing


i am trying to automatically update the assembly information of a project using AssemblyInfo task, before build however the target appears to do nothing (no failure/error) just no update/creation

Below is the build.proj file I am using (obviously some contents altered)

Can anyone help?

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build"  

  <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
  <Import Project="$(MSBuildExtensionsPath)\Microsoft\AssemblyInfoTask\Microsoft.VersionNumber.targets"/>

    <SolutionsToBuild Include="Infrastructure.sln"/>

  <Target Name="Build" DependsOnTargets="ChangeDataAccessAssemblyInfo">
    <RemoveDir Directories="$(BuildDir)\Builds" Condition="Exists('$(BuildDir)\Builds')" />
    <MSBuild Projects="@(SolutionsToBuild)" Properties="Configuration=Debug" Targets="Rebuild" />

    <TestAssemblies Include="Build\Logging\Logging.UnitTests.dll" />

  <!--<UsingTask TaskName="NUnit" AssemblyFile="$(teamcity_dotnet_nunitlauncher_msbuild_task)" />
  <Target Name="Test" DependsOnTargets="Build">
    <NUnit NUnitVersion="NUnit-2.4.6" Assemblies="@(TestAssemblies)" />

  <Target Name="ChangeDataAccessAssemblyInfo" >
    <Message Text="Writing ChangeDataAccessAssemblyInfo file for 1"/>
    <Message Text="Will update $(BuildDir)\DataAccess\My Project\AssemblyInfo.vb" />
    <AssemblyInfo CodeLanguage="VB"
       OutputFile="$(BuildDir)\DataAccess\My Project\AssemblyInfo_new.vb"                
       AssemblyTitle="Data Access Layer"
       AssemblyProduct="the project"
       AssemblyCopyright="Copyright notice"
       Condition="$(Revision) != '0' "
       ContinueOnError="false" />

    <Message Text="Updated Assembly File Info" 


I think you are missing the specification of the AssemblyInfoFiles attribute on your AssemblyInfo task. Here's how it looks on a project I'm working on...

<Target Name="AfterGet">
	<Message Text="In After Get"/>

	<CreateItem Include="$(SolutionRoot)\Source\SomeProject\My Project\AssemblyInfo.vb">
		<Output ItemName="AssemblyInfoFiles" TaskParameter="Include"/>

	<Attrib Files="@(AssemblyInfoFiles)"

	<AssemblyInfo AssemblyInfoFiles="@(AssemblyInfoFiles)"

What we're doing is first using to create a property that contains the name of the file we'll be updating. We have to do this via createItem because when we start the build the file doesn't exist (and that is when MSBuild evaluates the and definitions in your build file.

We then take the readonly bit off the file.

Finally we invoke the AssemblyInfo task passing it the file(s) to update and a custom assembly name that we want to give it (in this case we put the TFS build label into the Assembly Description field so that we can easily tell which team build the assembly came from.

Need Your Help

Gtk# NodeView colored rows

c# monodevelop gtk#

I use NodeView object to output data to user in this way (Gtk# tutorial):

H1 Bottom Border Underline

html css

I am having an issue where I am trying to underline my h1 with a border-bottom, but it extends behind my picture (to the left). I would like the underline to extend to the very end of the page. Her...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.