vsts-assemblyinfo-task icon indicating copy to clipboard operation
vsts-assemblyinfo-task copied to clipboard

Handle commented entries in AssemblyInfo

Open dbenzhuser opened this issue 11 months ago • 0 comments

In a project my AssmblyInfo.cs files contained commented version entries like this:

// Version information for the assembly is set in CI.
////[assembly: AssemblyVersion("0.0.0.0")]
////[assembly: AssemblyFileVersion("0.0.0.0")]

But even though the task output showed that the files had been processed successfully, the resulting assemblies still had their version set to 0.0.0.0.

Turns out the task just replaced the values, not recognizing that the entries were disabled:

// Version information for the assembly is set in CI.
////[assembly: AssemblyVersion("1.2.3.4")]
////[assembly: AssemblyFileVersion("1.2.3.0")]`

Small fix on my side of course, but tricky to realize what went wrong.

dbenzhuser avatar Mar 06 '24 10:03 dbenzhuser