1
Vote

Standalone /V:F option doesn't work

description

If I try to increment the file version only, I get "No project found for version update. Please run the GUI tool.".
The command line looks like the following:
 
AutoVer.exe c:\solutions\solution.sln /V:F /A:A "..+.*"
 
However, if I use /V:F in combination with "A" ( /V:FA ) it updates both assembly and file versions correctly:
 
AutoVer.exe c:\solutions\solution.sln /V:FA /A:A "..+.*"
 
I run VS 2005/2008 version; the solution contains the only project which owns only two small .cs files. One file contains only AssemblyVersion, AssemblyDescription and AssemblyFileVersion attributes, another - some other assembly attributes (AssemblyProduct etc.)
 
The initial question was asked at CodeProject:
http://www.codeproject.com/KB/macros/versioningcontrolledbuild.aspx?fid=31431&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2391825&fr=26#xx2391825xx

comments

nshustov wrote Aug 12, 2008 at 3:49 PM

My investigation of the code revealed that CommandLineMain.ApplyVersion method uses ProjectsToUpdate property of SolutionFileReader instance (m_sfr class member) to get the list of the projects in which the versioning information is supposed to be updated.
However, the ProjectsToUpdate property returns only the projects which satisfy NewVersionProvider.ShouldUpdate() criteria implementation. Apparently, NewVersionProvider.ShouldUpdate call in ProjectsToUpdate property does not returns true for the projects in which only FileVersion is supposed to be updated and the project does not end in the list which is used for versioning.

Not sure if it is a bug or feature - found nothing in the documentation about the restrictions on the file version updates only.

wrote Feb 13, 2013 at 4:35 AM