Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010 RTM is not publishing with ClickOnce

Is anyone using ClickOnce with VS2010?

I’m getting the following on publish, when the solution builds fine ...

Building WindowsFormsApplication1...
Error: Cannot publish because a project failed to build.

Have tried everything, new clean project (both windforms and WPF), new temporary key, disabled pre-requisites and played with every publish setting. I was hoping it’d be fixed in final, the same thing happened in RC

My 'workaround' at the moment is to use msbuild.exe with a clickonce.proj, along the lines of the following http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/40bb7d32-a9ad-40d7-8113-cb3ed2747e69 (wired to an external tool+toolbar button as in hanselman's parallel build blog post)

like image 291
nite Avatar asked Apr 13 '10 14:04

nite


4 Answers

Funnily enough, publish from right-click on the project menu seems to work. It fires up the wizard rather than just publishing, so not ideal, but I do have 2 workarounds now (including the one stated in my original post).

like image 150
nite Avatar answered Oct 31 '22 21:10

nite


I have posted a bug on connect so please vote:)

https://connect.microsoft.com/VisualStudio/feedback/details/572124/failed-to-publish-with-clickonce#tabs

like image 20
Jan Vilimek Avatar answered Oct 31 '22 23:10

Jan Vilimek


I asked the ClickOnce product lead about this, and he said it is a problem with DevExpress. They offer a solution here: http://www.devexpress.com/Support/Center/p/B156192.aspx

like image 3
RobinDotNet Avatar answered Oct 31 '22 23:10

RobinDotNet


Little late for this comment, but I found this question because I was experiencing the same thing. Offering this here because the suggested work-arounds did not work for me.

My project builds and runs without error. I tried a build-clean, manually deleting the projects bin/ and obj/ folders, even using the Publish Wizard/Build-Menu->Publish. All would fail with the described "Cannot publish because a project failed to build."

Here's what made it work for me: I'm publishing to a UNC path, but the Installation Folder URL (on the project-setting's Publish tab,) was set to a URL that's exposed by IIS running on the server that also exposes the UNC path. I tried just setting the Installation Folder URL to the UNC path, and the ClickOnce build finally built and published. I don't get the web page, but we can live with that for now.

like image 1
Yoopergeek Avatar answered Oct 31 '22 21:10

Yoopergeek