VB.net program does not start

Solved
Hello,

So here it is, I made a program in VB.NET (2010) that I created on Windows 7. After compiling and saving it, I run my .exe and my program launches well. Then I send my .exe to a friend who is also on Windows 7, and there, the program does not launch!
So I tested to make a program without buttons, without code, without anything, I pass it to my friend and this time the program launches ...

Thanks for your responses

11 answers

  1. [Resolved] I will explain for those who had the same problem (I want to thank lermite222 who led me to the clue ;) )

    So, after finishing your application, go to Project >> Properties [Your project name]

    Then go to Publish and click on "Required components"
    Check: Download required components from the component supplier's website

    After that, check all the boxes where there is no question mark. (Those without a question mark are the ones installed on your machine)
    After doing that, click "OK" and then click on "Publish Now" at the bottom
    Choose where it will place your "publish"
    Then once it is finished, go look for it, and EVERYTHING IN THERE IS IMPORTANT so if you want to install your project on a machine, you will need the stuff in "publish"

    Then if you want to install your project, click on SETUP, the SETUP will only install the required components. Once it's finished, click on [Your project name] and it will install your project correctly

    Thank you all for your help!
    2
    1. Contributor
      Hello,
      If you want to export your app to a machine that doesn't have VB.Net, you need to create an installer.
      See you later
      --
      Experience teaches more surely than advice. (André Gide)
      If you knock on a pot and it sounds hollow, it’s not necessarily the pot that’s empty. ;-)(Confucius)
      0
      1. Alright, I'm testing, if it works I'll thank you! (It's only the .exe that I put in to install, right? Logically, there's only that one.)
        0
      2. Contributor
        No, the installer will compress the exe, but also all dependencies and dlls.
        Check with Inno Setup.
        0
      3. It still doesn't work...
        0
      4. If you have VS.net, no need to look for InnoDB, just choose project type configuration and deployment.
        0
    2. Contributor
      It still doesn't work...
      Clearer than that, you die...
      What isn't working?
      What did you do, try??
      Experience teaches more surely than advice. (André Gide)
      If you bump into a pot and it sounds hollow, it's not necessarily the pot that's empty. ;-)(Confucius)
      0
      1. I tried to do an installation, it doesn't work and then, I modified the code, and still nothing. In fact, it happens on all the machines. When I launch it, I immediately get the error report.

        Thank you for your help.
        0
        1. The framework is installed, and it’s the latest one. But I think I found something... When a person installs Visual Basic, (the installation doesn’t just install Visual Basic but other things as well) once they have installed Visual Basic and its components... my program starts up.

          But we need to know what the other component to install is (excluding the Framework which is already installed).

          Thank you for your help.

          Edit: When I open my project, I get "Initialization failure of the system"

          Unrecognized configuration section system.serviceModel. (c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config line 134):

          at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
          at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
          at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
          at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)

          That said, I can ignore this error and continue with my project.
          0
          1. Contributor
            Re,
            With Inno Setup you create a ... Setup..
            No need to install VB.net on other computers.
            Copy your Setup onto a CD.
            Run it on another PC.
            Then you run your app like any other.
            It should work.
            See you later
            Experience teaches more surely than advice. (André Gide)
            If you bump into a pot and it sounds hollow, it's not necessarily the pot that is empty. ;-)(Confucius)
            0
            1. Yes, what should I put in the Setup? Just the .exe? Because in vb.net I don't see where the .DLL are.

              Otherwise, thank you for your help.
              0
          2. Contributor
            You open Inno Setup, show it the exe you want to process, and it takes care of collecting the necessary dependencies for operation.
            If your application uses auxiliary files like a database, you need to include it in the setup.
            Be sure to read what is requested during the process.
            See you!
            EDIT:
            Well, there's a much simpler way to do this (I hadn't tested it yet).
            In VB2010, you load your project.
            Then click on > Project >> Publish.. (your project name)
            Just specify a directory.
            The setup is done, you copy it to a CD/DVD (it might also work on a USB stick)
            See you!
            Experience teaches more surely than advice. (André Gide)
            If you bump into a pot and it sounds hollow, it doesn't necessarily mean the pot is empty. ;-)(Confucius)
            0
            1. I'm testing and I'll let you know, thanks for your help.
              0
          3. I think it works! I'm going to test it on a friend's PC this afternoon and I'll let you know tonight!
            0
            1. So when I do the setup, okay
              Then on my friend's computer, I start the setup, and it tells me to install Net Framework 4, I install it and then when I restart the setup it tells me to install: Microsoft.VisualBasic.PowerPack.Vs V 9.0.0.0

              So at this point, do I still need Visual Basic?
              0
              1. Contributor
                Well, I haven't done this installation since .Net but..
                To add Microsoft.VisualBasic.PowerPack.Vs V xxxx (2010 is V10.0)
                Before doing the setup, >> Properties of (the name of the project) >> Publish and check
                Microsoft.VisualBasic.PowerPack.Vs V 10.0
                Then redo the setup.
                If anyone has already performed these maneuvers, please help the participant.
                See you later
                Experience teaches more surely than advice. (André Gide)
                If you bump into a pot and it sounds hollow, it's not necessarily the pot that's empty. ;-)(Confucius)
                0
                1. I'm testing and I'll let you know, thanks for your help ^^'
                  0