0

I created setup file in vb.net and I installed in my development machine, it works normally, but when I install my application to another machine which doesn't have visual studio installed. it shown a message program has stopped working. How to solve it? enter image description here

Visual Vincent
  • 18,045
  • 5
  • 28
  • 75
  • 1
    Problem signature 9 says `System.InvalidOperationException`. I don't think it's related to that the computer doesn't have Visual Studio, but something is throwing an error in your application. -- Can you verify if it works on all computers with VS and on no computers without it? – Visual Vincent Jul 27 '16 at 08:16
  • 1
    Did you try on yet another machine, but which has VS this time? I don't think it has anything to do with VS being installed or not, but without more information, we can't say much. Check [this page](https://msdn.microsoft.com/en-us/library/fd85b3df.aspx) for starters. According to it, I'd say your problem is `A System.Linq.Enumerable method is called on an empty collection` and you're getting your collection dynamically (enumerating the files in a folder for exemple), since the other problems should be present on your development machine. – Kilazur Jul 27 '16 at 08:17
  • @VisualVincent (edited) Just an educated guess; `A method running on a non-UI thread updates the UI` should fire on the dev machine; same goes for `A statement in a foreach (For Each in Visual Basic) block changes the collection it is iterating` and `A Nullable that is null is cast to T`; that leaves us with the last one, for which I could find an exemple that makes it work in dev but not in prod. – Kilazur Jul 27 '16 at 08:23
  • @Kilazur : Already understood, just didn't read your comment thoroughly. :) – Visual Vincent Jul 27 '16 at 08:24
  • Thanks for comments! Yes I tried to install on 3 computers that have Visual Studio installed and It worked normally, but other 3 computers have the same OS which don't have Visual Studio installed, it shows error like that and I can't open it.. @VisualVincent – Vong Sopheaktra Jul 27 '16 at 08:25
  • 1
    Vong : Also try checking Windows's Event Viewer. It can contain more information and possibly also a stack trace. – Visual Vincent Jul 27 '16 at 08:25
  • Let the error occur, then go into the Event Viewer and locate the error there. Edit your question and put most of its contents in it, also see if there's a stack trace. – Visual Vincent Jul 27 '16 at 08:36

0 Answers0