fsprojects / Paket

A dependency manager for .NET with support for NuGet packages and Git repositories.
https://fsprojects.github.io/Paket/
MIT License
2.02k stars 520 forks source link

Adding framework assemblies from GAC #3296

Open Bikeman868 opened 6 years ago

Bikeman868 commented 6 years ago

Description

This is a feature request. I searched the docs and the open issues and I am fairly certain this is not existing and not a duplicate.

What I want is to be able to repair my project file by deleting all of the project references and the entire bin folder, then run Paket and have all the dependencies put back correctly.

If I do this right now I lose dependencies on .Net Framework assemblies because not many NuGet packages define these, and anyway my application code might need something that none of the NuGet packages needs.

My suggestion is to extend the syntax of the paket.dependencies file to include a gac keyword at the start of the line, so my paket.dependencies might be

framework: net40
source https://nuget.org/api/v2
nuget NUnit
gac System
gac System.Data
gac System.Xml

Then in my paket.references I could put

NUnit
System
Syatem.Data
System.Xml
forki commented 6 years ago

While I think this would work, I don't think it's worth adding it. Basically the GAC is pretty much dead today. The bits that are left should be referenced by a package. Maybe an easy workaround would be to produce a simple nupkg that just defines the references a put it into your project.

That said: if people think it's worth it and someone contributes a pull request, then I'm happy to merge it.

Martin Halliday notifications@github.com schrieb am Fr., 13. Juli 2018, 03:02:

Description

This is a feature request. I searched the docs and the open issues and I am fairly certain this is not existing and not a duplicate.

What I want is to be able to repair my project file by deleting all of the project references and the entire bin folder, then run Paket and have all the dependencies put back correctly.

If I do this right now I lose dependencies on .Net Framework assemblies because not many NuGet packages define these, and anyway my application code might need something that none of the NuGet packages needs.

My suggestion is to extend the syntax of the paket.dependencies file to include a gac keyword at the start of the line, so my paket.dependencies might be

framework: net40 source https://nuget.org/api/v2 nuget NUnit gac System gac System.Data gac System.Xml

Then in my paket.references I could put

NUnit System Syatem.Data System.Xml

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fsprojects/Paket/issues/3296, or mute the thread https://github.com/notifications/unsubscribe-auth/AADgNPzjl9pLW-gyooQFaL_k47dteFdiks5uF_GhgaJpZM4VOJYJ .

baronfel commented 6 years ago

There's one caveat here that on mono there are certain nuget packages that cannot be used from nuget because they hardcode features that do not work on mono. In those cases they have to be removed so that assembly binding can use the mono-gac-packaged assemblies. These assemblies/versions are listed here.

We have to do this process for all of our mono builds or else we break at runtime.