XPEHOC2
Posts: 2
Joined: Sat Aug 31, 2013 11:17 pm

Newbie question. Visual studio project compilation

Hello,
It my first time compiling visual studio project and I`m having some problems due to lack of knowledge and experience. When I publish project using VisualStudio Express 2012 it works (one-click application)
Project uses some txt files from the resources folder.

So I tried to compile the entire project using Visual Studio Application template. I added sln file, chose the debug folder exe file. Added resources folder with the text files. Compiled.
After I install it it gives me -error

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at TankWorksheets.ws_main.ws_main_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

if I click continue - it works but seems like it was not able to read txt files from the resources folder...
Is there any good tutorial how to compile projects using visual studio template?

Thanks,

I also uploaded two videos, video1 shows normal one-click application, video2 - installer compilation...
https://dl.dropboxusercontent.com/u/23443066/video1.mpg
https://dl.dropboxusercontent.com/u/23443066/video2.mpg

Any help is appreciated. Thanks.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Newbie question. Visual studio project compilation

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

I'm not sure why this happens. In order to get more details about the related error you should try to debug your application. Also, if your application has dependencies you should make sure they are installed on target machine. In order to add your application dependencies you can go to "Files and Folders" page, select your application file and use the [Add Dependencies] toolbar button or the corresponding context menu item.
Is there any good tutorial how to compile projects using visual studio template?
You can take a look on our "Importing Visual Studio Application" tutorial.

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
XPEHOC2
Posts: 2
Joined: Sat Aug 31, 2013 11:17 pm

Re: Newbie question. Visual studio project compilation

Thank you, I will take a closer look .
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Newbie question. Visual studio project compilation

You're welcome.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”