Following the discussion started in Asp.Net Core Blog.
Resume:
After updating I get the following error when trying to debug a ASP.net core hosted Web Assembly app. Both on updated existing apps and newly created apps.
An unhandled exception of type ‘System.ArgumentNullException’ occurred in System.Private.CoreLib.dll
Value cannot be null.
Solution:
Hi Cody! Can you confirm that you don’t have any processes listening on port 9300 in your machine? If so, ensure that these processes are removed.
This issue will be fixed in RC2 and you should be able to debug even if port 9300 is already used.
Problem:
Also been having the same issue, the way I fixed it was to log out and back in again. This proved quite time consuming but now I know to end task in the task manager after every debug session its now mildly annoying. RC2 seems a long wait for a fix for something that’s incredibly time consuming. Makes testing RC1 very difficult.
Workaround:
We do apologize for the inconvenience! If you want to try out an RC2 build you can grab one from https://github.com/dotnet/installer.
Further Problem installing RC2:
Severity Code Description Project File Line Suppression State
Error NU1102 Unable to find package Microsoft.NETCore.App.Runtime.browser-wasm with version (= 5.0.0-rc.2.20465.4)
- Found 5 version(s) in nuget.org [ Nearest version: 5.0.0-rc.1.20451.14 ]
- Found 0 version(s) in Microsoft Visual Studio Offline Packages
Solution:
To use the .NET 5 RC2 builds, you’ll also need to add the following NuGet package feed:
dotnet nuget add source -n dotnet5 https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json
Further Problem:
Hello daniel,
I installed the RC2 with:
dotnet nuget add source -n dotnet5 https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json
Now is working, but the error is sitll there:
Eccezione non gestita di tipo 'System.ArgumentNullException' in System.Private.CoreLib.dll
Value cannot be null.
Some suggestion ?
Question:
Piercarlo, are you seeing this with a newly created project with RC2, or an existing project migrated to RC2?
Answer:
Existing project an existing project migrated to RC2 !
This works for me while waiting for the fix:
npm install --global kill-port
and add to your .csproj
<PropertyGroup>
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>kill-port 9300</PreBuildEvent>
</PropertyGroup>
Unfortunately I don't think this issue is totally fixed in RC2.2.20467.18. Whilst it does fix the issue where multiple debug sessions do not start the .NET Host process is still left running in the background. These seem to build up until you run out of RAM and then in my case my system froze completely. Hopefully this can also be fixed before RC2 is fully released.

@owaits Yep, this issue is tracked in #25991 and should be resolved in RC2.
I'll close this issue as resolved now since we're tracking the issue around orphaned processes and have provided workarounds for the issue in RC1. Feel free to open a new issue for other problems.
Most helpful comment
This works for me while waiting for the fix:
npm install --global kill-portand add to your .csproj