Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-08-2006, 09:24 AM
dmeans dmeans is online now
Registered User
 
Join Date: 02-08-2006
Posts: 4
Updating AssemblyInfo File

My VB 2005 projects have an AssemblyInfo.vb file, which is specific to each project, and a CommonAssemblyInfo.vb file which is shared across all projects. I have a "Make VS.NET" step to build each project. In those steps, I'm setting the Company and Copyright properties.

The problem is that these properties are being written in both the AssemblyInfo.vb file and the CommonAssemblyInfo.vb file, resulting in a build error for each setting:

error BC30663: Attribute 'AssemblyCompanyAttribute' cannot be applied multiple times.

Should VBP be updating both files? I'm using VBP 6.0a.

Thanks.
Reply With Quote
  #2  
Old 02-08-2006, 01:13 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
The Make VS.NET action will currently match and update versions/properties in any source files named like *AssemblyInfo.*. This should probably be restricted to match on AssemblyInfo.* instead. For now, a few workarounds:

1) Create a separate Make VS.NET step (with Don't build checked) to set properties on the CommonAssemblyInfo file (and don't set those properties from the step that builds the solutions).

2) Set your build step(s) to not set those properties, then use a Process Files steps to iterate over all AssemblyInfo.* files, and a child Make VS.NET step (with Don't build checked) to set versions/properties as desired.

3) Rename your common files to not end in AssemblyInfo.vb (i.e., AssemblyInfoCommon.vb, CommonInfo.vb, CommonProperties.vb, etc.)
Reply With Quote
  #3  
Old 02-09-2006, 08:58 AM
dmeans dmeans is online now
Registered User
 
Join Date: 02-08-2006
Posts: 4
Thanks for the quick response. What I ended up doing was updating the CommonAssemblyInfo.vb file first, then checking it back in. Then I do a "get latest" on all projects so that the updated file is pulled down into each project folder. Then I set my build steps not to update the project properties. It seems to be working now.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 05:43 AM.


Copyright © 1999-2023 Kinook Software, Inc.