Further 0.5.0 tweaks (#1191)

* Clarify debug instructions further

* Fix error message

* Add "using Microsoft.JSInterop" in templates

* Clarify template descriptions
This commit is contained in:
Steve Sanderson 2018-07-25 09:32:49 -07:00
parent b5ff6db1d4
commit 0f8fdad593
8 changed files with 13 additions and 10 deletions

View File

@ -138,17 +138,17 @@ namespace Microsoft.AspNetCore.Builder
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return $@"<p>Close this browser, then press Win+R and enter the following:</p>
return $@"<p>Close all Chrome instances, then press Win+R and enter the following:</p>
<p><strong><code>""%programfiles(x86)%\Google\Chrome\Application\chrome.exe"" --remote-debugging-port=9222 {appRootUrl}</code></strong></p>";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
return $@"<p>Close this browser, then in a terminal window execute the following:</p>
return $@"<p>Close all Chrome instances, then in a terminal window execute the following:</p>
<p><strong><code>google-chrome --remote-debugging-port=9222 {appRootUrl}</code></strong></p>";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
return $@"<p>Close this browser, then in a terminal window execute the following:</p>
return $@"<p>Close all Chrome instances, then in a terminal window execute the following:</p>
<p><strong><code>open /Applications/Google\ Chrome.app --args --remote-debugging-port=9222 {appRootUrl}</code></strong></p>";
}
else

View File

@ -6,7 +6,7 @@
"id": "1050"
},
"description": {
"text": "A project template for creating an ASP.NET Core Blazor application",
"text": "A project template for creating a Blazor application that runs on WebAssembly and is hosted on an ASP.NET Core server.",
"package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}",
"id": "1051"
},

View File

@ -1,5 +1,6 @@
@using System.Net.Http
@using System.Net.Http
@using Microsoft.AspNetCore.Blazor.Layouts
@using Microsoft.AspNetCore.Blazor.Routing
@using Microsoft.JSInterop
@using BlazorHosted_CSharp.Client
@using BlazorHosted_CSharp.Client.Shared

View File

@ -6,7 +6,7 @@
"id": "1050"
},
"description": {
"text": "A project template for creating an ASP.NET Core Blazor application",
"text": "A project template for creating a Blazor application that runs server-side inside an ASP.NET Core application.",
"package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}",
"id": "1051"
},

View File

@ -1,5 +1,6 @@
@using System.Net.Http
@using System.Net.Http
@using Microsoft.AspNetCore.Blazor.Layouts
@using Microsoft.AspNetCore.Blazor.Routing
@using Microsoft.JSInterop
@using BlazorServerSide_CSharp.App
@using BlazorServerSide_CSharp.App.Shared

View File

@ -6,7 +6,7 @@
"id": "1050"
},
"description": {
"text": "A project template for creating an ASP.NET Core Blazor application",
"text": "A project template for creating a standalone Blazor application that runs on WebAssembly.",
"package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}",
"id": "1051"
},

View File

@ -1,5 +1,6 @@
@using System.Net.Http
@using System.Net.Http
@using Microsoft.AspNetCore.Blazor.Layouts
@using Microsoft.AspNetCore.Blazor.Routing
@using Microsoft.JSInterop
@using BlazorStandalone_CSharp
@using BlazorStandalone_CSharp.Shared

View File

@ -62,7 +62,7 @@ module DotNet {
const resultJson = dispatcher.invokeDotNetFromJS(assemblyName, methodIdentifier, dotNetObjectId, argsJson);
return resultJson ? parseJsonWithRevivers(resultJson) : null;
} else {
throw new Error('The current dispatcher does not support synchronous calls from JS to .NET. Use invokeAsync instead.');
throw new Error('The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.');
}
}