You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PluginFramework supports installing plugins using Nuget. This is implemented in NugetPackagePluginCatalog.
If NugetPackagePluginCatalog's packagesFolder is set, the Nuget package gets always installed into the same path. Still, NugetCatalog always tries to download the Nuget package.
Change
We want to download the package only once. When NugetPackagePluginCatalog is initialized, it should check if the package has been previously installed and if so, it should use that instead of trying to download the package again.
Implementation idea
When first initializing the catalog, can we serialize and save nugetDownloadResult into some fixed location (based on the packages folder & package identifier (name.version)) in NugetPackagePluginCatalog.Initialize? Before calling nuGetDownloader.DownloadAsync we could check if the file already exists and deserialize the result instead of using NugetDownloader.
Note
Behind the scenes NugetPackagePluginCatalog uses NugetDownloader. NugetDownloader takes care of installing the correct version of the package (x86 vs x64 vs arm vs Win10 vs Win11 etc). NugetDownloader passes NugetDownloadResult to PluginFramework and PF uses that info when initializing the catalog.
New unit test should be created to test this functionality by cloning the NugetPackagePluginCatalogTests.CanInstallPackageWithNativeDepencencies. This is a good test case as it uses the native dlls etc. which are provided by the NugetDownloader.
The text was updated successfully, but these errors were encountered:
PluginFramework supports installing plugins using Nuget. This is implemented in NugetPackagePluginCatalog.
If NugetPackagePluginCatalog's packagesFolder is set, the Nuget package gets always installed into the same path. Still, NugetCatalog always tries to download the Nuget package.
Change
We want to download the package only once. When NugetPackagePluginCatalog is initialized, it should check if the package has been previously installed and if so, it should use that instead of trying to download the package again.
Implementation idea
When first initializing the catalog, can we serialize and save nugetDownloadResult into some fixed location (based on the packages folder & package identifier (name.version)) in NugetPackagePluginCatalog.Initialize? Before calling nuGetDownloader.DownloadAsync we could check if the file already exists and deserialize the result instead of using NugetDownloader.
Note
Behind the scenes NugetPackagePluginCatalog uses NugetDownloader. NugetDownloader takes care of installing the correct version of the package (x86 vs x64 vs arm vs Win10 vs Win11 etc). NugetDownloader passes NugetDownloadResult to PluginFramework and PF uses that info when initializing the catalog.
NugetDownloader can be found from https://github.com/weikio/nugetdownloader but we shouldn't need to modify it.
Testing
New unit test should be created to test this functionality by cloning the NugetPackagePluginCatalogTests.CanInstallPackageWithNativeDepencencies. This is a good test case as it uses the native dlls etc. which are provided by the NugetDownloader.
The text was updated successfully, but these errors were encountered: