-1

is there a way to patch a native DLL (not managed) with the build number? so when I right click on the dll and choose Properties I can see in the Details tab "Production Version" as the build number? or maybe any other property there set as build number generated by appveyor?

I did turn on the ASsemblyInfo patching but the native DLL (not managed) was not patched with the build number, so I suspect this AssemblyInfo is just for managed assemblies?...

What I need is the build number appveyor generates with every build to be accessible "somehow" to the methods defined in the native DLL therefor at run time to be able to use this build number.

Can you please help out? thank you

ovi
  • 460
  • 4
  • 18

1 Answers1

1

AssemblyInfo.cs is for managed assemblies. For native dlls I found this useful discussion. There are a lot of solutions in that discussion, I like the one based on rcedit because of it's simplicity. You can use it with the following simple commands:

appveyor downloadfile "https://github.com/electron/rcedit/releases/download/v0.1.0/rcedit.exe"
rcedit.exe <path_to_native_dll> --set-product-version %appveyor_build_version%
Ilya Finkelsheyn
  • 2,851
  • 11
  • 20
  • actually rcedit.exe failed for me, a generic error "rcedit Fatal error: Fatal error: Unable to change file version"... so I went with verpatch.exe and it did the job with same caveat mentioned in the thread you pointed out anyway :) – ovi Jun 24 '17 at 00:46
  • later found: verpatch works great for both x64 and x86 version of my DLLs on my dev box however in apveyor build project it only works for x64 and it is not doing absolutely nothing to the x86 dll -- no error either! any hints what might happen? I can see in appveyor log the verpatch command is executing, no errors, and the dll is not getting somehow replaced and the end it is not having the version stamp; for x64 everything works fine on all situations. any clues please? – ovi Jun 24 '17 at 08:02