views:

979

answers:

5

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)

A: 

I haave been using ClicKOnce successfully with VS2010 for several week.s

This is not a ClickOnce problem, it's a build problem. What is the rest of the error message, i.e. why can't the project build?

RobinDotNet
nite
Do you have DevExpress installed? THis is a known problem. Their recommendation for how to handle it is here: : http://www.devexpress.com/Support/Center/p/B156192.aspx
RobinDotNet
+12  A: 

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).

nite
If you give me the whole error message (the build error in the Errors window), I will ask the ClickOnce product team about this. Also, I assume you have tried deleting the \bin and \obj folders and trying it again?
RobinDotNet
I've seen this happen when some of the assemblies are compiled for release and some for debug. Are you publishing as as release? Doe sthis still happen if you do a complete rebuild under Release config, and then publish?
RobinDotNet
I have the same issue, there is no other output from either the error list of the output window. Cleaning the solutions makes no difference either
Kev Hunter
I can publish from the right click on the project as well but the publish now button gives the same error.
Kev Hunter
Robin, Yep, tried deleting bin/obj folders - Might be worth you re-reading my posts in detail. Remember this has failed every publish on many different projects, many different machines, many different configurations, many different developers, even projects from scratch. As I said, there's no errors on build, and the entire (yes I do mean entire!) error message in the output window follows (nothing in between): Building WindowsFormsApplication1...Error: Cannot publish because a project failed to build.
nite
Just hit same problem .. Launching from right click works for me also ... thanks very much.
Rory Becker
A: 

This is a bug in VS2010. I was able to publish 24 times without any problems. The 25th time refused to work, unless I did a right click on the project and published. I was getting the exact same error with no warnings. I have all the latest updates and did not change any settings in VS2010.

I'd be willing to take a look at it if it's something you could share, even in an online meeting. If you're interested, leave a comment on the about page on my blog and I'll e-mail you. http://robindotnet.wordpress.com/about At the very least, I can collect some info and ask the ClickOnce product team about it.
RobinDotNet
+2  A: 

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

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

Jan Vilimek
+1  A: 

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

RobinDotNet
I don't have CodeRush (or any Devexpress product) and having the same problem (I do have other 3rd party grid, Xceed, though)
Eduardo Molteni
If you uninstall Xceed, does the problem go away?
RobinDotNet