Reputation: 767
I have installed the vs build tools 2017 on a build server. When I try to build with /t:Publish /p:PublishDir="pub/" I get _DeploymentUnpublishable: Skipping unpublishable project.
Is there a way to fix this or do i need to install the full VS with office developer tools?
Upvotes: 0
Views: 2156
Reputation: 76986
Is there a way to fix this or do i need to install the full VS with office developer tools?
I got the same error with your MSBuild arguments on command line:
You need to configure the MSBuild command line on your build server with those two additional arguments: /p:DeployOnBuild=true
and /p:PublishProfile=your_publish_profile.pubxml
instead of /t:Publish
/p:PublishDir="pub/
.
So the MSBuild command line should be:
msbuild.exe "YourProjectName.csproj" /p:DeployOnBuild=true /p:PublishProfile=PublishProfileName.pubxml
Of course, you need create the publish profile .pubxml, You don't need to specified path to publish_profile.pubxml as long as it's under the PublishProfiles directory with your project file.
Update for Ant`s comment:
Since your project type is a "Excel 2013 and 2016 VSTO Add-in", not "Excel Web Add-in", we should use ClickOnce publish method to deploy project. I have created a sample demo with VS 2017 and build it with TFS 2017. You can check if it helps:
/t:Publish /p:PublishDir="pub/"
to MSBuild argument:According to the build log, this project publish successfully:
Note: Add the .pfx file to your build server and my build server installed VS 2017, but AFAIK, you do not need to install the entire VS, you should install the workload Office/SharePoint development
:
Upvotes: 2