Building and publishing an MSBuild Project SDK #46328
Unanswered
dotnetcadet
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a project I've been working on for a few years that I need to publish as an SDK. I want to publish it as an MSBuild Project SDK via nuget package which can then be referenced like so
<Project Sdk="MySdk/{Version}"/>
. I'm trying to include all the tooling, analyzers, anddll'
s within the SDK, but I'm having issues with packaging it properly. Documentation feels limited around this area, but I may be looking in the wrong place.The project targets multiple .NET runtimes (
net6.0;net8.0;net9.0
) and has some custom build steps I'm doing with PowerShell which I want to convert to Tasks.I've created a sample repo which is a slimmed down version of my repository structure: mysamplesdk. Using this project as a reference I would expect the contents of my nuget package to be like this:
When I reference the SDK in a simple class library propect I would expect it to resolve the targets and props for Microsoft.NET.Sdk as those are imported within the
Sdk/Sdk.props
andSdk.targets
of my own Sdk.Simply, I'm trying to figure out how you properly build & publish the SDK?
Beta Was this translation helpful? Give feedback.
All reactions