Troubleshoot a setup project

Adrien Sallé 1 Reputation point
2022-11-17T08:30:38.78+00:00

I'm trying to create a setup project for an C# application I've made using GMaps. (Target Framework is 4.7.2)
I have added GMaps to my project from NuGet.
Everything seems to work fine when following the steps of the setup Wizard, and all the dependencies are detected.
261344-image.png

However, after the application is installed on the new computer (without Visual Installed) the application it couldn't access (or find?) the GMap dependencies even though they are in the installation folder. I have modified my code to check the presence of the dependencies and it seems it cannot find thoses even when I install the app on my computer.

I already tried finding an answer from this page https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/kz0ke5xt(v=vs.100)

What can I do to identify the origin of the problem ?
Could it be something like a path variable I have to set somewhere ? Or is there an action I have to do during the installation ?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,988 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,125 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,061 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Adrien Sallé 1 Reputation point
    2022-12-01T10:56:17.3+00:00

    I wrote a smaller program (still calling GMap) giving me the same error, this time I've got the exeption raised by the system.
    Here is the error message

    ************** Texte de l'exception **************
    System.TypeInitializationException: Une exception a été levée par l'initialiseur de type pour 'GMap.NET.WindowsForms.GMapControl'. ---> System.DllNotFoundException: Impossible de charger la DLL 'SQLite.Interop.dll': Le module spécifié est introuvable. (Exception de HRESULT : 0x8007007E)
    à System.Data.SQLite.UnsafeNativeMethods.sqlite3_libversion()
    à GMap.NET.CacheProviders.SQLitePureImageCache.Ping()
    à GMap.NET.GMaps.SQLitePing()
    à GMap.NET.WindowsForms.GMapControl..cctor()
    --- Fin de la trace de la pile d'exception interne ---
    à GMap.NET.WindowsForms.GMapControl..ctor()
    à MappingTool.MainForm.button1_Click(Object sender, EventArgs e)
    à System.Windows.Forms.Control.OnClick(EventArgs e)
    à System.Windows.Forms.Button.OnClick(EventArgs e)
    à System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    à System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    à System.Windows.Forms.Control.WndProc(Message& m)
    à System.Windows.Forms.ButtonBase.WndProc(Message& m)
    à System.Windows.Forms.Button.WndProc(Message& m)
    à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    ************** Assemblys chargés **************
    mscorlib
    Version de l'assembly : 4.0.0.0
    Version Win32 : 4.8.4515.0 built by: NET48REL1LAST_C
    CodeBase : file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

    ----------------------------------------

    MappingTool
    Version de l'assembly : 1.0.0.0
    Version Win32 : 1.0.0.0
    CodeBase : file:///C:/Program%20Files%20(x86)/FBTECHNOLOGYTROUBLESHOOTING/MappingToolSetup/MappingTool.exe

    ----------------------------------------

    System.Windows.Forms
    Version de l'assembly : 4.0.0.0
    Version Win32 : 4.8.4550.0 built by: NET48REL1LAST_C
    CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

    ----------------------------------------

    System
    Version de l'assembly : 4.0.0.0
    Version Win32 : 4.8.4536.0 built by: NET48REL1LAST_C
    CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

    ----------------------------------------

    System.Drawing
    Version de l'assembly : 4.0.0.0
    Version Win32 : 4.8.4390.0 built by: NET48REL1LAST_C
    CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

    ----------------------------------------

    GMap.NET.WindowsForms
    Version de l'assembly : 2.1.7.0
    Version Win32 : 2.1.7.0
    CodeBase : file:///C:/Program%20Files%20(x86)/FBTECHNOLOGYTROUBLESHOOTING/MappingToolSetup/GMap.NET.WindowsForms.DLL

    ----------------------------------------

    GMap.NET.Core
    Version de l'assembly : 2.1.7.0
    Version Win32 : 2.1.7.0
    CodeBase : file:///C:/Program%20Files%20(x86)/FBTECHNOLOGYTROUBLESHOOTING/MappingToolSetup/GMap.NET.Core.DLL

    ----------------------------------------

    System.Configuration
    Version de l'assembly : 4.0.0.0
    Version Win32 : 4.8.4190.0 built by: NET48REL1LAST_B
    CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

    ----------------------------------------

    System.Core
    Version de l'assembly : 4.0.0.0
    Version Win32 : 4.8.4536.0 built by: NET48REL1LAST_C
    CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

    ----------------------------------------

    System.Xml
    Version de l'assembly : 4.0.0.0
    Version Win32 : 4.8.4084.0 built by: NET48REL1
    CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

    ----------------------------------------

    System.Data.SQLite
    Version de l'assembly : 1.0.115.5
    Version Win32 : 1.0.115.5
    CodeBase : file:///C:/Program%20Files%20(x86)/FBTECHNOLOGYTROUBLESHOOTING/MappingToolSetup/System.Data.SQLite.DLL

    ----------------------------------------

    System.Data
    Version de l'assembly : 4.0.0.0
    Version Win32 : 4.8.4536.0 built by: NET48REL1LAST_C
    CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll

    ----------------------------------------

    System.Transactions
    Version de l'assembly : 4.0.0.0
    Version Win32 : 4.8.4084.0 built by: NET48REL1
    CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll

    ----------------------------------------

    mscorlib.resources
    Version de l'assembly : 4.0.0.0
    Version Win32 : 4.8.4084.0 built by: NET48REL1
    CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_fr_b77a5c561934e089/mscorlib.resources.dll

    ----------------------------------------

    System.Windows.Forms.resources
    Version de l'assembly : 4.0.0.0
    Version Win32 : 4.8.4084.0 built by: NET48REL1
    CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_fr_b77a5c561934e089/System.Windows.Forms.resources.dll

    ----------------------------------------

    0 comments No comments

  2. Adrien Sallé 1 Reputation point
    2022-12-02T15:23:37.31+00:00

    So, it seems I have solved my problem. The missing library SQLite.Interop.dll wasn't installed along with the others by using NuGet.
    To fix this I used the solution on this forum : unable-to-load-dll-sqlite-interop-dll

    I pasted the following lines inside the .csproj file:

    <PropertyGroup>   
        <ContentSQLiteInteropFiles>true</ContentSQLiteInteropFiles>  
        <CopySQLiteInteropFiles>false</CopySQLiteInteropFiles>  
        <CleanSQLiteInteropFiles>false</CleanSQLiteInteropFiles>  
        <CollectSQLiteInteropFiles>false</CollectSQLiteInteropFiles>  
    </PropertyGroup>  
    

    And after that I installed again the NuGet packages of SQLite.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.