[ uros2002 @ 28.09.2010. 23:42 ] @
Pozdrav svima
Pokusavam da napravim aplikaciju za muziku , tv i radio.
Nesto sam i napravio ali kada convertujem u exe i pokrenem na drugom racunaru dovijem gresku prilikom pokretanja
Code:
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: An error occurred creating the form. See Exception.InnerException for details.  The error is: Could not load file or assembly 'AxInterop.WMPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'AxInterop.WMPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'AxInterop.WMPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
   at WindowsApplication1.Muzika.InitializeComponent()
   at WindowsApplication1.Muzika..ctor()
   --- End of inner exception stack trace ---
   at WindowsApplication1.My.MyProject.MyForms.Create__Instance__[T](T Instance)
   at WindowsApplication1.My.MyProject.MyForms.get_Muzika()
   at WindowsApplication1.Pocetna.Label1_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Label.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)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1873 (QFEN-1.050727-1800)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Uros2002_Plejar
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file://DEJAN-PC/Users/Public/Downloads/Uros2002_Plejar.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.



Dali neko moze da mi pomogne oko ovog problema?
Samo da napomenem da je aplikacija radjena u Visual Studio 2008 - NET Framework 3.5
ako treba okacicu i primer aplikacije da se proba.
[ AMD guy @ 29.09.2010. 00:34 ] @
Mislim da se objasnjenje tvoje greske krije u samom opisu iste
Code:

The error is: Could not load file or assembly 'AxInterop.WMPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'AxInterop.WMPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
[ uros2002 @ 29.09.2010. 00:48 ] @
Ok to sam i ja ukapirao da je problem u tome ali dali moze mala pomoc oko toga kako da resim ovaj problem.
Posto je ovo moja prva aplikacija koju pokusavam da napravim.


[Ovu poruku je menjao uros2002 dana 29.09.2010. u 01:58 GMT+1]

kada pravim exe fail dali treba i neki od ovih failova da ubacim i gde da ih smestim.
za pravljenje exe faila koristim Inno Setup Compiler
Ovd imama taj AxInterop.WMPLib dali treba da ga kopiram u windows\sistem 32

[Ovu poruku je menjao uros2002 dana 29.09.2010. u 02:01 GMT+1]
[ bojan21 @ 29.09.2010. 16:05 ] @
Te dve 'Interop' datoteke kopiraj u direktorijum u kome se nalazi 'exe' datoteka.
[ Boris B. @ 29.09.2010. 23:50 ] @
Citat:
bojan21: Te dve 'Interop' datoteke kopiraj u direktorijum u kome se nalazi 'exe' datoteka.

Mozda ce to pomoci u ovom slucaju ako krajnji korisnik vec ima WMPLib.dll, ali za opsti slucaj nije dovoljno iskopirati samo Interop dll-e nego treba i sam DLL od odgovarajuce COM komponente (WMPLib.dll u ovom slucaju). Cak i tada ne mora da znaci da ce stvar da radi, treba potraziti odgovarajuci Redistributable paket za COM komponentu.