With the help of the code examples on the wiki pages I've managed to have my installer check if the .NET framework 2.0 is installed, and if not, direct the user to microsoft's .net framework download page.
Now I have a user that managed to install my application, but when trying to run it, he got following error:
I think this might be because besides copying the files I also need to do some sort of registering?System.InvalidOperationException: An error occurred creating the form.
See Exception.InnerException for details. The error is: Class not registered
(Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) --->
System.Runtime.InteropServices.COMException (0x80040154): Class not registered
(Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
at
System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance
(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
...
The only thing I found on the forum is 'regasm', but when trying that on my .exe, it states that there are no types to register.
Does anyone know what else I should do to get a .NET application working on another pc?
Thanks