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

Microsoft.Build.CentralPackageVersions README seems incomplete #19

Closed
bording opened this issue Mar 30, 2018 · 3 comments
Closed

Microsoft.Build.CentralPackageVersions README seems incomplete #19

bording opened this issue Mar 30, 2018 · 3 comments

Comments

@bording
Copy link
Contributor

bording commented Mar 30, 2018

The README for Microsoft.Build.CentralPackageVersions doesn't seem to show how to use this SDK.

It shows how to create the Packages.props file and that you can't have versions for packages in your project files, but the actual Microsoft.Build.CentralPackageVersions SDK doesn't appear to be referenced anywhere in the examples.

What's the correct way to get this working?

@jeffkl
Copy link
Contributor

jeffkl commented Apr 2, 2018

All of the SDKs can be referenced depending on your needs according to this doc (which is linked to in the README):

https://docs.microsoft.com/en-us/visualstudio/msbuild/how-to-use-project-sdk

CentralPackageVersions is the least likely to be referenced by individual projects and the best practice is to place an <Sdk /> element in your Directory.Build.targets.

Sdk Element: https://docs.microsoft.com/en-us/visualstudio/msbuild/sdk-element-msbuild

Directory.Build.props/Directory.Build.targets: https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build

I'll update the README of CentralPackageVersions with a sample, does that sound like enough?

@bording
Copy link
Contributor Author

bording commented Apr 5, 2018

@jeffkl After opening this issue, I was able to use the MSBuild Project SDKs documentation along with information in dotnet/msbuild#2803 to figure out how to get it working.

I think updating the CentralPackageVersions README to have the SampleProject.csproj show it using the SDK would be a good idea. Adding something about referencing it via Directory.Build.targets being the preferred option seems like it would be useful, too.

On a side note, while looking at the documentation and the spec issue, I noticed that the documentation page doesn't say anything about being able to provide a semicolon-separate list of SDKS as shown in dotnet/msbuild#2803 (comment). Was that an intentional omission?

@jeffkl
Copy link
Contributor

jeffkl commented Apr 5, 2018

I think updating the CentralPackageVersions README to have the SampleProject.csproj show it using the SDK would be a good idea

Agreed: #22

I noticed that the documentation page doesn't say anything about being able to provide a semicolon-separate list of SDKS... Was that an intentional omission?

I think so, we don't really want people using that syntax since the others are much cleaner. But feel free to add to the docs: https://github.com/MicrosoftDocs/visualstudio-docs/blob/master/docs/msbuild/how-to-use-project-sdk.md

@jeffkl jeffkl closed this as completed in #22 Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants