Problem with SETUP & DEPLOYMENT

I have run / debug my application and it is not giving me any errors. The moment i tried to create a setup and deployment i start getting problems. The setup file is created and when i install it, it does what it is supposed to do. BUT.. when i run it , it says Exeption was thrown in Mymodule.vb.

I have the module here, and it looks fine. Can anybody tell me what is going on.

Is there anybody to whom i can send ALL of my code, to help me, yust with the compiling.. This is a project for College i am working on, and my time is running out. PLEASE HELP...!!!
Here is the mymodule code..
[code]
Public Module MyModule
Dim Rs_AppPath As String = System.IO.Directory.GetCurrentDirectory
Public testname1, testname2, testname3, testname4, testname5, testname6, testname7, testname8, testname9, testname10 As String
Public AmountTests As Integer
Public str As String = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=" & Application.StartupPath.Substring(0, Application.StartupPath.LastIndexOf("bin")) & "libra.mdb;Mode=Share Deny None;Extended Properties=;Jet OLEDB:System database=;Jet OLEDB:Registry Path=;Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False"
Public currentstudent As String
Public lecturerdays1, lecturerdays2, lecturerdays3, lecturerdays4 As Integer

End Module
[/code]



Comments

  • seancampbellseancampbell Pennsylvania, USA
    A null reference exception? Can you paste in the entire details from the exception your getting?

    I have a sneaking suspicion its on the Public str as string line.
  • : A null reference exception? Can you paste in the entire details from
    : the exception your getting?
    :
    : I have a sneaking suspicion its on the Public str as string line.

    Here is the details, i used the [] to indicate, hope it correct...
    [CODE]
    System.InvalidOperationException was unhandled
    Message="An error occurred creating the form. See Exception.InnerException for details. The error is: The type initializer for 'Library.MyModule' threw an exception."
    Source="Library"
    StackTrace:
    at Library.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
    at Library.My.MyProject.MyForms.get_mainform()
    at Library.My.MyApplication.OnCreateMainForm() in F:My Book Library DataBaseLibraryMy ProjectApplication.Designer.vb:line 35
    at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
    at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
    at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
    at Library.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 [/CODE]

  • seancampbellseancampbell Pennsylvania, USA
    What framework are you using? (2003-1.1, 2005-2.0, 2008-3.5)

    That is a strange error, can you describe how you've compiled and are installing this application? I have never built an executable installer. If you have a meebo.com account you can find me on there as FireSickle (or if you have MSN, I am on that as firesickle gmail com)
  • : What framework are you using? (2003-1.1, 2005-2.0, 2008-3.5)
    :
    : That is a strange error, can you describe how you've compiled and
    : are installing this application? I have never built an executable
    : installer. If you have a meebo.com account you can find me on there
    : as FireSickle (or if you have MSN, I am on that as firesickle
    : gmail com)

    I am using 2005. I used the SETUP-WIZARD. I first build the application and then added the SETUP-Wizard PROJECT. I have a feeling that some path in my application is not finding something. Maybee in resources.

    Is there someplace i can send my code so that someone can try to compile it. It is about 5 meg when zipped. The code is not professional, and i dont want someone to re-write it, just to look at this problem.. PLEASE..
  • seancampbellseancampbell Pennsylvania, USA
    I don't know of any places. What kind of time frame are we looking at? I am at work right now, and will be until late tonight (doing inventory counts and supporting the inventory system at one of our plants near Memphis).

    I can take a look at your code, but I cannot guarantee I can make heads or tails of it...
  • : I don't know of any places. What kind of time frame are we looking
    : at? I am at work right now, and will be until late tonight (doing
    : inventory counts and supporting the inventory system at one of our
    : plants near Memphis).
    :
    : I can take a look at your code, but I cannot guarantee I can make
    : heads or tails of it...

    I have until Monday, I can email it to you, if you don't mind downloading the code. I just Zipped it, It is 7.9 meg. Can i use the email above?

    Thanks. I would appreciate any help..
  • seancampbellseancampbell Pennsylvania, USA
    I am looking at the code, it compiles correctly. When is it giving you that error?
  • : I am looking at the code, it compiles correctly. When is it giving
    : you that error?

    It is compiling correctly, but when i run the program that is being installed, it does not run. THat is, after i installed it on a 3rd party computer.

    Please try that
  • seancampbellseancampbell Pennsylvania, USA
    When you install this software on a third party computer, please ensure that the Windows XP .Net Framework 2.0 is installed.

    http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=en

    I was able to run this on a PC that did not have Developer studio, but had 2.0 installed properly... I dont know how your installing, i just used the .exe file that was in the Bin folder...
  • : When you install this software on a third party computer, please
    : ensure that the Windows XP .Net Framework 2.0 is installed.
    :
    : http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-436
    : 2-4b0d-8edd-aab15c5e04f5&displaylang=en
    :
    : I was able to run this on a PC that did not have Developer studio,
    : but had 2.0 installed properly... I dont know how your installing, i
    : just used the .exe file that was in the Bin folder...

    I created an setup -depoyment project using SETUP-WIZARD which i added to the project. I know it runs from the exe in the bin. But i am supposed to have an executable application. THe moment i run my setup and the 3rd party tries to run it, it throws and exeption.

    Do you know how i should add the setup project to this project, because i think this is where i am going wrong?

    Any other mistakes you can spot, i need good marks and would love some +- critics, i dont know someone that has the knowledge to look at it.
    thanks again
  • I crated a deployment package using Inno Setup. I installed it in a Virtual Machine (VMWare Workstation). I had to try several times until I got in to setup and work.
    VM: virtual machine.
    I made a VM, created the setup .exe, copied it to the VM and then ran the installed in the VM. It did not work several times, but eventually it did.

    Consider that VM thing (if you don't have a 2nd computer to test it on).

    HP//
  • : I crated a deployment package using Inno Setup. I installed it in a
    : Virtual Machine (VMWare Workstation). I had to try several times
    : until I got in to setup and work.
    : VM: virtual machine.
    : I made a VM, created the setup .exe, copied it to the VM and then
    : ran the installed in the VM. It did not work several times, but
    : eventually it did.
    :
    : Consider that VM thing (if you don't have a 2nd computer to test it
    : on).
    :
    : HP//
    :
    Thanks for your efforts, i downloaded the Inno Setup, I think it is a good program, but it looks like i would have to learn the script file method, for which i do not have the time, Monday is coming fast. Is there some other method of creating a setup file, fast and easy. I don not want to buy and Setup creater, something simple and cheap.

    You say my code would work?
  • seancampbellseancampbell Pennsylvania, USA
    Yeah, your code worked fine for me when I put it on another computer. Granted I didn't compile it into a Setup file. Instead I copied the required Exe and other files out of the Bin folder, into a folder to run it from.

    I didn't really see anything I would complain about code wise, but your interface is REALLY busy, but that is typical for a college project, especially if your teacher is a Graphics Design Major and not a Programming Major... (I had that when I was in school, I don't know how they thought VisualBasic should have a Graphics Designer teacher).

    -Sean
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories