Darn DLL files again

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Darn DLL files again

Hans Milling
Hi All

I just installed MGOS2.2 on a 2003 server an copied my web application to it. When I start my application (using the MaestroAPI 4, local native connection with the signed 2.2 dll files). I get an error message:

System.IO.FileNotFoundException: Could not load file or assembly 'MapGuideDotNetApi, Version=2.0.0.2308, Culture=neutral, PublicKeyToken=f526c48929fda856' or one of its dependencies. The system cannot find the file specified. File name: 'MapGuideDotNetApi, Version=2.0.0.2308, Culture=neutral, PublicKeyToken=f526c48929fda856' at

I did not reference the MapGuideDotnetAPI.dll file, but the other individual files. I thought that it was not needed any more?

Anyway I copy the signed dll (Original from MGOS2.2 mapviewernet\bin folder) to the bin folder of the web application.
I then get:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: Could not load file or assembly 'MapGuideDotNetApi, Version=2.0.0.2308, Culture=neutral, PublicKeyToken=f526c48929fda856' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'MapGuideDotNetApi, Version=2.0.0.2308, Culture=neutral, PublicKeyToken=f526c48929fda856' at OSGeo.MapGuide.MaestroAPI.Native.LocalNativeConnection.InitConnection(String sessionid) at...

My application is referencing the 1.0.0.1 version of the DLL files (except the MapGuideDotnetApi.dll that is not referenced at all). Also the 2.0.0.2308 version referenced by the MaestroAPI is from MGOS2.0 i believe?).
Ok, so next I add this to my webconfig, to make sure that any version of the DLL is treated as my 1.0.0.1 version:

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="MapGuideDotNetApi" publicKeyToken="f526c48929fda856" />
                                <bindingRedirect oldVersion="1.0.0.0-10.10.10.10" newVersion="1.0.0.1" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

I then get the following error:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> OSGeo.MapGuide.MgConfigurationException: Failed to retrieve message for "MgConfigurationException". - MgSiteConnection.Open line 103 file c:\builds\mg22win32\mgdev\common\mapguidecommon\Services/SiteConnection.cpp

Looks like some reference/DLL mismatch
This is where I am stuck? What am I doing wrong?

Best regards
  Hans Milling...
Reply | Threaded
Open this post in threaded view
|

RE: Darn DLL files again

djonio
Hans,
Good luck to you! I tried to get it all to work and just gave up. Way
too complicated for me. At least I will monitor your progress.
r,
dennis

_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Darn DLL files again

Jackie Ng
In reply to this post by Hans Milling
If you are using a custom-built LocalNative provider then the only reason I can think of as to why "MapGuideDotNetApi.dll" is still be referenced is if a previous application using this assembly had run and you haven't either restarted the server/IIS or recycled the application pool where the application runs under.

If you are referencing the 5 OSGeo assemblies then *nothing* should be referencing MapGuideDotNetApi.dll

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Darn DLL files again

Hans Milling
Hi Jackie

I checked out the Maestro 4 branch to build the r6494 version with your latest changes. Does this version reference the MapGuideDotnetApi.dll file?
I have now tried to download the 'official' Dll files:
http://download.osgeo.org/mapguide/maestro/MaestroSDK_4.0.0.zip (it actually includes the MapGuideDotNetApi.dll 2.0.3808 600kb dll)

Still the same error messages, except if I include the old 600 kb MapGuideDotnetApi.dll from the SDK. Then I get an error that MapGuideunmanagedApi.dll is missing. This file is only included in MapGuide 2009 and MGOS2.0, not in the later releases.

What to do? Remove the reference from the MaestroAPI source checked out this morning and rebuild?

Hans...
Reply | Threaded
Open this post in threaded view
|

RE: Darn DLL files again

Hans Milling
In reply to this post by djonio
Hi Dennis

If you have problems with DLL files, please create a new thread and we will help you. I myself had so many problems with these DLL files before and now again, and I got a lot of help.
Good thing is that Jackie is working on a better(or more easy) solution with the next release of the MaestroAPI as far as I know.

Hans...
Reply | Threaded
Open this post in threaded view
|

Re: Darn DLL files again

Jackie Ng
In reply to this post by Hans Milling
The source and SDK does indeed reference the MapGuideDotNetApi.dll (2.0) file.

You should remove this reference from the source project and rebuild it referencing the 5 OSGeo assemblies instead.

- Jackie
Reply | Threaded
Open this post in threaded view
|

I can't migrate my .Net app: help!

Znarf1965
In reply to this post by Jackie Ng
Hi List,

I'm just started to try migrate my .Net 4 Mapguide app to version 2.2.
I've found that the old MapGuidedotNetApi does not contain namespace
OSGeo.Magude, so I can't use it anymore. I've tried to replace this
reference with references to OsGeo.Mapguide.*.dll.
Now I can compile, but when I try to run I get:

Unable to load DLL 'WebUnmanagedApi'

Can anybody tell me where I can find a guide on how to build a .Net app with
the new Mapguide release? Or any sample Visual Studio project? Are there any
doc on issues related to migrating?

Best regards

Francesco

_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

R: [mapguide-users] I can't migrate my .Net app: help!

Znarf1965
I've found that <mapguide>\Web\www\mapviewernet\bin has not been set in the
path, so I've added and now it works properly. May be this is a bug on MG
2.2.

But my question is still about api documentation related to .net, how to
setup a Visual Studio project, which references to add, migration issues,
ecc...
Can anybody suggest me something to read?...
 
-----Messaggio originale-----
Da: [hidden email]
[mailto:[hidden email]] Per conto di Francesco Sozzi
Inviato: venerdì, 10. febbraio 2012 17:52
A: 'MapGuide Users Mail List'
Oggetto: [mapguide-users] I can't migrate my .Net app: help!

Hi List,

I'm just started to try migrate my .Net 4 Mapguide app to version 2.2.
I've found that the old MapGuidedotNetApi does not contain namespace
OSGeo.Magude, so I can't use it anymore. I've tried to replace this
reference with references to OsGeo.Mapguide.*.dll.
Now I can compile, but when I try to run I get:

Unable to load DLL 'WebUnmanagedApi'

Can anybody tell me where I can find a guide on how to build a .Net app with
the new Mapguide release? Or any sample Visual Studio project? Are there any
doc on issues related to migrating?

Best regards

Francesco

_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Darn DLL files again

Hans Milling
In reply to this post by Jackie Ng
Thanks jackie

I've removed the Reference from the project and rebuild it.
That solved the error messages when opening a localnative connection. I have another error now, but I don't think it's the MaestroAPI this time :)

Hans...