DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: message box

  1. #1
    Join Date
    Apr 2011

    message box

    après l'exécution de mon code il s'affiche le message suivant.
    Impossible de charger le fichier ou l'assembly 'file:///C:\Users\PLAY\Desktop\Doctorat18\Doctorat17\Doctorat\bin\Debug\System.Data.dll' ou une de ses dépendances. Tentative de chargement d’un programme de format incorrect.
    le code est le suivant:

    From Google Translator: hello,
    after running my code it displays the following message.
    Could not load file or assembly 'file: / / / C: \ Users \ PLAY \ Desktop \ Doctorat18 \ Doctorat17 \ PhD \ bin \ Debug \ System.Data.dll'or one of its dependencies. Attempt to load a program with an incorrect format.
    code is as follows:
    Private Sub pgw_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles pgw.DoWork
            Dim path_app As String = Application.StartupPath
            Dim dll_files = From f In My.Computer.FileSystem.GetFiles(path_app) _
                                         Where f.EndsWith(".dll") _
                                         Select My.Computer.FileSystem.GetFileInfo(f) 
            If dll_files.Count > 0 Then
                ' frm_load_assembly.canShow = True
                Dim cpt As Integer = 0
                For Each fi In dll_files
                    If Not fi.FullName = path_app & "\DLLK500.dll" Then
                        If File.Exists(fi.FullName) Then
                            cpt += 1
                            Dim *** As Assembly = Assembly.LoadFrom(fi.FullName)
                            Me.pgw.ReportProgress(cpt, ***.FullName)
                            'Dim typ As Type = ***.GetType("System.Array")
                            'If frm_load_assembly.canShow = True Then
                            'End If
                        End If
                    End If
            End If
    s'il vous plaît aidez moi pour résoudre ce problème
    Last edited by Hack; 04-19-2011 at 01:55 PM. Reason: Added Code Tags

  2. #2
    Join Date
    Apr 2007
    Sterling Heights, Michigan
    Please restate your problem in English.

    Based on the code you posted, it seems you are not using VB Classic but, rather, VB.NET so I have moved your thread to the .NET section.

  3. #3
    Join Date
    Feb 2004
    Longueuil, Québec
    Il n'y a aucune raison pour laquelle le fichier System.Data.dll se retrouve dans le répertoire spécifié. C'est un dll système qui est normalement installé avec le framework dans le Global Assembly Cache.

    Il faudrait trouver ce qui déclenche une tentative de chargement dans le répertoire C:\Users\PLAY..., et n'ayant pas les valeurs des variables reçues par le code, il est impossible de déterminer si c'est causé par une des lignes envoyées.

    La seule où ça aurait du sens est celle où on fait un LoadForm. Or, ce dll est référencé dans les propriétés de projet quand on crée un nouveau projet. Il n'y a donc pas de raison de le référencer dynamiquement avec LoadForm.

    Est-ce que l'erreur est reproductible quand l'application roule en mode Debug dans l'environnement Visual Studio? Si oui, qu'est-ce qu'il y a sur la ligne qui cause l'erreur?

    From Google Translator: There is no reason why the file System.Data.dll is found in the specified directory. Dll is a system that is normally installed with the framework in the Global Assembly Cache.

    We should find out what triggers an attempt to load the directory C: \ Users \ ... PLAY, and not the variable values ​​received by the code, it is impossible to determine whether it is caused by one of lines sent.

    The one where it would make sense is when you make a LoadForm. But this dll is referenced in the project properties when you create a new project. There is no reason to reference dynamically LoadForm.

    Does the error is reproducible when the application runs in debug mode in Visual Studio? If yes, what's on the line causing the error?
    Last edited by Hack; 04-19-2011 at 01:54 PM. Reason: Inserted Translation
    Jacques Bourgeois

  4. #4
    Join Date
    Apr 2007
    Sterling Heights, Michigan
    Come on know better than this...translate your post into English please.

  5. #5
    Join Date
    Feb 2004
    Longueuil, Québec
    Sorry Hack.

    I do not "know better". I have seen a few posts in Spanish in other corners of DevX, so I did not think it was a problem.

    In order for a translation of the answer to be useful to English readers, I should also translate the question. I am in a rush right now and do not have the time to do it.

    The answer would not be useful to other users anyway, since the problem looks at first sight to be something that is not configured properly on the users computer.

    If the thread goes on, I will give my answers in English instead of French.
    Jacques Bourgeois

  6. #6
    Join Date
    Apr 2007
    Sterling Heights, Michigan
    If you have seen posts in Spanish it is because none of us caught it. If we had, it would have been addressed. If you encounter posts in any language other than English, feel free to report it.


Similar Threads

  1. Trigger validationsummary message box
    By JFeng in forum ASP.NET
    Replies: 0
    Last Post: 10-04-2007, 02:44 PM
  2. Message Box in ASP.NET
    By Ashish_26 in forum ASP.NET
    Replies: 2
    Last Post: 08-24-2007, 01:04 AM
  3. Message box with details
    By alphaoide in forum .NET
    Replies: 1
    Last Post: 06-09-2006, 02:01 AM
  4. Message Box
    By lady_campari in forum VB Classic
    Replies: 2
    Last Post: 07-11-2005, 06:52 PM
  5. message box
    By computergeek in forum VB Classic
    Replies: 2
    Last Post: 04-29-2005, 04:26 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center