diff --git a/eng/ProjectReferences.props b/eng/ProjectReferences.props index ada18f733e..6fa112f0b3 100644 --- a/eng/ProjectReferences.props +++ b/eng/ProjectReferences.props @@ -5,13 +5,14 @@ --> + - + - + diff --git a/src/Components/Blazor.sln b/src/Components/Blazor.sln index b086417abd..f203a56ddf 100644 --- a/src/Components/Blazor.sln +++ b/src/Components/Blazor.sln @@ -47,7 +47,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebAssembly.JSInterop", "WebAssembly.JSInterop", "{37FA056D-A7B3-4F72-A8B9-8D3C175E831E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebAssembly.JSInterop", "WebAssembly\JSInterop\src\WebAssembly.JSInterop.csproj", "{FBD7C733-200E-4BED-8B31-2610C2263F72}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebAssembly.JSInterop", "WebAssembly\JSInterop\src\Microsoft.JSInterop.WebAssembly.csproj", "{FBD7C733-200E-4BED-8B31-2610C2263F72}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Server", "Server", "{7920B09F-8016-49CF-A229-E72D0CECDD17}" EndProject diff --git a/src/Components/WebAssembly/Build/test/RuntimeDependenciesResolverTest.cs b/src/Components/WebAssembly/Build/test/RuntimeDependenciesResolverTest.cs index 96aaf9458e..bf69c74c91 100644 --- a/src/Components/WebAssembly/Build/test/RuntimeDependenciesResolverTest.cs +++ b/src/Components/WebAssembly/Build/test/RuntimeDependenciesResolverTest.cs @@ -56,6 +56,8 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.Build "Microsoft.Extensions.Logging.Abstractions.dll", "Microsoft.Extensions.Primitives.dll", "Microsoft.JSInterop.dll", + "Microsoft.JSInterop.WebAssembly.dll", + "Microsoft.JSInterop.WebAssembly.pdb", "Mono.Security.dll", "mscorlib.dll", "netstandard.dll", @@ -86,8 +88,6 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.Build "System.Xml.dll", "System.Xml.Linq.dll", "WebAssembly.Bindings.dll", - "WebAssembly.JSInterop.dll", - "WebAssembly.JSInterop.pdb", "WebAssembly.Net.Http.dll", "WebAssembly.Net.WebSockets.dll", }.OrderBy(i => i, StringComparer.Ordinal) diff --git a/src/Components/WebAssembly/JSInterop/src/InternalCalls.cs b/src/Components/WebAssembly/JSInterop/src/InternalCalls.cs index f27e40bedd..60e19f025c 100644 --- a/src/Components/WebAssembly/JSInterop/src/InternalCalls.cs +++ b/src/Components/WebAssembly/JSInterop/src/InternalCalls.cs @@ -7,12 +7,13 @@ namespace WebAssembly.JSInterop { /// /// Methods that map to the functions compiled into the Mono WebAssembly runtime, - /// as defined by 'mono_add_internal_call' calls in driver.c + /// as defined by 'mono_add_internal_call' calls in driver.c. /// internal static class InternalCalls { // The exact namespace, type, and method names must match the corresponding entries // in driver.c in the Mono distribution + /// See: https://github.com/mono/mono/blob/90574987940959fe386008a850982ea18236a533/sdks/wasm/src/driver.c#L318-L319 // We're passing asyncHandle by ref not because we want it to be writable, but so it gets // passed as a pointer (4 bytes). We can pass 4-byte values, but not 8-byte ones. diff --git a/src/Components/WebAssembly/JSInterop/src/WebAssembly.JSInterop.csproj b/src/Components/WebAssembly/JSInterop/src/Microsoft.JSInterop.WebAssembly.csproj similarity index 100% rename from src/Components/WebAssembly/JSInterop/src/WebAssembly.JSInterop.csproj rename to src/Components/WebAssembly/JSInterop/src/Microsoft.JSInterop.WebAssembly.csproj diff --git a/src/Components/WebAssembly/JSInterop/src/WebAssemblyJSRuntime.cs b/src/Components/WebAssembly/JSInterop/src/WebAssemblyJSRuntime.cs index 0877c0a439..020052115a 100644 --- a/src/Components/WebAssembly/JSInterop/src/WebAssemblyJSRuntime.cs +++ b/src/Components/WebAssembly/JSInterop/src/WebAssemblyJSRuntime.cs @@ -2,10 +2,10 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Text.Json; -using Microsoft.JSInterop; using Microsoft.JSInterop.Infrastructure; +using WebAssembly.JSInterop; -namespace WebAssembly.JSInterop +namespace Microsoft.JSInterop.WebAssembly { /// /// Provides methods for invoking JavaScript functions for applications running diff --git a/src/Components/WebAssembly/WebAssembly/ref/Microsoft.AspNetCore.Components.WebAssembly.csproj b/src/Components/WebAssembly/WebAssembly/ref/Microsoft.AspNetCore.Components.WebAssembly.csproj index aea7b33bdb..2ce680396c 100644 --- a/src/Components/WebAssembly/WebAssembly/ref/Microsoft.AspNetCore.Components.WebAssembly.csproj +++ b/src/Components/WebAssembly/WebAssembly/ref/Microsoft.AspNetCore.Components.WebAssembly.csproj @@ -2,12 +2,11 @@ netstandard2.1 - $(NoWarn);BL0006 - + diff --git a/src/Components/WebAssembly/WebAssembly/ref/Microsoft.AspNetCore.Components.WebAssembly.netstandard2.1.cs b/src/Components/WebAssembly/WebAssembly/ref/Microsoft.AspNetCore.Components.WebAssembly.netstandard2.1.cs index 68294249f7..7cf045134d 100644 --- a/src/Components/WebAssembly/WebAssembly/ref/Microsoft.AspNetCore.Components.WebAssembly.netstandard2.1.cs +++ b/src/Components/WebAssembly/WebAssembly/ref/Microsoft.AspNetCore.Components.WebAssembly.netstandard2.1.cs @@ -1,15 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.AspNetCore.Components.WebAssembly -{ - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static partial class JSInteropMethods - { - [Microsoft.JSInterop.JSInvokableAttribute("NotifyLocationChanged")] - public static void NotifyLocationChanged(string uri, bool isInterceptedLink) { } - } -} namespace Microsoft.AspNetCore.Components.WebAssembly.Hosting { [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -43,6 +34,7 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.Hosting public Microsoft.AspNetCore.Components.WebAssembly.Hosting.RootComponentMappingCollection RootComponents { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } public Microsoft.Extensions.DependencyInjection.IServiceCollection Services { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } public Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHost Build() { throw null; } + public void ConfigureContainer(Microsoft.Extensions.DependencyInjection.IServiceProviderFactory factory, System.Action configure = null) { } public static Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostBuilder CreateDefault(string[] args = null) { throw null; } } } @@ -59,11 +51,21 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.Http public static Microsoft.AspNetCore.Components.WebAssembly.Http.FetchCredentialsOption DefaultCredentials { get { throw null; } set { } } } } -namespace Microsoft.AspNetCore.Components.WebAssembly.Rendering +namespace Microsoft.AspNetCore.Components.WebAssembly.Infrastructure { - public static partial class WebAssemblyEventDispatcher + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static partial class JSInteropMethods { [Microsoft.JSInterop.JSInvokableAttribute("DispatchEvent")] public static System.Threading.Tasks.Task DispatchEvent(Microsoft.AspNetCore.Components.RenderTree.WebEventDescriptor eventDescriptor, string eventArgsJson) { throw null; } + [Microsoft.JSInterop.JSInvokableAttribute("NotifyLocationChanged")] + public static void NotifyLocationChanged(string uri, bool isInterceptedLink) { } + } +} +namespace Microsoft.Extensions.DependencyInjection +{ + public static partial class HttpClientServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddBaseAddressHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection serviceCollection) { throw null; } } } diff --git a/src/Components/WebAssembly/WebAssembly/src/Microsoft.AspNetCore.Components.WebAssembly.csproj b/src/Components/WebAssembly/WebAssembly/src/Microsoft.AspNetCore.Components.WebAssembly.csproj index 60e2999115..db9f3d9508 100644 --- a/src/Components/WebAssembly/WebAssembly/src/Microsoft.AspNetCore.Components.WebAssembly.csproj +++ b/src/Components/WebAssembly/WebAssembly/src/Microsoft.AspNetCore.Components.WebAssembly.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/Components/WebAssembly/WebAssembly/src/Services/DefaultWebAssemblyJSRuntime.cs b/src/Components/WebAssembly/WebAssembly/src/Services/DefaultWebAssemblyJSRuntime.cs index f01aac471a..3ee84bd412 100644 --- a/src/Components/WebAssembly/WebAssembly/src/Services/DefaultWebAssemblyJSRuntime.cs +++ b/src/Components/WebAssembly/WebAssembly/src/Services/DefaultWebAssemblyJSRuntime.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.JSInterop.Infrastructure; -using WebAssembly.JSInterop; +using Microsoft.JSInterop.WebAssembly; namespace Microsoft.AspNetCore.Components.WebAssembly.Services { diff --git a/src/ProjectTemplates/ComponentsWebAssembly.ProjectTemplates/Microsoft.AspNetCore.Components.WebAssembly.Templates.csproj b/src/ProjectTemplates/ComponentsWebAssembly.ProjectTemplates/Microsoft.AspNetCore.Components.WebAssembly.Templates.csproj index 2114da40bf..3774f45287 100644 --- a/src/ProjectTemplates/ComponentsWebAssembly.ProjectTemplates/Microsoft.AspNetCore.Components.WebAssembly.Templates.csproj +++ b/src/ProjectTemplates/ComponentsWebAssembly.ProjectTemplates/Microsoft.AspNetCore.Components.WebAssembly.Templates.csproj @@ -29,7 +29,6 @@ MicrosoftEntityFrameworkCoreSqlServerPackageVersion=$(MicrosoftEntityFrameworkCoreSqlServerPackageVersion); MicrosoftEntityFrameworkCoreSqlitePackageVersion=$(MicrosoftEntityFrameworkCoreSqlitePackageVersion); MicrosoftEntityFrameworkCoreToolsPackageVersion=$(MicrosoftEntityFrameworkCoreToolsPackageVersion); - MonoWebAssemblyInteropPackageVersion=$(MonoWebAssemblyInteropPackageVersion); @@ -39,7 +38,6 @@ -