-
Notifications
You must be signed in to change notification settings - Fork 91
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
Strongly named assembly #175
Comments
Can you give some info on what this means / why it is needed? This is absolutely out of my domain^^ |
It's a thing which allows to make sure that the used assembly is the right one (e. g. it comes in when there are assemblies with the same name). Not very much of a use, and it is only useful for .NET Framework. But those users who do rely on this thing, they have to have all their deps strongly named too. So if your assembly is not strongly named, they won't be able to use the lib at all. I'm not saying it's a big issue though, and definitely not urgent. But a day may come when someone won't be able to use the lib because of it. |
Hello! I'm Jake from the ML.NET team (one of .NET's Machine Learning libraries) - we're creating a bunch of sample notebooks and we'd love to use Plotly.NET in some of our Interactive Extensions. Unfortunately, we can't take dependency on Plotly.NET until it's signed. Notebooks are an important part of our strategy going forward - We have them in Visual Studio and we're working on adding a collection of getting started with ML notebooks here: We'd also like to use Plotly.NET in Model Builder (That is what LittleLittleCloud was asking about above). How can we help move this forward? I'm hoping this would help both of our products grow :). |
Hi @JakeRadMSFT , thanks for reaching out! Integration with ML.NET samples is definitely something that increases the priority of this issue quite a bit! What i don't want to happen is implementing this while not understanding it and then have issues down the line due to it. I have read a bit into strong named assemblies and i am a little bit confused about the concept, so here are some questions/things i need to understand before implementing this.:
Also, i have read in some threads that this basically breaks all dependent projects once, not sure if that's true. If so, this would require a major version increase i guess? All together, the essence of threads such as this one or this one seems to be that this is legacy stuff but it cannot hurt to support it. The thing is that i cannot control that for third party libraries. This seems like the exact thing that causes development workflow issues down the line. How should we handle third-party dependencies? |
On another note, from your link it looks like you will write the notebooks in C#. Depending on the complexity of visualizations you want to show, you might run into the issues outlined in #285. Input (or even help) on that issue from the C# user perspective would be awesome. |
Thanks @kMutagene - I'll be honest - I've never signed an assembly outside of Microsoft. This would be a good learning experience for me on best practices.
This is sort of implied from above but I've also never tried to transition a NuGet to signed. Perhaps there are issues there - - that might be why libraries like Markdig have a signed and unsigned version. https://www.nuget.org/packages/Markdig/
Newtonsoft.Json certainly causes some issues. It's bitten me more than a few times :). It essentially comes down to @kMutagene What are your thoughts on having two NuGets? Should I try to wire that up? That way we don't break existing users. |
before we get deeper into this, what is the exact reason why the assembly must be signed? Are you making non-.NET(core) notebooks? If i understood this right, strong names are only relevant for netfx:
|
also the official guidelines discourage publishing two versions of the package: https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/strong-naming (although this looks like the easiest solution for me). Anyways, we still have the problem of third-party libraries we are using not being signed. |
Let me dig in on this with the experts internally. Ultimately, there is a policy in the https://github.com/dotnet org's repos and builds that enforces signing. We also want to use this inside of Visual Studio's Model Builder and that is .NET Framework ... which requires strong-named.
I'll learn more about this too. |
It looks like you guys don't have too many!
|
Okay - I've reached out to some experts and re-read the documentation. My Thoughts:
Let me know your thoughts! I'm happy to help wire this up for Plotly.NET and DynamicObj. I believe this is a one time cost (and maybe some issue handling) and shouldn't have any more work associated with it. FYI - I don't have strong opinions on versioning or shipping multiple NuGets. If you like your versioning ( and don't want to bump to 3 just for signing) ... the two NuGet way works for me too. |
Thanks for the insights! I think my preferred approach would be:
If you could help wiring that up, that would be great. I think we could start with |
@JakeRadMSFT I think we are already quite close for wrapping this up for
How do we achieve this decoupling of nuget and assembly version? The current build pipeline increases both the assembly and package version (i have tested this by locally bumping the version to 2.0.1): You can also see that the dependencies are all doing this version decoupling (FSharp.Core, netstandard, Newtonsoft.Json) So i think the last roadblock here is:
|
@kMutagene let me ask some folks! Sorry I missed these messages!! |
My guess is that you're build process is somehow setting the version property via msbuild somewhere which then overrides all the versions. Packages like newtonsoft set each version: I believe we can do this from msbuild by setting each version property "AssemblyVersion", "FileVersion" ... instead of setting "version".
|
I've never used the build tools you're using (FAKE) but I think it's this: Plotly.NET/build/PackageTasks.fs Lines 21 to 26 in 5c6f359
It looks like it's setting all versions based on NuGet symver ... Plotly.NET/build/ProjectInfo.fs Lines 31 to 35 in 5c6f359
|
@JakeRadMSFT exactly, both versions can be set via msbuild params, that was the missing link. The signed version of DynamicObj is live. We can do the same for Plotly.NET soon, i am just wondering if it would be better to get #294 merged first and release the |
I'll reply in #285 :) |
Should sign all assemblies in the project (mb except the *.Interactive?) to make sure they can be referenced by strogly named assemblies
The text was updated successfully, but these errors were encountered: