Quellcode durchsuchen

Update SDK (#51240)

* Update global.json

* Fix build

---------

Co-authored-by: Igor Velikorossov <[email protected]>
Mackinnon Buck vor 2 Jahren
Ursprung
Commit
f640c1af84

+ 5 - 1
eng/SourceBuildPrebuiltBaseline.xml

@@ -31,9 +31,13 @@
     <UsagePattern IdentityGlob="System.Composition/*7.0.0*" />
     <UsagePattern IdentityGlob="System.Threading.Tasks.Extensions/*4.5.3*" />
 
+    <!--
+      To be removed when the SDK is bringing this version, see https://github.com/dotnet/aspnetcore/issues/51339
+      -->
+    <UsagePattern IdentityGlob="Microsoft.NETCore.App.Ref/*8.0*" />
 
     <!-- These are coming in via runtime but the source-build infra isn't able to automatically pick up the right intermediate. -->
-    <UsagePattern IdentityGlob="Microsoft.NET.ILLink.Tasks/*8.0.*" />
+    <UsagePattern IdentityGlob="Microsoft.NET.ILLink.Tasks/*9.0.*" />
     <UsagePattern IdentityGlob="Microsoft.NETCore.App.Crossgen2.linux-x64/*9.0.*" />
 
     <!-- Transivite dependency of Microsoft.CodeAnalysis.ExternalAccess.AspNetCore -> Microsoft.CodeAnalysis.Features.

+ 2 - 2
global.json

@@ -1,9 +1,9 @@
 {
   "sdk": {
-    "version": "9.0.100-alpha.1.23502.7"
+    "version": "9.0.100-alpha.1.23504.14"
   },
   "tools": {
-    "dotnet": "9.0.100-alpha.1.23502.7",
+    "dotnet": "9.0.100-alpha.1.23504.14",
     "runtimes": {
       "dotnet/x86": [
         "$(MicrosoftNETCoreBrowserDebugHostTransportVersion)"

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
src/Components/Web.JS/dist/Release/blazor.server.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
src/Components/Web.JS/dist/Release/blazor.web.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
src/Components/Web.JS/dist/Release/blazor.webview.js


+ 22 - 0
src/Components/Web.JS/src/Rendering/BrowserRenderer.ts

@@ -400,6 +400,28 @@ function parseMarkup(markup: string, isSvg: boolean) {
     return sharedSvgElemForParsing;
   } else {
     sharedTemplateElemForParsing.innerHTML = markup || ' ';
+
+    // Since this is a markup string, we want to honor the developer's intent to
+    // evaluate any scripts it may contain. Scripts parsed from an innerHTML assignment
+    // won't be executable by default (https://stackoverflow.com/questions/1197575/can-scripts-be-inserted-with-innerhtml)
+    // but that's inconsistent with anything constructed from a sequence like:
+    // - OpenElement("script")
+    // - AddContent(js) or AddMarkupContent(js)
+    // - CloseElement()
+    // It doesn't make sense to have such an inconsistency in Blazor's interactive
+    // renderer, and for back-compat with pre-.NET 8 code (when the Razor compiler always
+    // used OpenElement like above), as well as consistency with static SSR, we need to make it work.
+    sharedTemplateElemForParsing.content.querySelectorAll('script').forEach(oldScriptElem => {
+      const newScriptElem = document.createElement('script');
+      newScriptElem.textContent = oldScriptElem.textContent;
+
+      oldScriptElem.getAttributeNames().forEach(attribName => {
+        newScriptElem.setAttribute(attribName, oldScriptElem.getAttribute(attribName)!);
+      });
+
+      oldScriptElem.parentNode!.replaceChild(newScriptElem, oldScriptElem);
+    });
+
     return sharedTemplateElemForParsing.content;
   }
 }

+ 1 - 1
src/OpenApi/src/OpenApiGenerator.cs

@@ -186,7 +186,7 @@ internal sealed class OpenApiGenerator
             eligibileAnnotations[statusCode] = (discoveredTypeAnnotation, discoveredContentTypeAnnotation);
         }
 
-        if (eligibileAnnotations.Count == 0)
+        if (responseType != null && eligibileAnnotations.Count == 0)
         {
             GenerateDefaultResponses(eligibileAnnotations, responseType);
         }

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.