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
[BUG] NugetTask fail when project has dependencies hosted on private repos #77
Comments
Hey @cegio 👋, Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider contributing financially. https://opencollective.com/reactiveui
|
I am seeing the same issue when we have pointers to our nuget packages hosted on Azure DevOps. @glennawatson is there a place in code that would be a good starting point to take a look at for this? I might have some availability to take a peek into here. |
What's the status on this? I'm currently in an upgrade project on our solution, and as part decided to start using ReactiveUI. However, we have a bunch of legacy NuGet-packages, and as soon as I install Pharmacist, I get this Is there any way around this (config option to turn off scanning proprietary packages?), or am I just forced to fall back on the |
We are moving to source generators for next revision which doesn't suffer from nuget source issues. Just have to wait for the visual studio version that supports it next week n |
Cool! Looking forward to it. Not that the |
Again asking what the status of this issue is, since it looks like I'm again running into it. Since my last post here I simply continued using I thought I could work around this issue by generating events for Xamarin Forms and Xamarin Essentials myself, in a separate project within my solution. This "events"-project is then referenced by those projects previously using packages from the |
Would this also give us control over which packages Pharmacist tries to process? Because I think that would be the ideal solution, to somehow be able to indicate a list of packages Pharmacist processes or explicitly excludes from processing. Because even if Pharmacist might be able to access all NuGet-packages used by a solution, it might be undesirable to have it generate event bindings for all. |
It will only generate events for the explicit classes you call Events() on. It has no awareness of NuGet packages. The code is all ready to go just need time to do a push of a NuGet push. Monitor over here https://github.com/reactivemarbles/ObservableEventsSourceGenerator
|
2 years later, still no fix. |
And sarcastic comments absolutely makes things happen faster. |
@glennawatson thanks for all of your hard work on Pharmacist, it's a great concept and I think the new Source Generator version will be even better! 💖 |
See https://www.nuget.org/packages/ReactiveMarbles.ObservableEvents.SourceGenerator/ and https://github.com/reactivemarbles/ObservableEventsSourceGenerator This uses the dotnet nuget system rather than a custom nuget manager, so can handle private nugets.
|
Does you answer hides that you are shut downing pharmacist and redirect to those projects instead ? Or is it only that you don’t care about the users of pharmacists and the management of this projet so you don’t even want to see any pr from anyone in this field ? |
@softlion two years without any PR doesn't qualify you to make such a statement. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Describe the bug
When your csproj reference package that are not hosted on nuget.org, it makes the build fail on PharmacistNuGetTask
Steps To Reproduce
Provide the steps to reproduce the behavior:
In your csproj add a PackageReference to a nuget package that is hosted on a private repo
Expected behavior
No build errors, and Pharmacist.Nuget.g.cs generated for all nuget packages (or at least the ones that could be downloaded)
Environment
Additional context
Copy of stacktrace :
/.nuget/packages/pharmacist.msbuild/1.2.2/buildTransitive/netstandard2.0/Pharmacist.MSBuild.targets(5,5): Error: PharmacistNuGetTask: System.NullReferenceException: Object reference not set to an instance of an object
at NuGet.Protocol.DownloadResourceV3.GetDownloadUrl (NuGet.Packaging.Core.PackageIdentity identity, NuGet.Common.ILogger log, System.Threading.CancellationToken token) [0x0007a] in :0
at NuGet.Protocol.DownloadResourceV3.GetDownloadResourceResultAsync (NuGet.Packaging.Core.PackageIdentity identity, NuGet.Protocol.Core.Types.PackageDownloadContext downloadContext, System.String globalPackagesFolder, NuGet.Common.ILogger logger, System.Threading.CancellationToken token) [0x000bd] in :0
at Pharmacist.Core.NuGet.NuGetPackageHelper+<>c__DisplayClass16_0.b__4 (System.ValueTuple
2[T1,T2] item) [0x00094] in <c092543ffe3f4af794d331f791699d8f>:0 at Pharmacist.Core.NuGet.NuGetPackageHelper.GetPackagesToCopy (System.Collections.Generic.IReadOnlyCollection
1[T] startingPackages, NuGet.Protocol.Core.Types.DownloadResource downloadResource, System.Collections.Generic.IReadOnlyCollection1[T] frameworks, System.Boolean getDependencies, System.Threading.CancellationToken token) [0x001f2] in <c092543ffe3f4af794d331f791699d8f>:0 at Pharmacist.Core.NuGet.NuGetPackageHelper.DownloadPackageFilesAndFolder (System.Collections.Generic.IReadOnlyCollection
1[T] packageIdentities, System.Collections.Generic.IReadOnlyCollection1[T] frameworks, NuGet.Protocol.Core.Types.DownloadResource downloadResource, System.Boolean getDependencies, System.Collections.Generic.IReadOnlyCollection
1[T] packageFolders, System.String packageOutputDirectory, System.Threading.CancellationToken token) [0x00084] in :0at Pharmacist.Core.NuGet.NuGetPackageHelper.DownloadPackageFilesAndFolder (System.Collections.Generic.IReadOnlyCollection
1[T] libraryIdentities, System.Collections.Generic.IReadOnlyCollection
1[T] frameworks, NuGet.Configuration.PackageSource nugetSource, System.Boolean getDependencies, System.Collections.Generic.IReadOnlyCollection1[T] packageFolders, System.String packageOutputDirectory, System.Threading.CancellationToken token) [0x00288] in <c092543ffe3f4af794d331f791699d8f>:0 at Pharmacist.Core.Extractors.NuGetExtractor.Extract (System.Collections.Generic.IReadOnlyCollection
1[T] targetFrameworks, System.Collections.Generic.IReadOnlyCollection1[T] packages, System.String packageOutputDirectory) [0x0008a] in <c092543ffe3f4af794d331f791699d8f>:0 at Pharmacist.Core.ObservablesForEventGenerator.ExtractEventsFromNuGetPackages (System.IO.TextWriter writer, System.Collections.Generic.IReadOnlyCollection
1[T] packages, System.Collections.Generic.IReadOnlyCollection`1[T] frameworks, System.String packageOutputFolder) [0x00090] in :0at Pharmacist.MsBuild.PharmacistNuGetTask.Execute () [0x0014b] in :0 (Tech5.Core)
The text was updated successfully, but these errors were encountered: