diff --git a/Directory.build.props b/Directory.build.props index 4f1d23fb..ac6d6a1e 100644 --- a/Directory.build.props +++ b/Directory.build.props @@ -38,9 +38,9 @@ This is a temporary workaround for Nuget Issue #4853 - https://github.com/NuGet/Home/issues/4853#issuecomment-292719597 Ideally this belongs into Directory.build.targets, but that doesn't work either - https://github.com/Microsoft/msbuild/issues/1721 --> - + - <_NuSpecPrefix>$(RestoreOutputAbsolutePath)$(_RestoreProjectName).$(_RestoreProjectVersion) + <_NuSpecPrefix>$(MSBuildProjectDirectory)\$(BaseIntermediateOutputPath)$(MSBuildProjectName).$(PackageVersion) <_NuSpec>$(_NuSpecPrefix).nuspec <_NuSpecPatched>$(_NuSpecPrefix).patched.nuspec diff --git a/build.ps1 b/build.ps1 index a48e4610..e00e06ed 100644 --- a/build.ps1 +++ b/build.ps1 @@ -6,16 +6,8 @@ param( $packageOutputFolder = "$PSScriptRoot\.nupkgs" # Restore packages and build product -Write-Host "Restoring..." -ForegroundColor "Green" -& dotnet restore -v Minimal # Restore all packages -if ($LASTEXITCODE -ne 0) -{ - throw "dotnet restore failed with exit code $LASTEXITCODE" -} - -# Build all Write-Host "Building..." -ForegroundColor "Green" -msbuild "$PSScriptRoot\Dapper.sln" /m /v:m /nologo /t:Build /p:Configuration=Debug "/p:PackageVersionSuffix=$PreReleaseSuffix" +msbuild "$PSScriptRoot\Dapper.sln" /m /v:m /nologo "/t:Restore;Build" /p:Configuration=Debug "/p:PackageVersionSuffix=$PreReleaseSuffix" # Run tests if ($SkipTests)