Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Click Once Problem publish build
 

Click Once Problem publish build

i dont know if somebody has the same problem:

when publishing my ClickOnce application VS 2008 SP1 try tobuild twice:

first the normal release build, which succeds
then the 'publish' build (recompiles all again!?)which fails
and followingerrors are visible in the errorlist:

cannot publish because a project failed to build.
Could not find file 'obj\Release\xxxxxxx.exe'.

i'm not sure whats the cause of the second compile, i think of some sort of selfreference?
no ClickOnce deploymentover VS ispossiblesince this!

my solution is (until i get a better one or can fix the problem):

*set the version numbers and all needed settings with VS (i make a clean too) and close VS
*open VisualStudio cmdline
*goto project dir
*call 'msbuild /p:Configuration=Release /target:publish'
*goto to your release directory, in app_publish is the new application version!!!! to copy to webserver or what you want

i know not the best solution but its the only one i found to work :-)

Chris

Chris Täubler  Thursday, September 24, 2009 11:28 AM
Status Update

i cleaned up the developer Machine from old Visual C++ installation:

i uninstalled Visual C++ 6.0

during this a message occured "problem during uninstall: msvcrt6.dll can't be removed..." followed with "need to reboot"
altough i havent used Visual C++ 6.0 for really long time maybe years...

after the Reboot THE VISUAL STUDIO 2008 SP1 PUBLISH BUILD IS NOW WORKING FINE!!!!!

i dont know how it is belonging or related (from far: maybe a tool used during publishbuild was using the old dll?!?)

there were no updates or installations inbetween.
Chris Täubler  Monday, September 28, 2009 2:23 PM

What kind of project are you trying to deploy with ClickOnce? Is it a Windows Forms application or WPF or a console application?

Did you look to see what the build errors are in the Errors tab in Visual Studio?

Try clicking on Build/Clean Solution, and then build it again and see if it fixed the problem. When you publish, it ALWAYS builds, nothing you can do about that.

RobinDotNet


Click here to visit my ClickOnce blog!
RobinDotNet  Friday, September 25, 2009 2:38 AM
its a WPF Application (2 Class Libs, DataAccess and Logic, 1 Executable), mainly in .NET 3.5, little parts .NET 2.0

there are no build errors (just some warnings from overriden properties of some UI elements without 'new')
when

build
clean and build
project rebuild (exe project)
solution rebuild

and application works fine (Debug AND Release).

only when clicking 'publish now' a second run(recompile) starts and the 2 errors occur. the publishing build itself is ok (necessary and safe), maybe the reCOMPILE is not necessary when all targets are up to date, but that should be just a question of time.

also the application from the release directory works fine, and as stated, also the application from the commandline publish build works fine.

its just the VS 2008 SP1 which cannot compile/build the publish build, so my solution was only to safe time for developers hanging on same stuff.

maybe a helpful hint:
i remember that i tried to fill the ToolBox with the controls by adding the executable (browse button),
and i think thats the cause, since then (no guarantee just felt) the errors occured, but i resetted ToolBox and also HAVENT USED the (exe)components visible from ToolBox,
thats why i think of some kind of selfreference.


Chris
Chris Täubler  Friday, September 25, 2009 8:18 AM
Status Update

i cleaned up the developer Machine from old Visual C++ installation:

i uninstalled Visual C++ 6.0

during this a message occured "problem during uninstall: msvcrt6.dll can't be removed..." followed with "need to reboot"
altough i havent used Visual C++ 6.0 for really long time maybe years...

after the Reboot THE VISUAL STUDIO 2008 SP1 PUBLISH BUILD IS NOW WORKING FINE!!!!!

i dont know how it is belonging or related (from far: maybe a tool used during publishbuild was using the old dll?!?)

there were no updates or installations inbetween.
Chris Täubler  Monday, September 28, 2009 2:23 PM
That's very odd. I'm glad you were able to solve it; thanks for posting back the answer!

RobinDotNet
Click here to visit my ClickOnce blog!
RobinDotNet  Tuesday, September 29, 2009 3:48 AM

You can use google to search for other answers

Custom Search

More Threads

• Have Setup.exe w/o Setup.msi
• ClickOnce Publishing Error
• add value to registry
• Winforms Deployement
• Installation package, windows forms application, sqlexpress and restore of a database. Visual studio 2008
• Problems With Deploying .NET Assembly
• Click Once does not update my app
• Problem in package Visual C++ 2005 application
• Running a Program After Installation
• Installing ClickOnce from Cluster of Web Servers