core icon indicating copy to clipboard operation
core copied to clipboard

dotnet run System.ArgumentNullException: for a simple program with new installation of .netcore 2.1.401

Open noorrocks opened this issue 8 years ago • 2 comments

Issue Title

dotnet run System.ArgumentNullException: for a simple program with new installation of .netcore 2.1.401

General

Trying to get started with .netcore programming. Followed the basic tut from asp.net website but failed.

https://www.asp.net/get-started

I get the error (attached) after dotnet run command.

Powershell output

This is my first ever program after a fresh installation of the latest SDK (as of now). I have tried console app and it works fine. Even a simple app with 'web' template works ok and display 'Hello World' in the browser. However, as soon as I add 'services.addMVC' to the app it breaks with the same error. I have done all my research and tried a lot of things, but not sure what is happening.

Program files: Files

noorrocks avatar Aug 30 '18 04:08 noorrocks

After wrestling with this problem for two days, finally, I have caught the issue.

if you see the 'powershell output', my project directory is ' Directory: C:#NIN\dotnetcore'

Somehow, it doesn't like the '#' in a folder name. I created a new folder without '#' and it worked like a charm.

I was also able to reproduce this problem on a different PC.

Please note that it only bothers the '#' if it's at the root folder name. Down the chain, it works OK.

This issue can be marked as a known issue, I think.

noorrocks avatar Aug 30 '18 14:08 noorrocks

Issue moved to dotnet/cli #9932 via ZenHub

Petermarcu avatar Aug 31 '18 18:08 Petermarcu