6

I have been stuck here for quite a while.

  • I know this is pretty basic, but plss help me out on this one.
  • I am familiar with Visual Studio for quite some time. So decided to give VS Code a shot.

I wanted to compile and run a simple 'Hello World' program in C#.[ref. Brackeys(Youtube)]

I have followed all the steps, but when I type in the cmd "dotnet run"

                           Failed to create CoreCLR, HRESULT: 0x80070057

This is what happens.

Are there any steps missing? Or some installation error, or I am missing some steps?

I am running this on :

  • Windows 10 [x64]
  • dotnet-sdk-3.1.402-win-x64
  • VSCodeUserSetup-x64-1.49.2

[Screenshot of the window1

peterh
  • 11,875
  • 18
  • 85
  • 108
JGDSH
  • 71
  • 1
  • 1
  • 3

2 Answers2

4

I think you've found a bug in the .NET SDK. It doesn't appear to like the folder name for the project being ;).

If I have it in #Code it runs fine. If I put it in #Code\;) then it fails with the same error.

enter image description here

enter image description here

I've opened an issue here: https://github.com/dotnet/sdk/issues/13954

Martin Costello
  • 9,672
  • 5
  • 60
  • 72
1

The offending character is actually the ; (semicolon) character in your path. I had a similar issue, and once I renamed the path, my solution ran fine. Also note that having the ^ character (caret) can cause different issues in Visual Studio. Beyond those two, the path can contain any special character other than \/:*?"<>| which are prohibited by Windows.

  • Cool! and unexpectedly. In russian, short name of this situation is 'SSZB'... approximately "evil Pinocchio for himself" – S.H. May 17 '22 at 11:07