Dotnet Core Commands Giving Different Results

Montane Hamilton's Avatar

Montane Hamilton

06 Aug, 2018 09:28 PM

In two cases, one with dotnet msbuild, and one with dotnet publish I get different results on appveyor than I get locally. I've ran dotnet --info and both local and appveyor are running the 2.1.302.

The msbuild command fails when specifying version in the command.

$parameters = "Version=$version;AssemblyVersion=$version;FileVersion=$version;NuGetVersion=$nugetVersion"
dotnet msbuild $buildTarget /p:$parameters

C:\Program Files\dotnet\sdk\2.1.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.GenerateAssemblyInfo.targets(161,5): error MSB4044: The "GetAssemblyVersion" task was not given a value for the required parameter "NuGetVersion". [C:\sources\Cricut.Pens.Api\Cricut.Pens.Api.csproj]

The dotnet publish fails to copy the xml documentation file even though it is in the build output folder and the same command works locally publishing the xml file no problem.

dotnet publish --output $publishFolder --self-contained true --runtime win10-x64 $pathForProjectToRun

Just seems to be some environmental issue?

  1. Support Staff 1 Posted by Owen McDonnell on 08 Aug, 2018 06:55 AM

    Owen McDonnell's Avatar

    Can you post your appveyor.yml file(or go to Settings -> Export Yaml tab if configured through UI).

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac