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

Create new package type for MSBuild project SDKs #6484

Open
jeffkl opened this issue Jan 24, 2018 · 9 comments
Open

Create new package type for MSBuild project SDKs #6484

jeffkl opened this issue Jan 24, 2018 · 9 comments
Assignees
Labels
Functionality:Restore Priority:2 Issues for the current backlog. Type:DCR Design Change Request

Comments

@jeffkl
Copy link
Contributor

jeffkl commented Jan 24, 2018

In MSBuild 15.6 (dotnet/msbuild#2803), we shipped a NuGet-based project SDK resolver that allows users to specify something like this:

<Project Sdk="MyCustomSdk/1.0.0">
</Project>

The SDK resolver in MSBuild queries the configured NuGet feeds for a package with the same ID and version and then returns the path to it on disk. These kinds of packages could have special considerations.

SDK packages must have a root Sdk folder and contain two MSBuild project imports named Sdk.props and Sdk.targets.

Example:

foo\1.0.0
└───Sdk
        Sdk.props
        Sdk.targets

However, there's nothing technically wrong with a package containing reference assemblies, runtime assemblies, build logic, and an SDK.

foo\1.0.0
├───build
│       foo.props
│       foo.targets
│
├───lib
│   └───net46
│           foo.dll
│
├───ref
│   └───net46
│           foo.dll
│
└───Sdk
        Sdk.props
        Sdk.targets

We also need to nail down what it means for an SDK package to have a dependency on another package. At the moment, dependencies are ignored but there could be a use case for this to work where the import order is just the same as dependency order.

@nkolev92 nkolev92 added this to the Backlog milestone Jan 25, 2018
@nkolev92 nkolev92 added Priority:1 High priority issues that must be resolved in the current sprint. Triage:NeedsTriageDiscussion and removed Priority:1 High priority issues that must be resolved in the current sprint. labels Jan 25, 2018
@nkolev92 nkolev92 modified the milestones: Backlog, 4.6 Feb 5, 2018
@nkolev92 nkolev92 self-assigned this Feb 5, 2018
@nkolev92
Copy link
Member

nkolev92 commented Feb 5, 2018

I have a couple of questions I'd like us to clarify before continuing here. I will schedule an offline meeting to discuss this.

For example, what's the point of build/foo.props etc if there's no build going(I assume) on here?
How about the tfm based lib assets, but the sdks are not tfm based?

What's the VS UI experience long term?
How will this package be downloading, since the plan for download API #5919 is not yet nailed down implemented?

What's the target release date etc.

Per convention, the folder name has to be "sdk", if we're going the route of creating a asset group.
build/(S)dk.props is another option we can consider too.

@jeffkl
Copy link
Contributor Author

jeffkl commented Feb 5, 2018

@nkolev92 yeah we should probably have a quick meeting to discuss the implications here. There's a need to keep these packages out of normal search and possibly enforce more/less rules.

@natemcmaster
Copy link

Can you include me in this meeting? It may affect some of the engineering work we are planning for .NET Core.

@nkolev92
Copy link
Member

nkolev92 commented Feb 5, 2018

Alright.

I edited the comment with more questions etc.

I just sent an e-mail to you, few mins ago.

@nkolev92
Copy link
Member

nkolev92 commented Feb 7, 2018

Just putting up some notes from our earlier meeting.

The package type will be "MSBuildSdk", case irrelevant, since PackageTypes are case insensitive.

15.6

  • The NuGet resolver on MSBuild side, will validate that only SDK package types are allowed. //cc @jeffkl

15.vNext:

OOB (Server-side)

@nkolev92
Copy link
Member

nkolev92 commented Jan 9, 2020

Is this relevant at all now?

I don't think the package type check was implemented on the msbuild side at all, making all of this moot.

I'd love to have that check, but I'm worried that it will break SDKs that never set this package type.

@jeffkl
Copy link
Contributor Author

jeffkl commented Jan 9, 2020

This is mostly needed for enforcement and search filters. We don't want people installing SDKs as normal packages and we'd probably want to be able to search for just SDKs or filter them out.

@nkolev92
Copy link
Member

nkolev92 commented Jan 9, 2020

Is anyone actually creating the SDK packages with a package type?
If that's still true, then it's worth keeping :)

Is there a guidance for how to create these SDKs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Restore Priority:2 Issues for the current backlog. Type:DCR Design Change Request
Projects
None yet
Development

No branches or pull requests

6 participants