Why is Unpublishable?

We have a solution containing 17 projects. The solution has several configurations, such as Debug, Release, Test, Publish, etc.

A team project also has several build definitions, each of which is specialized in configuration. We use the release configuration configuration for nightly builds and publish the configuration build for publishing and deployment. Therefore, with these assembly definitions, build the same source code. But there is a problem...

Our nightly build creates the obj \ Release directories for each project, but publishing the build does not work. Because of this, the publish build does not create a server publish package.

When I looked at the build logs, I saw the differences as shown below. Night Build - Release Configuration (for each project)

PrepareForBuild: Creating directory "obj\Release\". 

Publish assembly - publish configuration (for each project)

 _DeploymentUnpublishable: Skipping unpublishable project. 

But I could not understand why? Which flag controls this?

We use TFS 2010, so Team Build 2010.

+6
source share
1 answer

Try adding the following deployment parameters to the project file within the property group to configure the assembly 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 in creating a CI web project. Adding deployment settings to the web.csproj file fixed it.

+7
source

Source: https://habr.com/ru/post/904585/


All Articles