Dotnet Core Commands Giving Different Results

mhamilton2's Avatar

mhamilton2

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

  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. Support Staff 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

Generic

? 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

Recent Discussions

23 Oct, 2018 08:45 PM
23 Oct, 2018 07:48 PM
23 Oct, 2018 06:50 PM
23 Oct, 2018 06:06 PM
23 Oct, 2018 05:51 PM