Monday, December 12, 2016

My experience getting started with .net core with vscode

I created a new folder and opened command interface there. I typed

dotnet new -t Web

 The options for type are:
- { Name = Console, isMsBuild = True }
- { Name = Web, isMsBuild = True }
- { Name = Lib, isMsBuild = True }
- { Name = Mstest, isMsBuild = True }
- { Name = Xunittest, isMsBuild = True }


I hit run and it prompted me to setup launch and tasks json files. I selected .net core and continued. Then I remembered, oh right, I need to restore. so I ran

dotnet restore

This downloaded many dlls and I felt good about the project. Then I hit F5 and...  error! Aaargh!  Why .net why?   



The problem with this error - I don't know how to open the C# output window *YET*. The journey will continue when I figure that out.

I experimented with opening the project with VS 2017 and the debugger opened the web project successfully. A new browser window opened with a lot of sample content. So far so good.

Now I turn my attention to why VSCode doesn't work. I found this page which suggested checking the .NetCore CLI version may not be the latest. Mine was the older version 1.0.0-preview3-004056.

So I eventually bounced over to https://www.microsoft.com/net/core#windowsvs2015 and downloaded both the vs2015.3 and .NET core 1.0.1 tools preview.

To be continued...

No comments: