-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
SDK doesn't find/use bundled library-packs when additional NuGet sources are specified. #44547
SDK doesn't find/use bundled library-packs when additional NuGet sources are specified. #44547
Comments
The issue also affects the For NativeAOT with the bundled ILCompiler:
vs
|
The functional impact of this issue is limited because all nuget files we currently include with the source-build SDK are also shipped by Microsoft through nuget.org. The issue should still be fixed because it nullifies the why these packages are included with the SDK: use source-built packages (source-built SDK), use bundled F# (source-built and Microsoft-built SDK). |
That's going to be hard because by setting |
Yes, to fix this we need a separate (internal) property that the SDK can use to bring these |
Thanks for creating this issue! We believe this issue is related to NuGet tooling, which is maintained by the NuGet team. Thus, we closed this one and encourage you to raise this issue in the NuGet repository instead. Don’t forget to check out NuGet’s contributing guide before submitting an issue! If you believe this issue was closed out of error, please comment to let us know. Happy Coding! |
@baronfel is this something you triggered? If not, can you re-open the issue? |
No, it's a bot that operates on any issue with the 'Area-NuGet' label 😡 |
The suggested change is to track library-packs in a separate property from The root library-packs folder is being added here: sdk/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.NuGetOfflineCache.targets Line 28 in e21098f
The fsharp one here: note: both are guarded by NuGet picks them up here: I can look into implementing this. @dsplaisted, @baronfel wdyt? |
This kind of safe-property-buffering seems reasonable to me. |
I think this would be good to change, although maybe there's a remote chance it could break someone somehow. If we do fix it, it might be better to set @nkolev92 @zivkan How do you feel about |
I think it'd be ideal if anyone outside of the SDK did not use this property. |
@nkolev92 is that documented anywhere? Do we know if library-packs work with the other methods of providing sources? |
Sounds good. I didn't know about
It seems to be widely used outside the SDK at this point. The property is documented at https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#restore-properties.
I think all the properties for providing sources to NuGet are part of that document. This means that to the users none of these are "SDK only". @nkolev92 what do you think about adding the |
I think adding it to TreatAsLocalProperty is fine. It is documented there, but I'd argue that it's one of those that needs a better explanation because of the overriding behavior of MSBuild properties. We can do better there; I've filled an issue: NuGet/Home#13922 |
The .NET installation comes with a bundled
FSharp.Core
package that lives at:./sdk/<version>/FSharp/library-packs/FSharp.Core.<version>.nupkg
.This package is NOT found when a user specifies
RestoreAdditionalProjectSources
.This behavior results in restore errors with source-built SDKs (for versions that are not yet published on nuget.org), and causes the SDK to use binary assets from nuget.org instead of source-built assets bundled with the SDK.
Reproducer (with source-built SDK for upcoming 9.0.100):
Error:
Expected behavior:
The library-packs folder under
/sdk/<version>/FSharp/library-packs/
should be used also whenRestoreAdditionalProjectSources
is set.cc @baronfel @MichaelSimons @omajid @Swapnali911 @Vishwanatha-HD
The text was updated successfully, but these errors were encountered: