Decouple migrating code from non-migrating code (#1725)
* Stop referencing BlazorBuildToolsExe in .Browser.JS * Have Components projects always reference .Blazor.Mono as a package, not from source * Finish decoupling of .Browser.JS from Blazor.BuildTools * Fix reference resolver unit test to find Mono BCL in .Blazor.Mono package * Remove typo * Have .Browser.JS consume jsinterop only via an NPM package reference * Reference JSInterop .NET libraries only via NuGet package references, not directly from source * Update dependency resolver unit test * Update package name in package-lock.json * When bundling jsinterop DLL into Build package, don't re-sign it (treat it as external)
This commit is contained in:
parent
682e8e6573
commit
163d6f7c54
|
|
@ -0,0 +1,25 @@
|
|||
// 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.
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace WebAssembly.JSInterop
|
||||
{
|
||||
// This file is copied from https://github.com/dotnet/jsinterop/blob/master/src/Mono.WebAssembly.Interop/InternalCalls.cs
|
||||
// so that MonoSanityClient can directly use the same underlying interop APIs (because
|
||||
// we're trying to observe the behavior of the Mono runtime itself, not JSInterop).
|
||||
|
||||
internal class InternalCalls
|
||||
{
|
||||
// The exact namespace, type, and method names must match the corresponding entries
|
||||
// in driver.c in the Mono distribution
|
||||
|
||||
// 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.
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
public static extern string InvokeJSMarshalled(out string exception, ref long asyncHandle, string functionIdentifier, string argsJson);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
public static extern TRes InvokeJSUnmarshalled<T0, T1, T2, TRes>(out string exception, string functionIdentifier, T0 arg0, T1 arg1, T2 arg2);
|
||||
}
|
||||
}
|
||||
|
|
@ -13,9 +13,4 @@
|
|||
<!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" /> -->
|
||||
<Import Project="..\..\..\src\Microsoft.AspNetCore.Components.Build\ReferenceFromSource.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Share the InternalCalls.cs source here so we get access to the same interop externs -->
|
||||
<Compile Include="..\..\..\modules\jsinterop\src\Mono.WebAssembly.Interop\InternalCalls.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@
|
|||
"Microsoft.Extensions.FileProviders.Physical.dll",
|
||||
"Microsoft.Extensions.FileSystemGlobbing.dll",
|
||||
"Microsoft.Extensions.Primitives.dll",
|
||||
"Microsoft.JSInterop.dll",
|
||||
"Mono.Cecil.dll",
|
||||
"Mono.Cecil.Mdb.dll",
|
||||
"Mono.Cecil.Pdb.dll",
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@
|
|||
<TemplateBlazorPackageVersion>0.8.0-preview1-20181122.3</TemplateBlazorPackageVersion>
|
||||
<TemplateRazorDesignPackageVersion>2.1.2</TemplateRazorDesignPackageVersion>
|
||||
<RazorPackageVersion>2.1.0</RazorPackageVersion>
|
||||
<MicrosoftAspNetCoreBlazorMonoPackageVersion>0.8.0-preview1-20181126.1</MicrosoftAspNetCoreBlazorMonoPackageVersion>
|
||||
|
||||
<!-- When updating this, ensure you also update Browser.JS/package.json to reference the corresponding version of @dotnet/jsinterop -->
|
||||
<JSInteropPackageVersion>0.8.0-preview1-20181126.1</JSInteropPackageVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(DotNetPackageVersionPropsPath)" Condition=" '$(DotNetPackageVersionPropsPath)' != '' " />
|
||||
|
|
|
|||
|
|
@ -12,16 +12,11 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\blazor\src\Microsoft.AspNetCore.Blazor.BuildTools\Microsoft.AspNetCore.Blazor.BuildTools.csproj" PrivateAssets="all" ReferenceOutputAssembly="false" />
|
||||
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="$(AspNetCorePackageVersion)" />
|
||||
<WebpackInputs Include="**\*.ts" Exclude="node_modules\**" />
|
||||
<WebpackInputs Include="..\..\modules\jsinterop\src\Microsoft.JSInterop.JS\src\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="..\..\blazor\src\Microsoft.AspNetCore.Blazor.BuildTools\BuildToolsExe.props" />
|
||||
|
||||
<Target Name="EnsureNpmRestored" Condition="!Exists('node_modules')">
|
||||
<Exec Command="$(BlazorBuildToolsExe) checknodejs -v 8.3.0" />
|
||||
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
|
||||
<Exec Command="npm install" />
|
||||
</Target>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "blazor.host.client",
|
||||
"name": "microsoft.aspnetcore.components.browser.js",
|
||||
"version": "0.0.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
|
|
@ -19,6 +19,12 @@
|
|||
"msgpack5": "4.2.0"
|
||||
}
|
||||
},
|
||||
"@dotnet/jsinterop": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@dotnet/jsinterop/-/jsinterop-0.1.1.tgz",
|
||||
"integrity": "sha512-/Y5f3rtzZ85y8ukBds6IHRgnu7zwlAxe/JhaqN8mvj/JPDA4AtfdNqjJBZuZJxLrP0k6+q4owx/DS7LyZWccFQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/emscripten": {
|
||||
"version": "0.0.31",
|
||||
"resolved": "https://registry.npmjs.org/@types/emscripten/-/emscripten-0.0.31.tgz",
|
||||
|
|
@ -1533,23 +1539,21 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"delegates": "^1.0.0",
|
||||
"readable-stream": "^2.0.6"
|
||||
"delegates": "1.0.0",
|
||||
"readable-stream": "2.3.6"
|
||||
}
|
||||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"balanced-match": "1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
|
|
@ -1562,20 +1566,17 @@
|
|||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
|
|
@ -1616,7 +1617,7 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minipass": "^2.2.1"
|
||||
"minipass": "2.2.4"
|
||||
}
|
||||
},
|
||||
"fs.realpath": {
|
||||
|
|
@ -1631,14 +1632,14 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"aproba": "^1.0.3",
|
||||
"console-control-strings": "^1.0.0",
|
||||
"has-unicode": "^2.0.0",
|
||||
"object-assign": "^4.1.0",
|
||||
"signal-exit": "^3.0.0",
|
||||
"string-width": "^1.0.1",
|
||||
"strip-ansi": "^3.0.1",
|
||||
"wide-align": "^1.1.0"
|
||||
"aproba": "1.2.0",
|
||||
"console-control-strings": "1.1.0",
|
||||
"has-unicode": "2.0.1",
|
||||
"object-assign": "4.1.1",
|
||||
"signal-exit": "3.0.2",
|
||||
"string-width": "1.0.2",
|
||||
"strip-ansi": "3.0.1",
|
||||
"wide-align": "1.1.2"
|
||||
}
|
||||
},
|
||||
"glob": {
|
||||
|
|
@ -1647,12 +1648,12 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
"fs.realpath": "1.0.0",
|
||||
"inflight": "1.0.6",
|
||||
"inherits": "2.0.3",
|
||||
"minimatch": "3.0.4",
|
||||
"once": "1.4.0",
|
||||
"path-is-absolute": "1.0.1"
|
||||
}
|
||||
},
|
||||
"has-unicode": {
|
||||
|
|
@ -1667,7 +1668,7 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safer-buffer": "^2.1.0"
|
||||
"safer-buffer": "2.1.2"
|
||||
}
|
||||
},
|
||||
"ignore-walk": {
|
||||
|
|
@ -1676,7 +1677,7 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimatch": "^3.0.4"
|
||||
"minimatch": "3.0.4"
|
||||
}
|
||||
},
|
||||
"inflight": {
|
||||
|
|
@ -1685,15 +1686,14 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
"once": "1.4.0",
|
||||
"wrappy": "1.0.2"
|
||||
}
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
|
|
@ -1705,9 +1705,8 @@
|
|||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
"number-is-nan": "1.0.1"
|
||||
}
|
||||
},
|
||||
"isarray": {
|
||||
|
|
@ -1720,25 +1719,22 @@
|
|||
"version": "3.0.4",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
"brace-expansion": "1.1.11"
|
||||
}
|
||||
},
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"minipass": {
|
||||
"version": "2.2.4",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.1",
|
||||
"yallist": "^3.0.0"
|
||||
"safe-buffer": "5.1.1",
|
||||
"yallist": "3.0.2"
|
||||
}
|
||||
},
|
||||
"minizlib": {
|
||||
|
|
@ -1747,14 +1743,13 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minipass": "^2.2.1"
|
||||
"minipass": "2.2.4"
|
||||
}
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
|
|
@ -1771,9 +1766,9 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"debug": "^2.1.2",
|
||||
"iconv-lite": "^0.4.4",
|
||||
"sax": "^1.2.4"
|
||||
"debug": "2.6.9",
|
||||
"iconv-lite": "0.4.21",
|
||||
"sax": "1.2.4"
|
||||
}
|
||||
},
|
||||
"node-pre-gyp": {
|
||||
|
|
@ -1782,16 +1777,16 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"detect-libc": "^1.0.2",
|
||||
"mkdirp": "^0.5.1",
|
||||
"needle": "^2.2.0",
|
||||
"nopt": "^4.0.1",
|
||||
"npm-packlist": "^1.1.6",
|
||||
"npmlog": "^4.0.2",
|
||||
"rc": "^1.1.7",
|
||||
"rimraf": "^2.6.1",
|
||||
"semver": "^5.3.0",
|
||||
"tar": "^4"
|
||||
"detect-libc": "1.0.3",
|
||||
"mkdirp": "0.5.1",
|
||||
"needle": "2.2.0",
|
||||
"nopt": "4.0.1",
|
||||
"npm-packlist": "1.1.10",
|
||||
"npmlog": "4.1.2",
|
||||
"rc": "1.2.7",
|
||||
"rimraf": "2.6.2",
|
||||
"semver": "5.5.0",
|
||||
"tar": "4.4.1"
|
||||
}
|
||||
},
|
||||
"nopt": {
|
||||
|
|
@ -1800,8 +1795,8 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"abbrev": "1",
|
||||
"osenv": "^0.1.4"
|
||||
"abbrev": "1.1.1",
|
||||
"osenv": "0.1.5"
|
||||
}
|
||||
},
|
||||
"npm-bundled": {
|
||||
|
|
@ -1816,8 +1811,8 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ignore-walk": "^3.0.1",
|
||||
"npm-bundled": "^1.0.1"
|
||||
"ignore-walk": "3.0.1",
|
||||
"npm-bundled": "1.0.3"
|
||||
}
|
||||
},
|
||||
"npmlog": {
|
||||
|
|
@ -1826,17 +1821,16 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"are-we-there-yet": "~1.1.2",
|
||||
"console-control-strings": "~1.1.0",
|
||||
"gauge": "~2.7.3",
|
||||
"set-blocking": "~2.0.0"
|
||||
"are-we-there-yet": "1.1.4",
|
||||
"console-control-strings": "1.1.0",
|
||||
"gauge": "2.7.4",
|
||||
"set-blocking": "2.0.0"
|
||||
}
|
||||
},
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
|
|
@ -1848,9 +1842,8 @@
|
|||
"version": "1.4.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
"wrappy": "1.0.2"
|
||||
}
|
||||
},
|
||||
"os-homedir": {
|
||||
|
|
@ -1871,8 +1864,8 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"os-homedir": "^1.0.0",
|
||||
"os-tmpdir": "^1.0.0"
|
||||
"os-homedir": "1.0.2",
|
||||
"os-tmpdir": "1.0.2"
|
||||
}
|
||||
},
|
||||
"path-is-absolute": {
|
||||
|
|
@ -1893,10 +1886,10 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"deep-extend": "^0.5.1",
|
||||
"ini": "~1.3.0",
|
||||
"minimist": "^1.2.0",
|
||||
"strip-json-comments": "~2.0.1"
|
||||
"deep-extend": "0.5.1",
|
||||
"ini": "1.3.5",
|
||||
"minimist": "1.2.0",
|
||||
"strip-json-comments": "2.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"minimist": {
|
||||
|
|
@ -1913,13 +1906,13 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"core-util-is": "~1.0.0",
|
||||
"inherits": "~2.0.3",
|
||||
"isarray": "~1.0.0",
|
||||
"process-nextick-args": "~2.0.0",
|
||||
"safe-buffer": "~5.1.1",
|
||||
"string_decoder": "~1.1.1",
|
||||
"util-deprecate": "~1.0.1"
|
||||
"core-util-is": "1.0.2",
|
||||
"inherits": "2.0.3",
|
||||
"isarray": "1.0.0",
|
||||
"process-nextick-args": "2.0.0",
|
||||
"safe-buffer": "5.1.1",
|
||||
"string_decoder": "1.1.1",
|
||||
"util-deprecate": "1.0.2"
|
||||
}
|
||||
},
|
||||
"rimraf": {
|
||||
|
|
@ -1928,7 +1921,7 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"glob": "^7.0.5"
|
||||
"glob": "7.1.2"
|
||||
}
|
||||
},
|
||||
"safe-buffer": {
|
||||
|
|
@ -1970,11 +1963,10 @@
|
|||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
"is-fullwidth-code-point": "^1.0.0",
|
||||
"strip-ansi": "^3.0.0"
|
||||
"code-point-at": "1.1.0",
|
||||
"is-fullwidth-code-point": "1.0.0",
|
||||
"strip-ansi": "3.0.1"
|
||||
}
|
||||
},
|
||||
"string_decoder": {
|
||||
|
|
@ -1983,7 +1975,7 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "~5.1.0"
|
||||
"safe-buffer": "5.1.1"
|
||||
}
|
||||
},
|
||||
"strip-ansi": {
|
||||
|
|
@ -1991,7 +1983,7 @@
|
|||
"bundled": true,
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
"ansi-regex": "2.1.1"
|
||||
}
|
||||
},
|
||||
"strip-json-comments": {
|
||||
|
|
@ -2006,13 +1998,13 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"chownr": "^1.0.1",
|
||||
"fs-minipass": "^1.2.5",
|
||||
"minipass": "^2.2.4",
|
||||
"minizlib": "^1.1.0",
|
||||
"mkdirp": "^0.5.0",
|
||||
"safe-buffer": "^5.1.1",
|
||||
"yallist": "^3.0.2"
|
||||
"chownr": "1.0.1",
|
||||
"fs-minipass": "1.2.5",
|
||||
"minipass": "2.2.4",
|
||||
"minizlib": "1.1.0",
|
||||
"mkdirp": "0.5.1",
|
||||
"safe-buffer": "5.1.1",
|
||||
"yallist": "3.0.2"
|
||||
}
|
||||
},
|
||||
"util-deprecate": {
|
||||
|
|
@ -2027,7 +2019,7 @@
|
|||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"string-width": "^1.0.2"
|
||||
"string-width": "1.0.2"
|
||||
}
|
||||
},
|
||||
"wrappy": {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "blazor.host.client",
|
||||
"name": "microsoft.aspnetcore.components.browser.js",
|
||||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
|
|
@ -9,12 +9,13 @@
|
|||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aspnet/signalr": "^1.0.0",
|
||||
"@aspnet/signalr-protocol-msgpack": "^1.0.0",
|
||||
"@dotnet/jsinterop": "^0.1.1",
|
||||
"@types/emscripten": "0.0.31",
|
||||
"ts-loader": "^4.4.1",
|
||||
"typescript": "^2.9.2",
|
||||
"webpack": "^4.12.0",
|
||||
"webpack-cli": "^3.0.8",
|
||||
"@aspnet/signalr": "^1.0.0",
|
||||
"@aspnet/signalr-protocol-msgpack": "^1.0.0"
|
||||
"webpack-cli": "^3.0.8"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import '../../../modules/jsinterop/src/Microsoft.JSInterop.JS/src/Microsoft.JSInterop';
|
||||
import '@dotnet/jsinterop';
|
||||
import './GlobalExports';
|
||||
import * as Environment from './Environment';
|
||||
import * as signalR from '@aspnet/signalr';
|
||||
import { MessagePackHubProtocol } from '@aspnet/signalr-protocol-msgpack';
|
||||
import { OutOfProcessRenderBatch } from './Rendering/RenderBatch/OutOfProcessRenderBatch';
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
import '../../../modules/jsinterop/src/Microsoft.JSInterop.JS/src/Microsoft.JSInterop';
|
||||
import '@dotnet/jsinterop';
|
||||
import './GlobalExports';
|
||||
import * as Environment from './Environment';
|
||||
import { monoPlatform } from './Platform/Mono/MonoPlatform';
|
||||
import { getAssemblyNameFromUrl } from './Platform/Url';
|
||||
import { renderBatch } from './Rendering/Renderer';
|
||||
import { RenderBatch } from './Rendering/RenderBatch/RenderBatch';
|
||||
import { SharedMemoryRenderBatch } from './Rendering/RenderBatch/SharedMemoryRenderBatch';
|
||||
import { Pointer } from './Platform/Platform';
|
||||
import { fetchBootConfigAsync, loadEmbeddedResourcesAsync } from './BootCommon';
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ function loadResourceFromElement(element: HTMLElement) {
|
|||
return new Promise((resolve, reject) => {
|
||||
element.onload = resolve;
|
||||
element.onerror = reject;
|
||||
document.head.appendChild(element);
|
||||
document.head!.appendChild(element);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(AspNetCorePackageVersion)" />
|
||||
<PackageReference Include="Mono.WebAssembly.Interop" Version="$(JSInteropPackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\modules\jsinterop\src\Mono.WebAssembly.Interop\Mono.WebAssembly.Interop.csproj" />
|
||||
<ProjectReference Include="..\Microsoft.AspNetCore.Components\Microsoft.AspNetCore.Components.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@
|
|||
<NuspecProperties>
|
||||
version=$(PackageVersion);
|
||||
publishDir=$([MSBuild]::NormalizeDirectory($(IntermediatePackDir)));
|
||||
razorversion=$(MicrosoftAspNetCoreRazorDesignPackageVersion);</NuspecProperties>
|
||||
razorversion=$(MicrosoftAspNetCoreRazorDesignPackageVersion);
|
||||
blazormonoversion=$(MicrosoftAspNetCoreBlazorMonoPackageVersion);</NuspecProperties>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<_TargetFramework Include="$(TargetFrameworks)" />
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<dependencies>
|
||||
<dependency id="Microsoft.AspNetCore.Razor.Design" version="$razorversion$" include="all" />
|
||||
<dependency id="Microsoft.AspNetCore.Components.Analyzers" version="$version$" include="all" />
|
||||
<dependency id="Microsoft.AspNetCore.Blazor.Mono" version="$version$" include="all" />
|
||||
<dependency id="Microsoft.AspNetCore.Blazor.Mono" version="$blazormonoversion$" include="all" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
|
|
|||
|
|
@ -9,17 +9,8 @@
|
|||
This is only intended for use by other projects in this repo.
|
||||
-->
|
||||
|
||||
<!--
|
||||
TODO: Remove this propertygroup once we start referencing Microsoft.AspNetCore.Blazor.Mono
|
||||
as an external package dependency (i.e., not in same repo).
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<BlazorBuildReferenceFromSource>true</BlazorBuildReferenceFromSource>
|
||||
<BlazorMonoRuntimeBasePath>$(MSBuildThisFileDirectory)../../blazor/src/Microsoft.AspNetCore.Blazor.Mono/</BlazorMonoRuntimeBasePath>
|
||||
<MonoLinkerPath>$(BlazorMonoRuntimeBasePath)tools/binaries/illink/illink.dll</MonoLinkerPath>
|
||||
<MonoBaseClassLibraryPath>$(BlazorMonoRuntimeBasePath)dist/bcl/</MonoBaseClassLibraryPath>
|
||||
<MonoBaseClassLibraryFacadesPath>$(BlazorMonoRuntimeBasePath)dist/bcl/Facades/</MonoBaseClassLibraryFacadesPath>
|
||||
<MonoWasmRuntimePath>$(BlazorMonoRuntimeBasePath)dist/wasm/</MonoWasmRuntimePath>
|
||||
<BlazorJsPath>$(MSBuildThisFileDirectory)../Microsoft.AspNetCore.Components.Browser.JS/dist/blazor.*.js</BlazorJsPath>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
@ -27,6 +18,7 @@
|
|||
<Import Project="$(MSBuildThisFileDirectory)targets/All.targets" />
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Blazor.Mono" Version="$(MicrosoftAspNetCoreBlazorMonoPackageVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="$(MicrosoftAspNetCoreRazorDesignPackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
@ -41,8 +33,6 @@
|
|||
<!-- Ensures these projects are built before the consuming project, but without
|
||||
adding a runtime dependency on the .dll (to be equivalent to a <PackageDependency>
|
||||
given that the packed version of this project wouldn't add a .dll reference) -->
|
||||
<MSBuild Projects="$(MSBuildThisFileDirectory)..\..\blazor\src\Microsoft.AspNetCore.Blazor.BuildTools\Microsoft.AspNetCore.Blazor.BuildTools.csproj" Targets="Build" />
|
||||
<MSBuild Projects="$(MSBuildThisFileDirectory)..\..\blazor\src\Microsoft.AspNetCore.Blazor.Mono\Microsoft.AspNetCore.Blazor.Mono.csproj" Targets="Build" />
|
||||
<MSBuild Projects="$(MSBuildThisFileDirectory)Microsoft.AspNetCore.Components.Build.csproj" Targets="Build" />
|
||||
</Target>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\modules\jsinterop\src\Microsoft.JSInterop\Microsoft.JSInterop.csproj" />
|
||||
<PackageReference Include="Microsoft.JSInterop" Version="$(JSInteropPackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
<PackageReference Include="xunit" Version="2.3.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
|
||||
<PackageReference Include="Mono.Cecil" Version="0.10.0-beta7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Blazor.Mono" Version="$(MicrosoftAspNetCoreBlazorMonoPackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -41,7 +42,13 @@
|
|||
|
||||
<!-- A bit of msbuild magic to support reference resolver tests -->
|
||||
<Target Name="CreateReferenceHintPathsList" AfterTargets="Build">
|
||||
<ItemGroup>
|
||||
<_BclDirectory Include="$(MonoBaseClassLibraryPath)" />
|
||||
<_BclDirectory Include="$(MonoBaseClassLibraryFacadesPath)" />
|
||||
</ItemGroup>
|
||||
|
||||
<WriteLinesToFile Lines="@(ReferencePath)" File="$(TargetDir)referenceHints.txt" WriteOnlyWhenDifferent="true" Overwrite="true" />
|
||||
<WriteLinesToFile Lines="@(_BclDirectory)" File="$(TargetDir)bclLocations.txt" WriteOnlyWhenDifferent="true" Overwrite="true" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -16,11 +16,13 @@ namespace Microsoft.AspNetCore.Components.Build.Test
|
|||
// Arrange
|
||||
var standaloneAppAssembly = typeof(StandaloneApp.Program).Assembly;
|
||||
var mainAssemblyLocation = standaloneAppAssembly.Location;
|
||||
var mainAssemblyDirectory = Path.GetDirectoryName(mainAssemblyLocation);
|
||||
// This list of hints is populated by MSBuild so it will be on the output
|
||||
// folder.
|
||||
var hintPaths = File.ReadAllLines(Path.Combine(
|
||||
Path.GetDirectoryName(mainAssemblyLocation),
|
||||
"referenceHints.txt"));
|
||||
mainAssemblyDirectory, "referenceHints.txt"));
|
||||
var bclLocations = File.ReadAllLines(Path.Combine(
|
||||
mainAssemblyDirectory, "bclLocations.txt"));
|
||||
var references = new[]
|
||||
{
|
||||
"Microsoft.AspNetCore.Components.Browser.dll",
|
||||
|
|
@ -32,13 +34,6 @@ namespace Microsoft.AspNetCore.Components.Build.Test
|
|||
}.Select(a => hintPaths.Single(p => Path.GetFileName(p) == a))
|
||||
.ToArray();
|
||||
|
||||
var basePath = Path.GetDirectoryName(typeof(RuntimeDependenciesResolverTest).Assembly.Location);
|
||||
var bclLocations = new []
|
||||
{
|
||||
Path.Combine(basePath, "../../../../../blazor/src/Microsoft.AspNetCore.Blazor.Mono/dist/bcl/"),
|
||||
Path.Combine(basePath, "../../../../../blazor/src/Microsoft.AspNetCore.Blazor.Mono/dist/bcl/Facades/"),
|
||||
};
|
||||
|
||||
var expectedContents = new[]
|
||||
{
|
||||
/*
|
||||
|
|
@ -64,10 +59,8 @@ namespace Microsoft.AspNetCore.Components.Build.Test
|
|||
"Microsoft.Extensions.DependencyInjection.Abstractions.dll",
|
||||
"Microsoft.Extensions.DependencyInjection.dll",
|
||||
"Microsoft.JSInterop.dll",
|
||||
"Microsoft.JSInterop.pdb",
|
||||
"Mono.Security.dll",
|
||||
"Mono.WebAssembly.Interop.dll",
|
||||
"Mono.WebAssembly.Interop.pdb",
|
||||
"mscorlib.dll",
|
||||
"netstandard.dll",
|
||||
"StandaloneApp.dll",
|
||||
|
|
|
|||
Loading…
Reference in New Issue