locked
System.invalidoperation on user computer install RRS feed

  • Question

  • I Have converted a Windows Forms VS2003 application to VS2005 and then to VS2008.  It includes a setup project for deploying on the client computer (the regular installer, not click once).  It works fine when I run it on my computer, either in VS or if I install using the setup installer.  But when I install it on the client computer and then try to run it, I immediately get a System.InvalidOperation exception.  I put in debug code before my code but it fails before it gets to any of my code.  Both computers are XP.  The client comptuter actually has VS2003, though it is not used.

    I have tried it with either the 2.0 framework or the 3.5 framework (and included those as prerequisities) but neither makes a  difference (and I did set that in the Launch conditions, as well as in the Advanced Compile Options).

    I don't think I can run JIT debugging on the user computer due to permission issues.  Are there any other debugging things I can try to narrow this down or has anyone encountered this.  I'm tearing my hair out...
    Thanks in advance!
    Monday, May 4, 2009 7:21 PM

Answers

  • I discovered my problem was with Crystal Reports (for VS2008). I tried to use the merge modules as some posts indicated but could only get it to work by separately installing the Crystal Reports Basic for Visual Studio 2008 redistributable (crredist2008_x86) from the sap - business objects download site: Business Objects - Crystal Reports Runtime Packages

    Hopefully this will save others from the hours of wasted time I spent.
    Thanks all for your suggestions!
    penel
    • Marked as answer by penel Friday, May 8, 2009 5:15 PM
    Friday, May 8, 2009 5:14 PM

All replies

  • When I've seen this it's been AntiVirus software. In my particular case (which might not be the same) the AV software was preventing adding anything to the Run and RunOnce keys in the registry. It returned InvalidOPeration because thw operation was forbidden, not an access denied error.
    Phil Wilson
    Monday, May 4, 2009 9:04 PM
  • Hi penel,

    First please check which .NET Framework your project is used. Since you have covert from VS2003. while in VS 2008, framework 1.1 is no long supported. Please look at the following article.
    http://weblogs.asp.net/scottgu/archive/2007/06/20/vs-2008-multi-targeting-support.aspx

    I think you can try to install .NET Framework 3.5 on that computer first and then run your application. First try to run your application under administrator account. If there is no problem, try to run under user account. User account cannot run msi to install your application as well as .NET Framework.

    Please feel free to tell me if you need any help.

    Sincerely,
    Kira Qian


    Please mark the replies as answers if they help and unmark if they don't.
    • Marked as answer by penel Friday, May 8, 2009 5:10 PM
    • Unmarked as answer by penel Friday, May 8, 2009 5:11 PM
    Thursday, May 7, 2009 3:18 AM
  • I discovered my problem was with Crystal Reports (for VS2008). I tried to use the merge modules as some posts indicated but could only get it to work by separately installing the Crystal Reports Basic for Visual Studio 2008 redistributable (crredist2008_x86) from the sap - business objects download site: Business Objects - Crystal Reports Runtime Packages

    Hopefully this will save others from the hours of wasted time I spent.
    Thanks all for your suggestions!
    penel
    • Marked as answer by penel Friday, May 8, 2009 5:15 PM
    Friday, May 8, 2009 5:14 PM