Impossible d'integrer le Reportview dans l'exécutable

Résolu
Yatt85 Messages postés 8 Date d'inscription jeudi 30 août 2012 Statut Membre Dernière intervention 14 janvier 2015 - 12 janv. 2015 à 13:39
Yatt85 Messages postés 8 Date d'inscription jeudi 30 août 2012 Statut Membre Dernière intervention 14 janvier 2015 - 14 janv. 2015 à 11:49
Bonjour,
J'ai fini de créer mon application de gestion de restaurant. J'ai généré l'exécutable mais j'ai un gros souci quand j'installe sur une machine tierce et quand je tente d'accéder à l'état pour imprimer la facture du client, elle m'affiche le message d'erreur suivant

<<
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 'Microsoft.ReportViewer.WinForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ReportViewer.WinForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at GESTION_RESTAURANT_AF.Form_Imprimer_Facture.InitializeComponent()
at GESTION_RESTAURANT_AF.Form_Imprimer_Facture..ctor()
--- End of inner exception stack trace ---
at GESTION_RESTAURANT_AF.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
at GESTION_RESTAURANT_AF.My.MyProject.MyForms.get_Form_Imprimer_Facture()
at GESTION_RESTAURANT_AF.Menu_General.mnu_fact_cli_Click(Object sender, EventArgs e) in C:\Users\Yattara\Documents\Projet RESTAURANT-ATLANTIC FAMILY\GESTION RESTAURANT AF\GESTION RESTAURANT AF\Menu General.vb:line 394
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.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: 4.0.0.0
Win32 Version: 4.0.30319.34014 built by: FX45W81RTMGDR
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
GESTION RESTAURANT AF
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/AF%20RESTAURANT/GESTION%20RESTAURANT%20AF.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 12.0.20806.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34239 built by: FX452RTMGDR
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34243 built by: FX452RTMGDR
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Transactions
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34230 built by: FX452RTMGDR
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.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.

>>
Quelqu'un a déjà rencontré un tel problème, son aide me sera super utile car je dois déposer le produit final dans 1 semaine.
Merci d'avance!!!

2 réponses

Pour commencer, assure toi que les frameworks installes, a la fois sur la machine de dev ainsi que celle accueillant l'exécutable, soient identiques.
0
Yatt85 Messages postés 8 Date d'inscription jeudi 30 août 2012 Statut Membre Dernière intervention 14 janvier 2015
12 janv. 2015 à 14:13
Bonjour Luminex.
Peux je avoir plus de détails sur ta réponse. je ne saisi pas tout le contour.
Merci d'avance!!!
0
luminex > Yatt85 Messages postés 8 Date d'inscription jeudi 30 août 2012 Statut Membre Dernière intervention 14 janvier 2015
12 janv. 2015 à 19:31
D'apres ce que contient le texte de ton erreur, tu disposes du framework v4.0 sur la machine ou se situe ton executable.
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

Tu dois donc developper avec une meme version ou une version inferieure a 4.0. Ou bien mettre a jour le framework sur ta machine cible.

Nous en sommes au 4.5 actuellement et ca ne m'etonnerais pas que tu developpes en 4.5.
Il faut verifier ceci dans les proprietes de ton projet, onglet "compiler" / options avancees de compilation / framework cible.
0
Yatt85 Messages postés 8 Date d'inscription jeudi 30 août 2012 Statut Membre Dernière intervention 14 janvier 2015 > luminex
14 janv. 2015 à 11:49
Bonjour.
Merci pour ton aide luminex. J'ai finalement trouvé la solution en téléchargeant et installant le composant "Reportview.exe" sur la machine tierce. Elle s'ouvre maintenant sans problème.
Note: J'ai téléchargé à partir du site de microsoft>Centre de telechargement...
Merci infiniment
0
cs_ShayW Messages postés 3253 Date d'inscription jeudi 26 novembre 2009 Statut Membre Dernière intervention 3 décembre 2019 57
12 janv. 2015 à 14:15
Bonjour
The system cannot find the file specified.

in C:\Users\Yattara\Documents\Projet RESTAURANT-ATLANTIC FAMILY\GESTION RESTAURANT AF\GESTION RESTAURANT AF\Menu

J'ai généré l'exécutable
As tu crée un setup ?
0
Rejoignez-nous