gastao Posted March 5, 2014 Report Share Posted March 5, 2014 na minha maquina o programa corre na perfeição win 7 ultimate a x64 preciso que isto corra em win server 2008 r2 standard também a x64 quando corro a aplicação aparece me um erro de framework exactamente igual a este http://social.msdn.microsoft.com/forums/vstudio/en-US/280e1e64-1824-4786-9d77-cf3388c86f58/net-framework-40-error-network-wide e de seguida Consulte o fim desta mensagem para obter detalhes sobre como invocar a depuraçãoJIT (just-in-time) em vez desta caixa de diálogo. ************** Texto da excepção ************** System.NullReferenceException: A referência de objecto não foi definida como uma instância de um objecto. em programa.Module1.GetHDSerial() em C:\Module1.vb:line 76 em programa.Form1.Form1_Load(Object sender, EventArgs e) em .vb:line 18 em System.EventHandler.Invoke(Object sender, EventArgs e) em System.Windows.Forms.Form.onload(EventArgs e) em System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) em System.Windows.Forms.Control.CreateControl() em System.Windows.Forms.Control.WmShowWindow(Message& m) em System.Windows.Forms.Control.WndProc(Message& m) em System.Windows.Forms.Form.WmShowWindow(Message& m) em System.Windows.Forms.Form.WndProc(Message& m) em System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Assemblagens carregadas ************** mscorlib Versão da assemblagem: 4.0.0.0 Versão Win32: 4.0.30319.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll ---------------------------------------- programa Versão da assemblagem: 1.0.0.0 Versão Win32: 1.0.0.0 CodeBase: file:///C:/programa/programa/bin/Debug/programa.exe ---------------------------------------- Microsoft.VisualBasic Versão da assemblagem: 10.0.0.0 Versão Win32: 11.0.50938.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll ---------------------------------------- System.Windows.Forms Versão da assemblagem: 4.0.0.0 Versão Win32: 4.0.30319.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System Versão da assemblagem: 4.0.0.0 Versão Win32: 4.0.30319.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing Versão da assemblagem: 4.0.0.0 Versão Win32: 4.0.30319.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- Accessibility Versão da assemblagem: 4.0.0.0 Versão Win32: 4.0.30319.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll ---------------------------------------- System.Runtime.Remoting Versão da assemblagem: 4.0.0.0 Versão Win32: 4.0.30319.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll ---------------------------------------- System.Management Versão da assemblagem: 4.0.0.0 Versão Win32: 4.0.30319.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll ---------------------------------------- mscorlib.resources Versão da assemblagem: 4.0.0.0 Versão Win32: 4.0.30319.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_pt_b77a5c561934e089/mscorlib.resources.dll ---------------------------------------- System.Windows.Forms.resources Versão da assemblagem: 4.0.0.0 Versão Win32: 4.0.30319.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_pt_b77a5c561934e089/System.Windows.Forms.resources.dll ---------------------------------------- ************** Depuração JIT ************** Para activar a depuração just-in-time (JIT), o ficheiro .config para esta aplicação ou computador (machine.config) tem de ter o valor jitDebugging definido na secção system.windows.forms. A aplicação também tem de ser compilada com a depuração activada. Por exemplo: <configuration> <system.windows.forms jitDebugging="true" /> </configuration> Quando a depuração JIT está activada, qualquer excepção não processada será enviada para o depurador JIT registado no computador em vez de ser processada por esta caixa de diálogo. Link to comment Share on other sites More sharing options...
nelsonr Posted March 5, 2014 Report Share Posted March 5, 2014 O que é que está a ser feito nesta linha [...] em programa.Module1.GetHDSerial() em C:\Module1.vb:line 76 Link to comment Share on other sites More sharing options...
gastao Posted March 5, 2014 Author Report Share Posted March 5, 2014 (edited) ta a ir buscar o serial number do hdd Dim Searcher_p As New ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_DiskDrive") ' For Each queryObj As ManagementObject In Searcher_p.Get() nshdd = (queryObj("SerialNumber").ToString.Trim) Next Edited March 5, 2014 by gastao Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now