-
Notifications
You must be signed in to change notification settings - Fork 111
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
NullReferenceException #40
Comments
Oof, thanks for reporting! Is this reproducible every time you start csharprepl? I have the exact same Windows specifications that you have (down to the exact same point number), and I'm unable to reproduce it. If you press "Enter" as the first key, do you get a different stack trace? EDIT: Could you please also share the output of |
I just set up my computer's .NET SDK installation to match yours, and still can't reproduce the issue. From the stack traces, it's pretty clear that the Roslyn Workspace is failing to get built correctly, but it's odd that it's silently failing and we then get a NullReferenceException. I'll set up some more logging to better understand the issue; it should be ready in a few days. In the meantime, could you please verify if installing .NET 5 resolves the issue? CSharpRepl should run just fine on the .NET 6 previews, but it'd help to rule out the possibility of something unexpected in the previews. |
@Jamaxack when you have a chance, could you please update to the prerelease version of CSharpRepl? The only thing different in the prerelease is that it now has a You can update by running Then, please start csharprepl with the trace flag: After you recreate the NullReferenceException, please share the Thanks! I appreciate you helping out with this. |
Thanks for the detailed steps. I updated to the 0.3.4-rc version and started with the trace flag. Here is the logs for pressing 'enter' first and then restarting again and pressing 'c'.
|
There is an error: But in my machine it is installed in different path: |
Thanks! That's useful. Just to make sure I fully understand the .NET installation setup, could you please share the output of the powershell command I think that your computer should have a "C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref" directory (I think is a standard disk layout in .NET), but if that's not the case then it's something I'll definitely need to handle in csharprepl. Thanks again. |
Hello, I've just bumped into this project today and I have the same issue. It just exits after start. I get corresponding error in my case:
|
Thank you both @Jamaxack and @Drabenstein! It's because of the mismatch between those two folders. In both of your cases, the .NET 5 implementation assemblies are in "Microsoft.NETCore.App", but the .NET 5 reference assemblies are not in "Microsoft.NETCore.App.Ref". While I work on a fix for csharprepl to handle this mismatch, I believe that both of you can solve it by installing the .NET SDK package from this link (the below screenshot shows the specific download). After installing this package, you should have .NET 5 subdirectories in both those directories. |
CSharpRepl currently depends on having shared frameworks globally installed (e.g. to "\Program Files\dotnet" or equivalent on Linux/Mac OS). This isn't always the case, though; the Shared Frameworks can also be installed into ~/.nuget/packages. This PR adds support for this scenario. Previously, CSharpRepl crashed in this case (see #40).
I've just released csharprepl 0.3.4 that has a fix for this issue. I'm not sure if it handles all variations of .NET installations, but it should handle these. I'm assuming that the missing Please try updating ( |
I have installed again the newest SDK and it worked so I cannot check for sure if the fix works but maybe @Jamaxack could test it. |
Yay, after updating to version 0.3.4 it works. Thanks for the quick fix. |
Great! Thanks for raising the issue and confirming the fix. |
CSharpRepl currently depends on having shared frameworks globally installed (e.g. to "\Program Files\dotnet" or equivalent on Linux/Mac OS). This isn't always the case, though; the Shared Frameworks can also be installed into ~/.nuget/packages. This PR adds support for this scenario. Previously, CSharpRepl crashed in this case (see waf/CSharpRepl#40).
CSharpRepl currently depends on having shared frameworks globally installed (e.g. to "\Program Files\dotnet" or equivalent on Linux/Mac OS). This isn't always the case, though; the Shared Frameworks can also be installed into ~/.nuget/packages. This PR adds support for this scenario. Previously, CSharpRepl crashed in this case (see waf/CSharpRepl#40).
Version
C# REPL 0.3.3
What happened?
Billion dollar exception(NullReferenceException)
Windows specifications:
Edition Windows 10 Pro
Version 21H1
OS build 19043.1165
Experience Windows Feature Experience Pack 120.2212.3530.0
System type 64-bit operating system
Steps to reproduce:
The text was updated successfully, but these errors were encountered: