Requirement: We need to update AssemblyInformationalVersion which we have placed in a SharedAssemblyInfo.cs file with other common attributes like company etc. The shared file then added to the projects as link in properties as sibling to AssemblyInfo.cs.
Issue faced: Whenever we tried to run task (MSBuild.ExtensionPack.Framework.AssemblyInfo) from MSBuild target file (shown below) we got an error that AssemblyVersion is not present. This issue was obvious as AssemblyVersion and AssemblyFileVersion attributes are present in AssemblyInfo.cs file only, which is associated per project. So, we did the following (but, even that didn't fulfilled our motive):
Solution: To accomplish our goal we made few changes to the AssemblyInfo class' Execute method. We have attached the same in zip. In this we have added a flag which is being set when we have the SharedAssemblyInfo.cs file as input. In that case it updates AssemblyInformationalVersion only and skips other checks.
Hi Mike,
Hope you're doing good.
Requirement: We need to update AssemblyInformationalVersion which we have placed in a SharedAssemblyInfo.cs file with other common attributes like company etc. The shared file then added to the projects as link in properties as sibling to AssemblyInfo.cs.
Issue faced: Whenever we tried to run task (MSBuild.ExtensionPack.Framework.AssemblyInfo) from MSBuild target file (shown below) we got an error that AssemblyVersion is not present. This issue was obvious as AssemblyVersion and AssemblyFileVersion attributes are present in AssemblyInfo.cs file only, which is associated per project. So, we did the following (but, even that didn't fulfilled our motive):
Solution: To accomplish our goal we made few changes to the AssemblyInfo class' Execute method. We have attached the same in zip. In this we have added a flag which is being set when we have the SharedAssemblyInfo.cs file as input. In that case it updates AssemblyInformationalVersion only and skips other checks.
AssemblyInfo.zip
Question:
Thanks