?
Solved

How do I fix an error when I publish a Visual Studio 2010 Application

Posted on 2011-04-21
15
Medium Priority
?
1,263 Views
Last Modified: 2012-05-11
This is my first time publishing an application.  I generally just use the .exe to run my frontend interface.  I use LINQ to connect to a SQL Server.

I ran publish, I double click the setup.exe and I get a "Cannot Start Application" message.  I click the details and I get these errors:


ERROR DETAILS
      Following errors were detected during this operation.
      * [4/21/2011 4:48:21 PM] System.ArgumentException
            - Value does not fall within the expected range.
            - Source: System.Deployment
            - Stack trace:
                  at System.Deployment.Internal.Isolation.IStore.LockApplicationPath(UInt32 Flags, IDefinitionAppId ApId, IntPtr& Cookie)
                  at System.Deployment.Application.ComponentStore.LockApplicationPath(DefinitionAppId definitionAppId)
                  at System.Deployment.Application.SubscriptionStore.LockApplicationPath(DefinitionAppId definitionAppId)
                  at System.Deployment.Application.FileDownloader.PatchFiles(SubscriptionState subState)
                  at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
                  at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
                  at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
                  at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
                  at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
                  at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)


I have no clue what this means....  can anyone tell me where to start?

Thanks,
0
Comment
Question by:Karen Wilson
  • 9
  • 5
15 Comments
 
LVL 17

Expert Comment

by:Carlos Villegas
ID: 35445021
0
 

Author Comment

by:Karen Wilson
ID: 35446834
The first link - I don't have a & in my path name.  At least I think that's what it was referring to.
Second - I couldn't find
yv989c: Keeps mentioning ClickOnce

Am I missing an application to make my application work?  

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:Karen Wilson
ID: 35447294
I've had some success...  Under Signing, I checked the ClickOnce manifest and under Security, I clicked Enable ClickOnce Security Settings.  

My next stopping point comes with the prerequisite of making sure the user has dotnetfx3.5 SP1 and MSChart.exe loaded.  If I do not use these prereqs - life is wonderful.  If I do use them, then I have problems.  

It appears that my MSChart.exe is the problem.  It will load without the 3.5 SP1 being selected but of course, it won't run without it.  

Any suggestions?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 35448688
So the second link did help?

Have you added the prerequisites?
0
 

Author Comment

by:Karen Wilson
ID: 35448786
All the references to ClickOnce in the links made me go through all the tabs in check the ClickOnce references.

I added prerequisites and the MSChart one is not working with the 3.5 SP1 package.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 35448835
The reason ClickOnce is mentioned is that you used word "Publish" in your title which usually means using ClickOnce. Are you deploying using another method? Is the MSChart in a DLL?
0
 

Author Comment

by:Karen Wilson
ID: 35448903
I have no idea what I am doing and/or deploying.  This is my first crack at using publish on one of my apps.  I added MSCharts per this information:
http://www.philpreen.co.uk/MSChart/

It shows up on my prereq list but when I publish, I have problems.
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 35448918
0
 

Author Comment

by:Karen Wilson
ID: 35448924
Thanks, I'll check them out.  
0
 

Author Comment

by:Karen Wilson
ID: 35466342
CodeCruiser -

I have been using MSChart.exe quite extensively.  I usually have the user load MSChart.exe on their computer and run it and then charts on my apps work.  These articles are about downloading MSChart and adding to your toolbox.  I have that completed.  

I need to figure out how to have MSChart automatically loaded when installing my published application.  I set it up as a prereq but it's not working.  
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 35466379
These links (especially the 2nd) are about deploying MSCharts not installing it on development machine.
0
 

Author Comment

by:Karen Wilson
ID: 35466438
Oh yes... sorry, I had a weekend.

I did this as well.  I created a bootstrapper and the publish won't complete when I have the MS Chart selected in the prereq.  It's weird.  I have the 3.5 selected, it works.  I have MSChart selected, it won't go because it doesn't have 3.5 loaded. I select both and it fails.  

I am thinking maybe it's where I have the install location for the prereq's.  Let me play with that for a bit.  
0
 

Author Comment

by:Karen Wilson
ID: 35466938
On the prereqs, chose the download from the following location as I put all the apps in a public folder.  It didn't build - had error with the .Net 3.5 part.  

Chose the prereq from the same location as my application.  Build succeeded.  Ran the set up and it failed with the MS Chart.  In review of the error log, I got this error.  I am researching it now.  

Copying files to temporary directory "C:\Users\kawilso1\AppData\Local\Temp\VSDF5B2.tmp\"
Downloading files to "C:\Users\kawilso1\AppData\Local\Temp\VSDF5B2.tmp\"
(4/26/2011 8:04:25 AM) Downloading 'MicrosoftChartControls\MSChart.exe' from 'MSChart.exe' to 'C:\Users\kawilso1\AppData\Local\Temp\VSDF5B2.tmp\'
Download completed at 4/26/2011 8:04:25 AM
Downloading failed with HRESULT=-2146697203
0
 

Author Closing Comment

by:Karen Wilson
ID: 35474945
I had to do a lot of test driving to figure out the problem.  After digging deep, I found that I had compiled the application with framework 3.5.  I changed it to 4.0 and things finally started clicking.  
1)  Used the second link (www.mycode...)  to bootstrap MSChart
2)  Even though, MSChart requires 3.5 SP1, I didn't include it in the prereq and my app picked up the MSChart.exe.
3) I  selected the download apps from the same location as my application in the prereq tab.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses
Course of the Month15 days, 1 hour left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question