Developed in Visual Basic 2008, Upgraded to 2010. Error Deploying

回答済み Developed in Visual Basic 2008, Upgraded to 2010. Error Deploying

  • 2012年8月2日 15:46
     
     

    Hi,

    I created an application in VB 2008 and deployed it to a couple of PCs.  I upgraded to VB 2010 and made some minor changes.  Now, an error occurs when users try to update the application or when new users try to install the application.  The error they see provides no details.  It says, "ApplicationName has encountered a problem and needs to close.  We are sorry for the inconvenience.  If you were in the middle of something, the information you were working on might be lost."

    No error catching I've tried has worked as it occurs before the first form is loaded.  I've also examined the user's Event Viewer but see no indication of anything there.  One clue is that the application will still install and update on users who have some version (not 2010) of Visual Studio installed (usually via an installation of SQL Server Management Studio).  

    Initially I thought it had something to do with Microsoft Chart Controls.  When I developed the application in VB 2008, I used Microsoft Chart Controls.  So, I had to download that and include it with the Click-Once Deployment.  When I upgraded to 2010, I got a warning upon publishing that the dll file wasn't used so it wasn't included.  But, I even tried sticking that back in, making it Copy Local = true and it doesn't work. 

    Any help will be greatly appreciated.

すべての返信

  • 2012年8月2日 19:22
     
     

    Hi,

    I created an application in VB 2008 and deployed it to a couple of PCs.  I upgraded to VB 2010 and made some minor changes.  Now, an error occurs when users try to update the application or when new users try to install the application.  The error they see provides no details.  It says, "ApplicationName has encountered a problem and needs to close.  We are sorry for the inconvenience.  If you were in the middle of something, the information you were working on might be lost."

    No error catching I've tried has worked as it occurs before the first form is loaded.  I've also examined the user's Event Viewer but see no indication of anything there.  One clue is that the application will still install and update on users who have some version (not 2010) of Visual Studio installed (usually via an installation of SQL Server Management Studio).  

    Initially I thought it had something to do with Microsoft Chart Controls.  When I developed the application in VB 2008, I used Microsoft Chart Controls.  So, I had to download that and include it with the Click-Once Deployment.  When I upgraded to 2010, I got a warning upon publishing that the dll file wasn't used so it wasn't included.  But, I even tried sticking that back in, making it Copy Local = true and it doesn't work. 

    Any help will be greatly appreciated.

  • 2012年8月3日 7:34
     
     

    Hi This1sOptimistic,

    Welcome to the MSDN forum.

    Your issue has more relationship with deploy issue. I’d like to move this thread to ClickOnce and Setup & Deployment Projects forum. It will cost a little time to involve the members in this forum. I appreciate your patience.

    Sorry for any inconvenience and have a nice day.


    Mark Liu-lxf [MSFT]
    MSDN Community Support | Feedback to us


  • 2012年8月3日 7:37
    モデレータ
     
     

    I recommend that you try adding an unhandledException exception handler.

    As for the chart controls, DO you have a reference to that assembly? If so, do this:

    Delete the current reference to that assembly.
    Add the dll to your project. Set the build action to 'none' and 'copy to output directory' to 'do not copy'.
    Add the reference back, but not from the .NET list -- browse to the one you just added to your project and select it. On the properties, set "copy local" to true.
    When it runs, it will look locally for that assembly.

    If you don't have a reference to that assembly, do this:

    Add the assembly to your project. Set "build action" to "content" and "copy to output directory" to "copy always".
    When it runs, it will find the assembly locally if it needs it.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev

  • 2012年8月3日 12:23
     
     
    Thanks.  I asked the question in that forum, so feel free to delete this thread.
  • 2012年8月3日 15:28
     
     
    Thanks for the help.  A big problem is I don't know where to place an exception handler.  I tried placing one in my primary Form load event, but it never gets there.  I do reference the assembly and I tried your recommendation.  The same error message appeared.  At this point I am removing all assemblies (and corresponding references) until I can get it to install.  I'll post back if it ever works.
  • 2012年8月3日 15:46
     
     
    So, I removed the Charts dll (System.Windows.Forms.DataVisualization) and all usage of it from my project.  The application installs now.  It's completely useless, but at least I know for certain that this dll is the issue.
  • 2012年8月3日 19:52
     
     回答済み

    I finally got it to work.  I followed the instructions in this post: http://www.philpreen.co.uk/MSChart/ and included MS Chart Controls as a prerequisite.  

  • 2012年8月4日 5:38
    モデレータ
     
     

    Thanks for posting back the answer!

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev