Repository navigation
Add Joinery.Dovetail.Sdk.Web, a web application's only SDK - #302
Closed
david-driscoll wants to merge 1 commit into
Closed
david-driscoll wants to merge 1 commit into
david-driscoll wants to merge 1 commit into
Conversation
<Project Sdk="Joinery.Dovetail.Sdk.Web"> imports Microsoft.NET.Sdk.Web and then Joinery.Dovetail.Sdk, as <Project Sdk="Microsoft.NET.Sdk.Web"> with an <Sdk Name="Joinery.Dovetail.Sdk" /> element does. As the only SDK, Joinery.Dovetail.Sdk can only bring Microsoft.NET.Sdk, so a web application couldn't use the project SDK syntax before. SdkSample.Web uses it, and HostTypeTests checks it is detected as a WebApplication. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
SummarySummary
Coverageapp - 94.2%
AspireSample - 1%
Joinery.Dovetail - 50.4%
Joinery.Dovetail.Analyzers - 87.7%
Joinery.Dovetail.Aspire - 19.2%
Joinery.Dovetail.Aspire.Testing - 33.2%
Joinery.Dovetail.Autofac - 20.8%
Joinery.Dovetail.Build.Tasks - 80.7%
Joinery.Dovetail.Configuration.Json - 12%
Joinery.Dovetail.Configuration.Toml - 2.5%
Joinery.Dovetail.Configuration.Yaml - 33%
Joinery.Dovetail.DryIoc - 21%
Joinery.Dovetail.Hosting - 10.3%
Joinery.Dovetail.Mermaid - 30.5%
Joinery.Dovetail.OpenTelemetry - 21.5%
Joinery.Dovetail.Serilog - 36.6%
Joinery.Dovetail.Stashbox - 23.7%
lib - 100%
Rocket.Surgery.Extensions.Testing - 19.4%
Rocket.Surgery.Extensions.Testing.FakeItEasy - 12.5%
Rocket.Surgery.Extensions.Testing.SourceGenerators - 35.1%
Rocket.Surgery.Extensions.Testing.TUnit - 3.4%
Sample.BlazorWasm - 0%
Sample.Core - 0%
Sample.DependencyOne - 0%
Sample.DependencyThree - 0%
Sample.DependencyTwo - 0%
Specular - 0%
web - 85%
|
Member
Author
|
Closing for now: a web SDK of its own would lead to mirroring every SDK type (Worker, Razor, BlazorWebAssembly...). A web application keeps applying Joinery.Dovetail.Sdk with an 🤖 Closed by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
Joinery.Dovetail.Sdk.Web, so a web application can name Dovetail as its only SDK:Since #300,
<Project Sdk="Joinery.Dovetail.Sdk/…">works for console apps and workers, because the SDK bringsMicrosoft.NET.Sdkwhen it's the only one. A web application needsMicrosoft.NET.Sdk.Webinstead, and an SDK can't tell which one the project wants before the project's own properties are read, so it needs a package of its own: an MSBuild SDK's name is its package id.What it does
Sdk.propsimportsMicrosoft.NET.Sdk.Web's props, thenJoinery.Dovetail.Sdk's.Sdk.targetsdoes the same with the targets. That's the order<Project Sdk="Microsoft.NET.Sdk.Web">with<Sdk Name="Joinery.Dovetail.Sdk" />gives.Joinery.Dovetail.SdkfindsUsingMicrosoftNETSdkalready set, so it doesn't bringMicrosoft.NET.Sdka second time.Joinery.Dovetail.Sdkversion isDovetailSdkVersion. It's written into the package'sSdk/Packages.propswhen it's packed, and defaults to the web SDK's own version, since every Dovetail package ships at one version. An application can set it first, as a global property, to chain another version.SdkSample.Webnow uses<Project Sdk="Joinery.Dovetail.Sdk.Web/0.0.0-sample">. The README andreference/dovetail-host.mdmention the new SDK.Verification
HostTypeTests.WebApplication_WebSdk_DetectsHostAndInjectsHostingWeb: a project whose only SDK isJoinery.Dovetail.Sdk.Web(version pinned in global.json) is detected as aWebApplicationand getsJoinery.Dovetail.Hosting. Its snapshot matches the existing web-app snapshot apart from the extra SDK files andDovetailSdkVersion.SdkSample.WebanswersGET /with its greeting.LaunchPad gets the same for its SDK (
Rocket.Surgery.LaunchPad.Sdk.Web) in RocketSurgeonsGuild/LaunchPad#3126. It importsMicrosoft.NET.Sdk.Webitself, so it doesn't need this PR released first.🤖 Generated with Claude Code