From 9e38f9fbb09b6191712307967dfabecc30f3ff21 Mon Sep 17 00:00:00 2001 From: Andrey Rusyaev Date: Thu, 8 Dec 2022 01:09:16 +0400 Subject: [PATCH] Migrate to use dotnet instead of msbuild. --- build/build.cmd | 10 ++++------ build/build.ps1 | 11 +++++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/build/build.cmd b/build/build.cmd index 401e8d0..4612c7f 100644 --- a/build/build.cmd +++ b/build/build.cmd @@ -1,7 +1,5 @@ -msbuild "../src/acryptohashnet.sln" /p:Configuration=Release +@echo off +setlocal -SET OutDir=../src/acryptohashnet/bin/Release/ -SET TargetDir=../bin/ - -xcopy /I /Y /F "%OutDir%netstandard2.1/" "%TargetDir%" -xcopy /I /Y /F "%OutDir%*.nupkg" "%TargetDir%" +powershell -ExecutionPolicy ByPass -NoProfile -file ./build.ps1 +exit /b %ERRORLEVEL% \ No newline at end of file diff --git a/build/build.ps1 b/build/build.ps1 index 7a479fc..d5d21ac 100644 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -1,11 +1,14 @@ Set-StrictMode -version Latest +Set $ErrorActionPreference='Stop' + +$Configuration = "Release" $SrcDir = "$PSScriptRoot/../src"; -$OutDir = "$PSScriptRoot/../src/acryptohashnet/bin/Release" +$OutDir = "$PSScriptRoot/../src/acryptohashnet/bin/$Configuration" $TargetDir = "$PSScriptRoot/../bin" -msbuild.exe "$SrcDir/acryptohashnet.sln" /p:Configuration=Release +dotnet build "$SrcDir/acryptohashnet.sln" --configuration $Configuration -New-Item -Force -Type Directory $TargetDir -Copy-Item -Force "$OutDir/netstandard2.1/*" $TargetDir +New-Item -Force -Type Directory $TargetDir | Out-Null +Copy-Item -Force "$OutDir/netstandard2.1/*.dll" $TargetDir Copy-Item -Force "$OutDir/*.nupkg" $TargetDir