Skip to content
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

Use library-packs also when RestoreAdditionalProjectSources is explicitly set. #18000

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

tmds
Copy link
Member

@tmds tmds commented Nov 14, 2024

library-packs are SDK features that implemented using bundled NuGet package files.

When a user sets RestoreAdditionalProjectSources, these features must remain available.

To disable library-packs features, a user may set DisableImplicitLibraryPacksFolder.

Fixes dotnet/sdk#44547.

@dsplaisted @nkolev92 @baronfel ptal.

…itly set.

library-packs are SDK features that implemented using bundled NuGet package files.

When a user sets RestoreAdditionalProjectSources, these features must remain available.

To disable library-packs features, a user may set DisableImplicitLibraryPacksFolder.
@tmds tmds requested a review from a team as a code owner November 14, 2024 08:25
Copy link
Contributor

✅ No release notes required

@KevinRansom
Copy link
Member

@tmds --- I think I may need a little more context.

I am unfamiliar with TreatAsLocalProperty except as a mechanism for disallowing value property changes from the command line.

Am I correct in assuming that:
TreatAsLocalProperty="RestoreAdditionalProjectSources" is still going to allow a developer to change the value of this property within their project, props and target files.

So what does the change accomplish other than disabling the ability to :

dotnet build myproj.fsproj /p:RestoreAdditionalProjectSources=SomeOtherUriOrPath

Is that the scenario you are hoping to block?

Thanks

Kevin

@tmds
Copy link
Member Author

tmds commented Nov 14, 2024

dotnet build myproj.fsproj /p:RestoreAdditionalProjectSources=SomeOtherUriOrPath

By adding the TreatAsLocalProperty, the .targets fill will be able to add the FSharp library-packs folder as an additional RestoreAdditionalProjectSources.

See dotnet/sdk#44547 (comment) for some more context.

@KevinRansom
Copy link
Member

@tmds - okay, I think I understand why this is necessary. The whole command line pinning of values is a bit mind altering. I will talk it over with @baronfel when he is around, to make sure my understanding is sound.
But I think it is safe to assume this is a good change.

Copy link
Member

@KevinRansom KevinRansom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this.

@vzarytovskii vzarytovskii enabled auto-merge (squash) November 15, 2024 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

SDK doesn't find/use bundled library-packs when additional NuGet sources are specified.
3 participants