Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support for native binaries? #94
I've got a .sln with both native (C/C++) and managed (C# and C++/CLI) projects. It would be great to also be able to stamp the native binaries with the same version information as the managed binaries. I'm not sure what the best way to implement this would be... perhaps to generate a .rc file, or to produce the .res file directly.
I happen to have some self-contained C# code that can emit a .res file containing version information (VS_FIXEDFILEINFO et al). I've used it in other, managed code projects where you couldn't depend on having rc.exe to compile a .rc to a .res. For an actual native code project, you could depend on being able to compile an .rc, but if I were to try to do this change, I don't know that it would be any less annoying to codegen a .rc file than it would to just create the .res file, given that I know how and already have code to do the latter. Also, since link.exe can accept multiple .res files, it's not a composition problem like it is for managed code (with csc.exe, you get one /win32res:file).
But after snooping around this project (NBGV) a bit, I've come to the conclusion that my msbuild-fu is far too weak, and given the amount of vacation time I have left, I don't think I'd be able to get very far. But @heaths, you are welcome to the .res-generating code if it is useful at all.
If generating the .res directly is interesting, another thought I had is maybe the .res-emitting code could/should be its own nuget package, since it's potentially useful in other projects. I could probably scrape that together.
My plan is to generate source, yes. It can be combined with other resources in the RC file and be used as variables in code. - Heath via Nine<http://www.9folders.com/> on Android…
________________________________ From: Andrew Arnott <email@example.com> Sent: Dec 30, 2016 7:25 PM To: AArnott/Nerdbank.GitVersioning Cc: Heath Stewart; Mention Subject: Re: [AArnott/Nerdbank.GitVersioning] Support for native binaries? (#94) Personally, I favor NB.GV generating source code rather than a binary file so that folks can see what effect it's having on the build more clearly. - You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub<#94 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ABdiRnZVYPdekFsUGQsVYThFPW-TD2M6ks5rNcs7gaJpZM4LSYAm>.
added a commit
Jun 15, 2017
@heaths are you talking about scripts to remove hard-coded versions from the project?