samuelneff/MimeTypeMap

Provide strong assembly name

Closed this issue · 3 comments

Currently assembly could not be used with strong-typed libraries. It's easy to fix it, but it's on you.

Hmm, I found that similar request is open from sept 2015. It's 5 minutes to do, just create an snk file and add it in project properties.

I don't provide a binary release, only source, so as I understand it the strong naming is not on my end to release. It would only apply if I was providing a binary release.

If I'm misunderstanding the request, please clarify. I'm happy to do anything reasonable that helps out and doesn't affect other users.

In my case I have a solution, and every project within is an assembly with a strong name. And as you know, assembly with strong name can't use assemblies without it. So I cannot use your package in my solution. I always get an error Could not load file or assembly 'MimeTypeMap, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

Problem is with PublicKeyToken which is null. For example, it's not possible to put your library in GAC. So any user who want to place it there will encounter the same problem.

Just generate an *.snk, sign asselbmy with it and update NuGet. There is plenty of examples on the internet "signing assembly in 5 minutes" and so on.

To create and sign an assembly with a strong name by using Visual Studio

  • In Solution Explorer, open the shortcut menu for the project, and then choose Properties.
  • Choose the Signing tab.
  • Select the Sign the assembly box.
  • To create a new key file, choose <New…> and enter its name in the Create Strong Name Key dialog box.

Thanks for explaining. I actually don't manage the NuGet repository. You are free to create your own strong named version for your use.