Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide strong assembly name #34

Closed
Pzixel opened this issue Jun 6, 2016 · 3 comments
Closed

Provide strong assembly name #34

Pzixel opened this issue Jun 6, 2016 · 3 comments

Comments

@Pzixel
Copy link

Pzixel commented Jun 6, 2016

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.

@samuelneff
Copy link
Owner

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.

@Pzixel
Copy link
Author

Pzixel commented Jun 6, 2016

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.

@samuelneff
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants