Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] Third Party Tools (https://www.kinook.com/Forum/forumdisplay.php?f=3)
-   -   Updating AssemblyInfo File (https://www.kinook.com/Forum/showthread.php?t=1540)

dmeans 02-08-2006 08:24 AM

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.

kinook 02-08-2006 12:13 PM

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.)

dmeans 02-09-2006 07:58 AM

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.


All times are GMT -5. The time now is 03:31 AM.


Copyright © 1999-2023 Kinook Software, Inc.