-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/7.0] [wasm][debugger] Support create, debugging and running wasmbrowser template from VS #76113
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
@thaystg please fill out the template, add the |
This was approved by Tactics via email. @thaystg can you please resolve the merge conflict? |
These CI failures are known and pre-existing:
@thaystg @lewing @radical is the new issue related to this PR? |
Looking at the failures now. |
The json is malformed. I'll fix.
|
.. template.json . Fixes: ``` [] Error: Failed to load template from /datadisks/disk1/work/C9390AE6/w/AAE00933/e/dotnet-net7/template-packs/microsoft.net.runtime.webassembly.templates.7.0.0-ci.nupkg(/content/templates/browser/.template.config/template.json). [] Details: Newtonsoft.Json.JsonReaderException: After parsing a value an unexpected character was encountered: ". Path 'symbols.kestrelHttpsPortGenerated.replaces', line 36, position 4. [] at Newtonsoft.Json.JsonTextReader.ParsePostValue(Boolean ignoreComments) [] at Newtonsoft.Json.JsonTextReader.Read() [] at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings) [] at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options) [] at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings) [] at Microsoft.TemplateEngine.JExtensions.ReadJObjectFromIFile(IFile file) [] at Microsoft.TemplateEngine.Orchestrator.RunnableProjects.RunnableProjectConfig..ctor(IEngineEnvironmentSettings settings, IGenerator generator, IFile templateFile, IFile hostConfigFile, IFile localeConfigFile, String baselineName) [] at Microsoft.TemplateEngine.Orchestrator.RunnableProjects.RunnableProjectGenerator.Microsoft.TemplateEngine.Abstractions.IGenerator.GetTemplatesAndLangpacksFromDir(IMountPoint source, IList`1& localizations) ```
It was a bad merge. Hopefully, it should be good now. |
``` WasmAppHost --runtime-config /datadisks/disk1/work/99FC08A1/w/B6B509D6/e/browser_Debug_crvdkcbp.f3f/bin/Debug/net7.0/browser-wasm/AppBundle/browser_Debug_crvdkcbp.f3f.runtimeconfig.json --forward-console Unhandled exception. System.InvalidOperationException: Dynamic port binding is not supported when binding to localhost. You must either bind to 127.0.0.1:0 or [::1]:0, or both. at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions..ctor(Int32 port) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.ParseAddress(String address, Boolean& https) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable`1 listenOptions, AddressBindContext context, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken) at Microsoft.AspNetCore.Hosting.WebHost.StartAsync(CancellationToken cancellationToken) at Microsoft.WebAssembly.AppHost.WebServer.StartAsync(WebServerOptions options, ILogger logger, CancellationToken token) at Microsoft.WebAssembly.AppHost.BrowserHost.StartWebServerAsync(String appPath, Boolean forwardConsole, String[] urls, CancellationToken token) at Microsoft.WebAssembly.AppHost.BrowserHost.RunAsync(ILoggerFactory loggerFactory, CancellationToken token) at Microsoft.WebAssembly.AppHost.BrowserHost.InvokeAsync(CommonConfiguration commonArgs, ILoggerFactory loggerFactory, ILogger logger, CancellationToken token) at Microsoft.WebAssembly.AppHost.WasmAppHost.Main(String[] args) at Microsoft.WebAssembly.AppHost.WasmAppHost.<Main>(String[] args) ```
@carlossanlop good to go |
Tested and it's working. |
whoops 😬 Thanks for fixing up |
Backport of #75986 to release/7.0
/cc @lewing @thaystg
Customer Impact
On 7.0, we created a new template to create a wasm browser app without using blazor, and it was not possible to run and debug it from VS, this backport fixes it.
Testing
Manually tested.
Risk
Low risk, only changing the way to start up the new template.
IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.