1
votes

I'm playing with CI and trying to build asp.net core app and publish it to azure using preconfigured publishing profile. I can run the following command using a command line but when I'm running it with Jenkins (Windows) it fails:

dotnet build -c Release /p:DeployOnBuild=true /p:PublishProfile=mycoolprofile

And I'm getting the following output with error:

Microsoft (R) Build Engine version
15.6.84.34536 for .NET Core Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1008: Only one project can be specified. Switch: p:PublishProfile=mycoolprofile

And of course, I saw all quotes discussions, I renamed my profile to be a simple single word, this is the real profile name above.

I'm following this guide: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/visual-studio-publish-profiles

1
check that Build Agent has correct working folderSet

1 Answers

4
votes

Just 'solved' this problem by adding an extra slash. It seems that dotnet swallows it

dotnet build //t:MyTarget MyProject.csproj