Reputation: 11722
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://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/visual-studio-publish-profiles
Upvotes: 2
Views: 7533
Reputation: 41519
Just 'solved' this problem by adding an extra slash. It seems that dotnet
swallows it
dotnet build //t:MyTarget MyProject.csproj
Upvotes: 8