I had this problem while trying to create a Cloud Service / ccproj project. The problem was that I was transferring the project file for the solution file. By specifying the solution at the build stage and then specifying the project file in the MSBuild arguments, the problem disappeared:
- task: VSBuild@1 displayName: 'Build Worker Cloud Service - INT' inputs: solution: '**\SomeSolution.sln' (<-- SPECIFY SOLUTION HERE) msbuildArgs: '/t:Publish/t:restore/p:Project=SomeProject.ccproj(<-- SPECIFY PROJECT HERE)/p:SkipInvalidConfigurations=true/p:BclBuildImported=Ignore/p:OutputPath=bin\/p:PublishDir=$(build.artifactstagingdirectory)\appcloud\SomeFolderName.QA/p:TargetProfile=QA' platform: '$(BuildPlatform)' configuration: '$(BuildConfiguration_Release)' restoreNugetPackages: true
Note: YMMV for the parameters above - don't just copy and paste, as these are some of my surroundings. Please change if necessary. I set arrows to indicate what I changed to solve the problem.
source share