|
#1
|
|||
|
|||
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. |
#2
|
|||
|
|||
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.) |
#3
|
|||
|
|||
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.
|
|
|