Dotnet Core Commands Giving Different Results

mhamilton2's Avatar


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. 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).

  2. 2 Posted by mhamilton2 on 16 Aug, 2018 06:13 PM

    mhamilton2's Avatar

    We use quite a few scripts in our builds so the yaml file itself is not that helpful nor contain the commands in question. How quickly till we get the SDK 2.1.400?

  3. 3 Posted by Owen McDonnell on 17 Aug, 2018 02:21 AM

    Owen McDonnell's Avatar

    There is no exact date for next images update but as seen here it is scheduled to be on that when it happens.
    You can also look at previous platform updates to get a sense of regularity.

    The method you're using of passing properties to dotnet msbuild command via powershell variable is working fine for you locally?

  4. Ilya Finkelshteyn closed this discussion on 17 Oct, 2018 09:00 PM.

Comments are currently closed for this discussion. You can start a new one.

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