Skip to content

Commit f640c1a

Browse files
Update SDK (#51240)
* Update global.json * Fix build --------- Co-authored-by: Igor Velikorossov <[email protected]>
1 parent 742cbd9 commit f640c1a

File tree

7 files changed

+33
-7
lines changed

7 files changed

+33
-7
lines changed

eng/SourceBuildPrebuiltBaseline.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,13 @@
3131
<UsagePattern IdentityGlob="System.Composition/*7.0.0*" />
3232
<UsagePattern IdentityGlob="System.Threading.Tasks.Extensions/*4.5.3*" />
3333

34+
<!--
35+
To be removed when the SDK is bringing this version, see https://github.com/dotnet/aspnetcore/issues/51339
36+
-->
37+
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Ref/*8.0*" />
3438

3539
<!-- These are coming in via runtime but the source-build infra isn't able to automatically pick up the right intermediate. -->
36-
<UsagePattern IdentityGlob="Microsoft.NET.ILLink.Tasks/*8.0.*" />
40+
<UsagePattern IdentityGlob="Microsoft.NET.ILLink.Tasks/*9.0.*" />
3741
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Crossgen2.linux-x64/*9.0.*" />
3842

3943
<!-- Transivite dependency of Microsoft.CodeAnalysis.ExternalAccess.AspNetCore -> Microsoft.CodeAnalysis.Features.

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"sdk": {
3-
"version": "9.0.100-alpha.1.23502.7"
3+
"version": "9.0.100-alpha.1.23504.14"
44
},
55
"tools": {
6-
"dotnet": "9.0.100-alpha.1.23502.7",
6+
"dotnet": "9.0.100-alpha.1.23504.14",
77
"runtimes": {
88
"dotnet/x86": [
99
"$(MicrosoftNETCoreBrowserDebugHostTransportVersion)"

src/Components/Web.JS/dist/Release/blazor.server.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Components/Web.JS/dist/Release/blazor.web.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Components/Web.JS/dist/Release/blazor.webview.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Components/Web.JS/src/Rendering/BrowserRenderer.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,28 @@ function parseMarkup(markup: string, isSvg: boolean) {
400400
return sharedSvgElemForParsing;
401401
} else {
402402
sharedTemplateElemForParsing.innerHTML = markup || ' ';
403+
404+
// Since this is a markup string, we want to honor the developer's intent to
405+
// evaluate any scripts it may contain. Scripts parsed from an innerHTML assignment
406+
// won't be executable by default (https://stackoverflow.com/questions/1197575/can-scripts-be-inserted-with-innerhtml)
407+
// but that's inconsistent with anything constructed from a sequence like:
408+
// - OpenElement("script")
409+
// - AddContent(js) or AddMarkupContent(js)
410+
// - CloseElement()
411+
// It doesn't make sense to have such an inconsistency in Blazor's interactive
412+
// renderer, and for back-compat with pre-.NET 8 code (when the Razor compiler always
413+
// used OpenElement like above), as well as consistency with static SSR, we need to make it work.
414+
sharedTemplateElemForParsing.content.querySelectorAll('script').forEach(oldScriptElem => {
415+
const newScriptElem = document.createElement('script');
416+
newScriptElem.textContent = oldScriptElem.textContent;
417+
418+
oldScriptElem.getAttributeNames().forEach(attribName => {
419+
newScriptElem.setAttribute(attribName, oldScriptElem.getAttribute(attribName)!);
420+
});
421+
422+
oldScriptElem.parentNode!.replaceChild(newScriptElem, oldScriptElem);
423+
});
424+
403425
return sharedTemplateElemForParsing.content;
404426
}
405427
}

src/OpenApi/src/OpenApiGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ private static OpenApiResponses GetOpenApiResponses(MethodInfo method, EndpointM
186186
eligibileAnnotations[statusCode] = (discoveredTypeAnnotation, discoveredContentTypeAnnotation);
187187
}
188188

189-
if (eligibileAnnotations.Count == 0)
189+
if (responseType != null && eligibileAnnotations.Count == 0)
190190
{
191191
GenerateDefaultResponses(eligibileAnnotations, responseType);
192192
}

0 commit comments

Comments
 (0)