Git Product home page Git Product logo

Comments (6)

VitaliiTsilnyk avatar VitaliiTsilnyk commented on June 6, 2024

Strange, the dll should be signed. Are you using the NuGet version of NGettext?

from ngettext.

scancircle avatar scancircle commented on June 6, 2024

Yes I am. When I check the properties of the NGettext.dll.deploy and all NGettext.dll files under packages\NGettext.0.6.3\lib, there is no "Digital Signature" tab.

from ngettext.

VitaliiTsilnyk avatar VitaliiTsilnyk commented on June 6, 2024

Oh, I get it. I thought you were talking about public key token signing for GAC.
No, the NGettext DLLs are not digitally signed. I don't even have a certificate for that :D
And I doubt you'll find any library with digital signature on NuGet either.

I didn't work with ClickOnce before, but I'd suggest to embed NGettext code into your assembly. You can do that with ILMerge for example.

from ngettext.

scancircle avatar scancircle commented on June 6, 2024

Thanks for the quick responses. I do use ILMerge for non-MS browsers, but for MSIE/Edge I use the ClickOnce functionality, which publishes the exe and dlls (with a .deploy extension) for online usage. I think I will publish it to a local folder first, then also sign the NGettext.dll.deploy in that folder with my own code signing certificate and manually upload that folder to my website.

from ngettext.

scancircle avatar scancircle commented on June 6, 2024

I decided not to sign the NGettext.dll itself with my own code signing certificate (because it is not my own code and others might also use my signed version) but to merge it with my .exe and sign the resulting .exe. Unfortunately, I face the following problems when performing the merge+sign at various moments:

  1. AfterCompile: NGettext.dll has not yet been copied to the bin$(ConfigurationName) folder;
  2. AfterBuild/BeforePublish: the .exe has been copied to the bin$(ConfigurationName) AND to the bin$(ConfigurationName)\app.publish folder (a slightly different version, 72 bytes bigger, is used for publishing) so I would need to do it twice;
  3. AfterPublish: the files have been placed in a folder like publish\Application Files\xxx_a_b_c_d (where xxx is the assembly name and a/b/c/d the publish version), which is difficult to reference automatically.

The cleanest solution would be if you could copy the NGettext.dll on BeforeBuild/BeforeCompile. I could also pick the NGettext.dll from one of the packages\NGettext.0.6.3\lib subfolders, but I need the net20 and the net40 version (the .deploy version supports boths .NET 2.0 and 4.0, but the separate .exe files support either 2.0 or 4.0). On the other hand, all net## versions seem to be identical so if I only need .NET 2.0 and 4.0, can I then pick the NGettext.dll from the "hardcoded" path e.g. packages\NGettext.0.6.3\lib\net20?

from ngettext.

scancircle avatar scancircle commented on June 6, 2024

Correction: the net## versions are NOT identical. So I included the net20 version for the .NET Framework 2.0 release and the net40 version for the 4.0 release. The merged+signed 2.0 release worked fine, but the 4.0 release just crashed apparently because of a missing .exe.config.deploy file (which I don't even need). Since the config file cannot be merged into the single .exe and I only need simple 1-on-1 translations (no plural, parameters, etc.), I made my own implementation based on embedded .txt files and a name/value collection. Thanks for the support anyway.

from ngettext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.