From b7690f334dfdeb63034bcb9c05482e7adf75d38b Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 14 Jan 2019 13:19:21 +0100 Subject: [PATCH] This commit adds the possibility to remove the dotnet core 3.0 support, working on Greenshot with Visual Studio 2017. To disable call .\build.ps1 --settings_skippackageversioncheck=true -Target DisableDNC30 and modify the global.json. See README.md --- .gitignore | 6 +++++- README.md | 5 +++++ build.cake | 15 +++++++++++++-- src/Directory.Build.props | 4 +++- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2d2dd3439..4c7d4c2e0 100644 --- a/.gitignore +++ b/.gitignore @@ -211,4 +211,8 @@ _Pvt_Extensions/ ModelManifest.xml #JetBrains Rider -*.idea \ No newline at end of file +*.idea + +# Cake tools +tools/* +!tools/packages.config diff --git a/README.md b/README.md index 825de53ac..b22d500a1 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,11 @@ Quick started for developers * Open the solution from the src directory in Visual Studio * Rebuild and start... (you might need to rebuild 2x, looking into this) +If you can't use Visual Studio 2019 (preview) try the following: +* Open a powershell in the directory where you cloned this repo +* Disable dotnet core 3.0 with the following: .\build.ps1 --settings_skippackageversioncheck=true -Target DisableDNC30 +* To practically (some encoding issue maintains) undo the previous: .\build.ps1 --settings_skippackageversioncheck=true -Target EnableDNC30 +* Change src/global.json to contain the dotnet SDK version you have installed (e.g. 2.1.400) For users the major changes since 1.2.x are: * dotnet core 3.0 support (why, read here: https://blogs.msdn.microsoft.com/dotnet/2018/10/04/update-on-net-core-3-0-and-net-framework-4-8/ ) diff --git a/build.cake b/build.cake index 64e23ab1e..a2d6a4794 100644 --- a/build.cake +++ b/build.cake @@ -2,13 +2,11 @@ #tool "OpenCover" #tool "GitVersion.CommandLine" #tool "docfx.console" -#tool "coveralls.net" #tool "PdbGit" // Needed for Cake.Compression, as described here: https://github.com/akordowski/Cake.Compression/issues/3 #addin "SharpZipLib" #addin "Cake.FileHelpers" #addin "Cake.DocFx" -#addin "Cake.Coveralls" #addin "Cake.Compression" var target = Argument("target", "Build"); @@ -175,6 +173,19 @@ Task("AssemblyVersion") } }); +Task("EnableDNC30") + .Does(() => +{ + ReplaceRegexInFiles("./**/*.csproj", ".*", "net471;netcoreapp3.0"); + ReplaceRegexInFiles("./**/*.csproj", "", ""); +}); + +Task("DisableDNC30") + .Does(() => +{ + ReplaceRegexInFiles("./**/*.csproj", "net471;netcoreapp3.0", "net471"); + ReplaceRegexInFiles("./**/*.csproj", "", ""); +}); // Clean all unneeded files, so we build on a clean file system Task("Clean") diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 112f96987..a7ae9a39a 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -17,7 +17,9 @@ true false $(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion@ProductName) - win10-x64;win10-x86;win-x64;win-x86 + + true + false