Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Please help me! ClickOnce application cannot be started. Value does not fall within the expected range. Source: System.Deployment
 

Please help me! ClickOnce application cannot be started. Value does not fall within the expected range. Source: System.Deployment

I have been struggling with this for hours! I must have installed and uninstalled a hundred times, renamed my application, cleared the Apps\2.0 folder completely dozens of times but there is just no way to get it to work.

I use Visual Studio 2008 Professional SP1 on Windows XP. A quick test application and ClickOnce deployment does work, but I have a big project and it needs to be deployed! Yesterday!

Please somebody from Microsoft help me out here, this is a really difficult bug, because the error is so confusing! What value? What range? I don't understand!

Thanks!

-M
Math Random  Wednesday, January 14, 2009 11:51 PM
Sooo, I had a ref to an assembly A that had a ref to Migrator.Providers.dll that had a reference to System.Data.SqlServerCe.dll 3.5.0.0

Then, in the same project, I had a ref to System.Data.SqlServerCe 3.5.1.0

There were no build errors, but it caused my application to not run correctly when deployed with ClickOnce.

Very hard to find this, I accidentally removed the ref to assembly A and then I got a warning in VS. Which is strange, because I removed the ref to A, so you'd think there would be no more conflict then.

Anyway, I wish VS could warn me when publishing because I have spent hours only to find it by accident. I could've spent the weekend on this too you know...


Math Random  Thursday, January 15, 2009 10:53 PM
Have you tried rebuilding your application and republishing it? This error usually occurs when there is some kind of mismatch bewteen the files and the deployment manifest. Are you publishing directly to the web server, or using Mage or something like that?

Also, please post the whole log and/or error message.

RobinS.
GoldMail.com
Ts'i mahnu uterna ot twan ot geifur hingts uto.
RobinDotNet  Thursday, January 15, 2009 1:58 AM
I must've rebuild it 50 times already. I just publish and accept all defaults (CD-ROM, don't update etc) and then double click the .application in the publish folder.

I'm now reverting back to previous version to see what file or reference could be the problem. This is a tedious task, surely there is a way to get better info. Is there a diagnostic tool or command line option for this kind of thing?
Math Random  Thursday, January 15, 2009 12:42 PM
Sooo, I had a ref to an assembly A that had a ref to Migrator.Providers.dll that had a reference to System.Data.SqlServerCe.dll 3.5.0.0

Then, in the same project, I had a ref to System.Data.SqlServerCe 3.5.1.0

There were no build errors, but it caused my application to not run correctly when deployed with ClickOnce.

Very hard to find this, I accidentally removed the ref to assembly A and then I got a warning in VS. Which is strange, because I removed the ref to A, so you'd think there would be no more conflict then.

Anyway, I wish VS could warn me when publishing because I have spent hours only to find it by accident. I could've spent the weekend on this too you know...


Math Random  Thursday, January 15, 2009 10:53 PM


Unfortunately, in programming, the code does what you tell it to do, and not what you mean for it to do. This has, of course, annoyed countless programmers over the years (myself included). ;-)

As soon as MSFT puts in something that removes references it doesn't think you need, you will need to add something that isn't referred to directly in the project, but is used by some other assembly you include, and you will be mucked up because MSFT removed it. My guess would be they figure you can be responsible for specifying your references correctly.

Congrats on figuring out your problem!

RobinS.
GoldMail.com


Ts'i mahnu uterna ot twan ot geifur hingts uto.
RobinDotNet  Sunday, January 18, 2009 8:23 PM

You can use google to search for other answers

Custom Search

More Threads

• PublicKey / Hash attribute for .NET 3.0 Redistributable bootstrapper
• Using AssemblyBinding in app.config for dlls not in GAC
• how to deploy my project with my database
• Make an executed project
• creating a setup project that contain a merge module msm
• Running my application as a limited user brings up the installer
• Mage.exe Update - "Could not find file"
• Deploying application version
• catching assembly references/publishing issue
• Setup Project - Launch Conditions