I'd like to list the modified files at before-build time, in order to increment various build numbers.
For example, if a javascript has been modified, I increment the client-code version number,
if a cSharp file has been modified, I increment the server-code version number.
Do you know if there is a way to do it?
Thanks,
R.
Related
I'm using GitVersion to automatically create version information for my C# applications.
Does anybody know if Gitversion is able to increment the last digit of the AssemblyFileVersion (in AssemblyInfo.cs) in case you're on a feature branch?
The docu states the following:
AssemblyFileVersion will be set to the MajorMinorPatch variable with .0 appended to it.
So the last digit will always be 0. Anyhow the docu could be outdated. I would be cool if the last digit gets incremented by one (or inject the number of commits since the last tag) if you're on e.g. a feature branch.
Based on that you could:
distinct multiple artifact versions of a feature branch, since the last digit increments.
Avoid MSI installer problem, since e.g. the file version of an exe never changes on a feature branch. So the Windows installer won't update a dll or exe since the version hasn't changed (in case of Windows installer uses all 4 digits for comparing operations).
Thx
You can set the format of AssemblyFileVersion in GitVersion.yml
assembly-file-versioning-format: '{Major}.{Minor}.{Patch}.{CommitsSinceVersionSource}'
That would put the number of commits since the last label into the 4th version part
Here's all the variables you can use:
https://gitversion.readthedocs.io/en/latest/input/docs/more-info/variables/
GitVersion's goal is to allow you to easily calculate a Semantic Version number for your code, according to SemVer2.0 (with a bit of legacy NuGet versioning mixed in, in case you need to deal with older v2 NuGet binary resource managers).
So in short, no, GitVersion isn't able to automatically increment the revision field of the assembly file version because that 4th version part isn't part of SemVer.
I am building a C++ DLL in Visual C++ and would like to append the file version number from the resource file to the resulting DLL name to allow multiple DLL versions to exist in a single folder. i.e.:
MyDLL.1.0.3.44.dll
MyDLL.1.0.3.45.dll
I can't seem to find a macro for the version and therefore cannot programmatically set the output file name.
Is this possible and if so, how?
Facing an issue with IS LE 2012 Spring & 2013 LE as well. I have VS 2012 solution with one common project (A) and several projects (B, C, D etc..,) referencing the common project. When I add a IS setup project and include project B's primary output, a setup file is created with project B's output and also project A's output. This is perfectly fine. But when I starting adding different folders within the same setup project to include project C & D's output, the output of the common project is copied to ONLY one of the projects whereas the expected behavior is to have the common projects output to all the projects that are referring it.
When I remove the project that has project A's output from setup and build again, project A's output magically appears in some other project's output. It appears that IS has some sort of flag to the files that needs to be copied and ignore the file once it is copied to one location?
The dependency scan on each project's output seems to show all the files correctly but misses them when it is copied over. I even tried adding the common project's (proj A) primary output to all other projects that are referring it but still the assemblies are not copied over.
Any suggestions? (apart from uninstalling InstallShield to make effective use of my hard drive space)
I am writing a program in Visual Studio 2012. I am using Windows Imaging component I want to put image files for my program to use without them being resources. I want to make them download with the program when someone downloads it.
So my problem is if I specify the direct path in the program say:
C:\Users\Billy\Documents\Background.
How would I do that without having to specify Users\Billy\Documents. Since it will be different on others computers.
Call SHGetFolderPath to get any of the user-dependent path names. Then concatenate the file name to the retrieved path.
Last week I upgrated a big project from Visual Studio 2005 to Visual Studio 2012, everything worked perfectly, even the reports that where made with Crystal Reports 10 (the Dev edition that came with VS2005).
I just installed RC13 so I can edit RPT files in VS2012, but the first time I opened the project I got a message telling me that I should "upgrade" my project to the current version of CR, so I did it.
The problem is that it "touched" every single code file (all X.vb files), and now those files don't compile if they have variable names with "ñ" (ASCII 164): I have a lot of variables like TamañoPagina and FechaMañana (I speak spanish), and I can't go throught 1500 files changing variable names.
I can work with a backup I did right before the CR upgrade, but I ask me every time I open it.
My question is: how can I prevent that CR13 change the file encoding (I suppose) of the files in my VS2012 proyect? or avoid that mesage every time I open the project?
Looks like I found out what caused the problem: The problem wasn't in the *.vb files, but a single change in the web.config. CR13 changed this:
<globalization culture="en-US"/>
To this:
<globalization culture="en-US" fileEncoding="utf-8"/>
That new attribute (somehow) was the culprit that the compiler won't recognize the "ñ" character in variable names.
So, the procedure is to upgrade the proyect to RC13 (as asked when opening the proyect) and then remove the FileEncoding attribute if it where added.