Skip to content

Commit

Permalink
Merge pull request #1580 from cwensley/curtis/vscode-launch-fixes
Browse files Browse the repository at this point in the history
Fix building/launching from VSCode
  • Loading branch information
cwensley authored Feb 15, 2020
2 parents c1b2bc2 + 4db4d5c commit 7106554
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 40 deletions.
22 changes: 5 additions & 17 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@
"configurations": [
{
"name": "Eto.Test.Mac64",
"type": "mono",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-mac64",
"useRuntime": false,
"program": "${workspaceFolder}/artifacts/test/Debug/net461/Eto.Test.Mac64.app/Contents/MacOS/Eto.Test.Mac64",
"program": "${workspaceFolder}/artifacts/test/Debug/netcoreapp3.1/Eto.Test.Mac64.app/Contents/MacOS/Eto.Test.Mac64",
"args": [],
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "Eto.Test.Gtk",
"type": "coreclr",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-gtk",
"program": "${workspaceFolder}/artifacts/test/Debug/netcoreapp3.1/Eto.Test.Gtk.dll",
Expand All @@ -23,23 +22,12 @@
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "Eto.Test.Gtk2",
"type": "clr",
"osx": {"type": "mono"},
"request": "launch",
"preLaunchTask": "build-gtk2",
"program": "${workspaceFolder}/artifacts/test/Debug/net461/Eto.Test.Gtk2.exe",
"args": [],
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "Eto.Test.Wpf",
"type": "clr",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-wpf",
"program": "${workspaceFolder}/artifacts/test/Debug/net461/Eto.Test.Wpf.exe",
"program": "${workspaceFolder}/artifacts/test/Debug/netcoreapp3.1/Eto.Test.Wpf.exe",
"args": [],
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart"
Expand Down
27 changes: 11 additions & 16 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"type": "process",
"args": [
"/t:Build",
"/v:Minimal",
"/p:Configuration=${input:configuration}",
"${workspaceFolder}/build/Build.proj"
],
Expand All @@ -23,54 +24,48 @@
"type": "process",
"args": [
"build",
"/v:Minimal",
"/p:Configuration=Debug",
"/p:TargetFramework=netcoreapp3.1",
"${workspaceFolder}/test/Eto.Test.Gtk/Eto.Test.Gtk.csproj"
],
"group": "build",
"problemMatcher": "$msCompile"
},
{
"label": "build-gtk2",
"command": "msbuild",
"windows": { "command": "build/msbuild.cmd" },
"type": "process",
"args": [
"/p:Configuration=Debug",
"${workspaceFolder}/test/Eto.Test.Gtk2/Eto.Test.Gtk2.csproj"
],
"group": "build",
"problemMatcher": "$msCompile"
},
{
"label": "build-mac64",
"command": "msbuild",
"windows": { "command": "build/msbuild.cmd" },
"type": "process",
"args": [
"/v:Minimal",
"/p:Configuration=Debug",
"/p:TargetFramework=netcoreapp3.1",
"${workspaceFolder}/test/Eto.Test.Mac/Eto.Test.Mac64.csproj"
],
"group": "build",
"problemMatcher": "$msCompile"
},
{
"label": "build-wpf",
"command": "msbuild",
"windows": { "command": "build/msbuild.cmd" },
"command": "dotnet",
"type": "process",
"args": [
"build",
"/v:Minimal",
"/p:Configuration=Debug",
"/p:TargetFramework=netcoreapp3.1",
"${workspaceFolder}/test/Eto.Test.Wpf/Eto.Test.Wpf.csproj"
],
"group": "build",
"problemMatcher": "$msCompile"
},
{
"label": "restore",
"command": "nuget",
"command": "dotnet",
"type": "process",
"args": [
"restore",
"/v:Minimal",
"${workspaceFolder}/src/Eto.sln"
],
"problemMatcher": "$msCompile"
Expand Down
2 changes: 1 addition & 1 deletion build/msbuild.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
setlocal enabledelayedexpansion

set vswhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe
set version=15.0
set version=16.0

for /f "usebackq tokens=*" %%i in (`"%vswhere%" -version %version% -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe`) do (
"%%i" %*
Expand Down
2 changes: 1 addition & 1 deletion src/Eto.Gtk/Eto.Gtk.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<RootNamespace>Eto.GtkSharp</RootNamespace>
<DefineConstants>$(DefineConstants);GTK3;GTKCORE</DefineConstants>
Expand Down
2 changes: 1 addition & 1 deletion src/Eto.Gtk/Eto.Gtk2.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net45</TargetFramework>
<TargetFrameworks>net45</TargetFrameworks>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<RootNamespace>Eto.GtkSharp</RootNamespace>
<DefineConstants>$(DefineConstants);CAIRO;GTK2</DefineConstants>
Expand Down
2 changes: 1 addition & 1 deletion src/Eto.Gtk/Eto.Gtk3.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net45</TargetFramework>
<TargetFrameworks>net45</TargetFrameworks>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<RootNamespace>Eto.GtkSharp</RootNamespace>
<DefineConstants>$(DefineConstants);CAIRO;GTK3</DefineConstants>
Expand Down
1 change: 0 additions & 1 deletion test/Eto.Test.Gtk/Eto.Test.Gtk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
<DefineConstants>$(DefineConstants);CAIRO;GTK3</DefineConstants>
<TreatWarningsAsErrors Condition="$(Configuration) == 'Release'">true</TreatWarningsAsErrors>
Expand Down
2 changes: 1 addition & 1 deletion test/Eto.Test.Gtk/Eto.Test.Gtk2.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFrameworks>net461</TargetFrameworks>
<OutputType>WinExe</OutputType>
<DefineConstants>$(DefineConstants);GTK2</DefineConstants>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
Expand Down
2 changes: 1 addition & 1 deletion test/Eto.Test.Gtk/Eto.Test.Gtk3.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFrameworks>net461</TargetFrameworks>
<OutputType>WinExe</OutputType>
<DefineConstants>$(DefineConstants);GTK3</DefineConstants>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
Expand Down

0 comments on commit 7106554

Please sign in to comment.