We have a solution that contains 17 projects. Solution has several configurations such as Debug, Release, Test, Publish and etc.
Also team project has several build definitions, each one is specialized for a configuration. We use Release configuration build for nightly builds and Publish configuration build for publish and deployment. So these build definitions, build same source code. But there is a problem...
Our nightly build creates obj\Release directories for each project but publish build doesn't. Because of this publish build doesn't create server publish package.
When I looked to the build logs I saw the differences like below. Nightly build - Release configuration (for each project)
PrepareForBuild:
Creating directory "obj\Release\".
Publish build - Publish configuration (for each project)
_DeploymentUnpublishable:
Skipping unpublishable project.
But I couldn't understand why? Which flag controls this?
We are using TFS 2010, so Team Build 2010.
Try adding the following deployment settings to the project file inside the property group for the build configuration you want to publish:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
...
<FilesToIncludeForPublish>OnlyFilesToRunTheApp</FilesToIncludeForPublish>
<DeployOnBuild>true</DeployOnBuild>
<DeployTarget>Package</DeployTarget>
<PackageAsSingleFile>true</PackageAsSingleFile>
</PropertyGroup>
I was getting a similar error on a web project's CI build. Adding the deployment settings to the web.csproj
file corrected it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With