Grant,
 
If you replace the 
 
  <AssemblyInfo CodeLanguage="CS"
   OutputFile="@(AssemblyInfos)"
   AssemblyTitle="$(BuildType)"

with 
 
  <AssemblyInfo CodeLanguage="CS"
   OutputFile=%(AssemblyInfos.FullPath)"
   AssemblyTitle="$(BuildType)"

It should cause it call the task to be called multiple times.
 
Cheers

Chris
 
Chris Burrows
Readify | Senior Consultant
 
Suite 206 Nolan Tower | 29 Rakaia Way | Docklands | VIC 3008 | Australia 
M: +61 404 254 654 | E: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>  | C: 
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>  | W: www.readify.net 
<http://www.readify.net/> 

________________________________

From: [EMAIL PROTECTED] on behalf of William Bartholomew
Sent: Mon 15/01/2007 12:59 PM
To: [email protected]
Subject: RE: [OzTFS] MSBuild AssemblyInfo community task



Grant,

 

Have a look at the definition of OutputFile in their documentation (or 
Reflector), if it's a TaskItem then MSBuild will call the task once for each 
AssemblyInfo, if it's a TaskItem array then MSBuild will only call it once.

 

William

 

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grant Holliday
Sent: Monday, 15 January 2007 11:51 AM
To: [email protected]
Subject: [OzTFS] MSBuild AssemblyInfo community task

 

Has anybody had any experience with the AssemblyInfo task from the 
msbuildtasks.com guys?

 

I'm trying to run the task for all AssemblyInfo.cs's in the BeforeCompile 
override.

 

<Target Name="BeforeCompile">
 <Target Name="AssemblyInfo">
    <CreateItem Include="$(SolutionRoot)\**\AssemblyInfo.cs">
      <Output ItemName="AssemblyInfos" TaskParameter="Include"/>
    </CreateItem>

    <Attrib ReadOnly="false" Files="@(AssemblyInfos)" />

    <AssemblyInfo CodeLanguage="CS"
   OutputFile="@(AssemblyInfos)"
   AssemblyTitle="$(BuildType)"
    />  
</Target>

 

But I'm getting an error:

error MSB4018: The "AssemblyInfo" task failed unexpectedly.
error MSB4018: System.IO.PathTooLongException: The specified path, file name, 
or both are too long. The fully qualified file name must be less than 260 
characters, and the directory name must be less than 248 characters.

 

After checking the contents of @(AssemblyInfos), none of the individual paths 
are more than about 120chars. But the total string would be much longer.

 

I suspect the OutputFile attribute doesn't like outputting multiple files.

 

How would I call the AssemblyInfo task for each AssemblyInfo.cs in 
@(AssemblyInfos) ?

 

 

Grant

OzTFS.com - to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject.
Powered by mailenable.com - List managed by www.readify.net OzTFS.com - to 
unsubscribe from this list, send a message back to the list with 'unsubscribe' 
as the subject.
Powered by mailenable.com - List managed by www.readify.net 



OzTFS.com - to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject.

Powered by mailenable.com - List managed by www.readify.net

Reply via email to