CS1607: The version specified for the "file version" is not in the normal format "major.minor.build.revision" in .NET.

I am trying to set the AssemblyVersion and AssemblyFileVersion attributes in my project like this:

 [assembly: AssemblyVersion("3.0.*")] [assembly: AssemblyFileVersion("3.0.*")] 

but I get this warning:

CS1607: Generating an assembly. The version "3.0. *" Specified for the "file version" is not in the normal mode of 'major.minor.build.revision'

The AssemblyVersionAttribute Class page on MSDN states the following:

You can specify all values, or you can accept the default assembly number, revision number, or both with an asterisk (*). For example, [assembly: AssemblyVersion ("2.3.25.1")] indicates 2 as the major version, 3 as the minor version, 25 as the assembly number and 1 as the revision number. A version number such as [assembly: AssemblyVersion ("1.2. *")] Indicates 1 as the major version, 2 as the minor version, and accepts the standard assembly and revision numbers. A version number such as [assembly: AssemblyVersion ("1.2.15. *")] Indicates 1 as the major version, 2 as the minor version, 15 as the assembly number and accepts the default version number.

Pay attention to the bold section. Does anyone know why [assembly: AssemblyVersion("3.0.*")] (From my project) is invalid, but valid [assembly:AssemblyVersion("1.2.*")] (From the MSDN example)?

In particular, I am curious to know if I can start with a non-zero main number, since the application I am writing is version 3 of the program.

UPDATE →> Sorry, this sounds like an answer in another post ... Please vote to close it, thanks.

+30
wildcard warnings assemblyversionattribute
Mar 19 '13 at 16:59
source share
1 answer

You assume the problem is with this line:

 [assembly: AssemblyVersion("3.0.*")] 

when he is actually with this:

 [assembly: AssemblyFileVersion("3.0.*")] 

As the accepted answer to the question you say is not a duplicate of this , it says:

For AssemblyFileVersionAttribute you cannot use the special * character, so you need to provide a full and valid version number.

The * syntax only works with the AssemblyVersion attribute. It does not work with the AssemblyFileVersion attribute.

There are two workarounds you probably want here:

  • Just omit the AssemblyFileVersion attribute. This will cause the assembly file version information to be automatically separated from the AssemblyVersion attribute (which supports the * syntax).

  • Expand the big guns and install an add-on version extension plugin that offers you more options for increasing the version than you can shake a stick.

+62
Mar 19 '13 at 17:13
source share
— -



All Articles