<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<div dir="auto" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt;">
ILSpy is ideal for actually checking DLL not found (or version mismatch with e.g. System.Memory but you probably did this</div>
<div dir="auto" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt;">
<br>
</div>
<div dir="auto" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt;">
But Bitness is the likely culprit... I spent days troubleshooting one application that had some x64 and some AnyCPU that didn't play nice together</div>
<div dir="auto" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt;">
<br>
</div>
<div id="ms-outlook-mobile-body-separator-line" dir="auto"><br>
</div>
<div dir="auto" style="font-family:Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif;font-size:12pt" id="ms-outlook-mobile-signature">
<div dir="auto"> best regards,</div>
<div dir="auto"> Crispin</div>
<div dir="auto"><br>
</div>
<div dir="auto">Founder / CEO :: Linknode Ltd, trading as TrueViewVisuals</div>
<div dir="auto"><br>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> mapguide-users <mapguide-users-bounces@lists.osgeo.org> on behalf of Pierre Cardinal via mapguide-users <mapguide-users@lists.osgeo.org><br>
<b>Sent:</b> Wednesday, August 13, 2025 7:26:33 PM<br>
<b>To:</b> MapGuide Users Mail List <mapguide-users@lists.osgeo.org><br>
<b>Cc:</b> Pierre Cardinal <pierre.cardinal@sympatico.ca>; Jackie Ng <jumpinjackie@gmail.com><br>
<b>Subject:</b> Re: [mapguide-users] What is left before MGOS 4.0 RC1</font>
<div> </div>
</div>
<div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt">
Hi Jackie,</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt">
<br>
</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt">
Perhaps there is some solutions for you from this Gemini answer. </div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt">
<br>
</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt">
<br>
</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Based on your description, this is a classic and very frustrating problem in modern .NET when dealing with native libraries (DLLs). The good news is that there are well-established debugging strategies for this scenario. The developer is right—fuslogvw.exe
is no longer the tool for the job.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Here is a proposed solution path, broken down into key steps:</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
1. The Core Problem: The DLL has Missing Dependencies</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
The most likely cause of a DllNotFoundException when the DLL file is present is that one of its own native dependencies is missing. The .NET runtime tries to load your DLL, but the operating system's loader (not the .NET runtime itself) fails because a required
dependency is not found. The resulting exception message from .NET points to your DLL, but the root cause is elsewhere. This is the "cryptic" part.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
For MapGuide Portable, this is a very common issue because it relies on a whole chain of native C++ libraries for things like FDO, GDAL, and various other components.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
2. Modern Debugging Tools and Techniques</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
The developer correctly observed that Process Monitor shows the file is present. The next step is to use tools that can inspect the dependencies of a native DLL.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
a) Use a Dependency Inspection Tool</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
This is the most critical step. Forget fuslogvw.exe and Process Monitor for a moment and focus on the DLL itself.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
* "Dependencies" Tool: This is the modern successor to the old Dependency Walker. It's a free, open-source tool available on GitHub. It's specifically designed to analyze the dependencies of native DLLs, including identifying architecture mismatches (32-bit
vs. 64-bit) and showing which DLLs in the dependency tree are missing. Run this tool on the core MapGuide DLL that your .NET code is trying to load. It will likely show a list of other DLLs, some of which may be marked as not found.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
b) Inspect the Process with a Debugger</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
While not as direct as a dependency tool, a debugger can also provide clues.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
* Visual Studio Modules Window: While debugging your .NET application in Visual Studio, open the Modules window (Debug > Windows > Modules). This window lists all the DLLs that have been loaded by your application. When the DllNotFoundException occurs, you
can check which native DLLs were loaded successfully and which were not. The last native DLL that failed to load (just before the exception) is your primary suspect.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
3. Solution and Mitigation Strategies</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Once you have identified the missing dependency, you can take action.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
a) Resolve Missing Dependencies</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
* Find and Copy the Missing DLLs: The most straightforward solution is to find the missing native DLLs (e.g., from the MapGuide installation folder or a separate dependency package like GDAL) and copy them into the same directory as your application's executable.
This ensures the operating system's loader can find them.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
* Install the Correct Visual C++ Redistributable: Many C++-based libraries like MapGuide depend on the Microsoft Visual C++ Redistributable packages. If the correct version (e.g., 2015-2022) is not installed on the target machine, core C++ runtime DLLs will
be missing, leading to the cryptic DllNotFoundException.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
* Check the "Bitness": Make sure there is no mismatch. If your .NET application is compiled for x64, all native DLLs must also be x64. An x86 DLL will fail to load in an x64 process, and vice-versa.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
b) Address Path-Related Issues</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
The user mentioned that the files are "there," but the runtime doesn't "want to look in the folders." This is a key insight. Modern .NET doesn't automatically add subdirectories to the native library search path.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
* Explicitly Set the Search Path: You can programmatically set the search path for native libraries using the NativeLibrary.SetDllImportResolver method in .NET 5+ or by adding the native libraries' folder to the PATH environment variable of the process before
loading them.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
* Post-Build Events: A robust solution for a project is to use a post-build event in your .csproj file to automatically copy all necessary native DLLs and their dependencies into the build output directory (e.g., bin\Debug). This ensures that the DLLs are
always in the correct location for the application to run.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Summary of the Recommended Solution Path</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
* Stop using Process Monitor to look for the file directly. Instead, use a tool that inspects the dependencies of that file. The "Dependencies" tool is the best choice here.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
* Run "Dependencies" on the main MapGuide DLL that your .NET code is trying to load.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
* Identify the exact native DLL(s) that are reported as missing.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
* Find the missing DLLs (often in the main MapGuide installation or in a separate dependency folder) and copy them into your application's output directory.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
* Confirm the "bitness" (x86 vs. x64) of your application and all native DLLs is consistent.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
* Ensure the correct Visual C++ Redistributable is installed.</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
* If the problem persists, consider a programmatic approach to set the native DLL search path or use post-build events to ensure all dependencies are copied to the correct location.</div>
<div id="x_ms-outlook-mobile-body-separator-line" dir="auto"><br>
</div>
<div id="x_ms-outlook-mobile-signature" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt">
</div>
<div dir="auto" id="x_mail-editor-reference-message-container"><br>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt">
Régards </div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt">
<br>
</div>
<div dir="auto" style="font-family:Aptos,Aptos_MSFontService,-apple-system,Roboto,Arial,Helvetica,sans-serif; font-size:12pt">
Pierre</div>
<hr style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="auto" style="font-size:11pt"><b>De :</b> mapguide-users <mapguide-users-bounces@lists.osgeo.org> de la part de Jackie Ng via mapguide-users <mapguide-users@lists.osgeo.org><br>
<b>Envoyé :</b> mercredi, août 13, 2025 7:57:13 a.m.<br>
<b>À :</b> MapGuide Users Mail List <mapguide-users@lists.osgeo.org><br>
<b>Cc :</b> Jackie Ng <jumpinjackie@gmail.com><br>
<b>Objet :</b> [mapguide-users] What is left before MGOS 4.0 RC1<br>
</div>
<br>
<div dir="auto">Hi All,</div>
<div dir="auto"><br>
</div>
<div dir="auto">Just to provide some transparency on what is left before RC1 releases.</div>
<div dir="auto"><br>
</div>
<div dir="auto">I am currently working on getting MapGuide Portable (formerly known as mg-desktop) bindings working under our new way of generating language bindings. I am having some difficulty getting the new package to work due to cryptic missing dll errors
that are cryptic because:<br>
<br>
a) I have no idea how to even debug a DllNotFoundException in this new .net world. In the past when everything was still legacy .net Framework 4.x we could run fuslogvw.exe and turn on assembly binding errors and that would tell us straight away what the missing
dlls are. In this new .net world, fuslogvw.exe doesn't seem to work anymore and I don't know what the new "modern .net" way to diagnose assembly binding failures is. Thanks to Microsoft's excellent track record in naming their products and technologies, any
attempts to search for this topic naturally returns decade-old articles and blog posts that are no longer relevant to modern .net!</div>
<div dir="auto"><br>
b) The dll files .net is complaining about not being able to find *are there*, some part of the .net runtime just doesn't want to look in the folders I've placed these dll files in (as evidenced by monitoring the consuming application under Process Monitor)<br>
<br>
This is not a crucial component of MapGuide (merely a supplemental part), so I am giving myself the rest of the week to try to solve this problem. If I can't come up with a solution, I'll park this sub-project until after the 4.0 release.<br>
<br>
I am also working on finishing up the new API documentation experience where instead of our current approach of documenting a C++ API and sprinkling .net/Java/PHP sample fragments in various class/method comments in the hopes you'll understand how to use such
a C++ class or method in a .net/Java/PHP context, we try to provide the MapGuide API docs for every target language in that language's natively preferred API documentation tool of choice.<br>
<br>
- For .net, this is docfx (<a href="https://dotnet.github.io/docfx/">https://dotnet.github.io/docfx/</a>)<br>
- For Java, this is the built-in javadoc<br>
- For PHP, unfortunately we'll have to put a landing page that tells you how to re-interpret the .net or Java API docs in a PHP context. PHP unfortunately does not support overloaded methods and our PHP binding just smushes all of these overloads into a single
method whose parameters vary based on the overload set of parameters you're trying to use. This makes it really hard to translate C++ API documentation across, unlike .net or Java where everything translates 1:1. Until we can find a solution to this problem,
our C++ API docs are not translatable for PHP API documentation generation.<br>
<br>
I'll also be doing yet another sweep of our web tier components and will be bundling updated versions of Apache, PHP and Tomcat where required.<br>
<br>
On the FDO front, the PostgreSQL materialized view fix is in. Nothing else of a show-stopping nature seems to be blocking us there, so that's all ready to go. I will formally open a FDO 4.2 svn branch before or after this RC1 release (haven't decided yet)</div>
<div dir="auto"><br>
</div>
<div dir="auto">- Jackie</div>
<div dir="auto"><br>
</div>
<div dir="auto">--</div>
<div dir="auto" class="x_gmail_signature"><a href="http://themapguyde.blogspot.com">http://themapguyde.blogspot.com</a></div>
<br>
</div>
</div>
<p>Tel: <a href="tel:+441413742741">+44 141 374 2741</a> <br>
Web: <a href="https://trueviewvisuals.com/">TrueViewVisuals.com</a> and <a href="https://www.roadsonline.co.uk/">
RoadsOnline.co.uk</a></p>
<img src="https://trueviewvisuals.com/wp-content/uploads/2025/06/email_footer_both_logos_vsmall.jpg" alt="TVV and LCRIG - RoadsOnline">
<br>
<span style="font-size:8.0pt">This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by
e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain
viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.</span>
</body>
</html>