The special things to take into account to run and debug a WPF project in Visual Studio Code are:
-
- Target Platform needs to be x64: x64;
- PDB needs to be portable: portable
- Set generator on *.xaml files: MSBuild:Compile
-
- command needs to point to msbuild.exe: "command": "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe"
This is setup for Visual Studio 2017 Professional tools. Ajust if a different version is used.
-
- Launch type is clr: "type": "clr"
- program point to build resultin .exe: "program": "${workspaceRoot}/bin/Debug/wpf-vscode.exe"
To test, just open this folder in Visual Studio Code and hit F5.