I'm having a strange issue where when I create a build with "Visual Studio Build" and supply the *.sln file it pretends to build all projects (I see this in the log) but when it comes to publishing artifacts there is only a few of the projects from the solution (mainly test projects and some miscellaneous projects but no the main ones) I have dependencies sorted ok as this build fine in VS2015 (I currently use WebDeploy) Has anyone seen this behavior?
相关问题
- Docker task in Azure devops won't accept "$(pw
- Authentication Failure using Git-LFS Azure DevOps
- Authentication Failure using Git-LFS Azure DevOps
- Getting error: File extension specified '.webt
- “No test result files matching **/*.trx were found
相关文章
- Build errors of missing packages in Visual Studio
- VSTS continuous integration triggers not working
- Close a work item via the commit message
- Increment variable value in TFS build +1
- Can't check in changes to TFS
- Running Jasmine tests on Azure DevOps as part of a
- Azure Active Directory: Add Service Principal to D
- Setup team or users permissions with VSTS REST API
I also had this issue (or similar?) The artifacts for the main project were not published, only the test project.
When looking in the log file i noticed two things.
Only files from the Test project were copied
The task "Copy Files to:$(build.artifactstagingdirectory)" was looking for contents using the wildcard "\bin\release**" this path is set in the build step "Copy Files" / "Content" and is "\bin\$(BuildConfiguration)**" by default, translating to your setting in "Variables" / "BuildConfiguration" under this build definition.
Then I looked at the project settings in Visual Studio and for some reason the main project had the setting in "Build / Output / Output path" set to "bin\"; changing this to "bin\Release" for Release and "bin\Debug" for debug solved my problem.
Solution?
a. Set VS project setting "Build / Output / Output path" to "bin\Release"
b. (or change VSTS build step "Copy Files" / "Content" to "\bin" to catch everything in bin)
Since you mentioned "WebDeploy", I suspect that you are building a web app project with some other projects in the solution. The behavior you see is usually caused by the default "Visual Studio" build definition template. With the default settings of this template, the "Copy Files" task copy the files in "**\bin\$(BuildConfiguration)**" folder to "$(build.artifactstagingdirectory)" folder and then publish the files in "$(build.artifactstagingdirectory)" folder. But this is not applicable to Web App Project.
To fix this issue, adding following arguments in "MSBuild Arguments" section of "Visual Studio Build" task:
Then you will get a deployment package in artifacts and you can deploy it via web deploy.