Ok here is how to get it working:
- Install ‘.NET Core SDK for Windows’ from this link: https://www.microsoft.com/net/core
- Install MSBuild from https://www.microsoft.com/en-us/download/details.aspx?id=48159 . There should be a folder called ‘c:/Program Files (x86)/MSBuild/version/Bin/’, add this path to your PATH environmental variable if it is not there already.
- Edit the .csproj file and set the ‘PlatformTarget’ tag and set the value to ‘x64’, also check if the ‘OutputPath’ tag is also correct. Just do a ‘Search&Replace’ on the the string ‘x86’. (not tested, I changed it in my office copy of Visual Studio 2015)
- Open your project’s folder in VSCode. Click on one of the .cs files, it should do some stuff… check your Output window (ctrl+shift+u)
- Add the following build task files:
{ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "0.1.0", "command": "msbuild", "args": [ // Ask msbuild to generate full paths for file names. "/property:GenerateFullPaths=true" ], "taskSelector": "/t:", "showOutput": "silent", "tasks": [ { "taskName": "build", // Show the output window only if unrecognized errors occur. "showOutput": "silent", // Use the standard MS compiler pattern to detect errors, warnings and infos "problemMatcher": "$msCompile" } ] } - Add the following ‘launch.json’ file, you can also press F5 and select ‘.NET Core’.
{ "version": "0.2.0", "configurations": [ { "name": ".NET Core Launch (console)", "type": "coreclr", "request": "launch", "preLaunchTask": "build", "program": "${workspaceRoot}/bin/x64/Debug/<Project_EXE_File>.exe", "args": [], "cwd": "${workspaceRoot}", "stopAtEntry": false, "externalConsole": false }, { "name": ".NET Core Attach", "type": "coreclr", "request": "attach", "processId": "${command.pickProcess}" } ] }
Please note this will probably work for you with a bit of tweaking. If I missed steps please post them so we can get a little complete guide going.