I finally made it. After editing a couple of swig templates I managed to compile the mapscript_csharp and use it from dotnet core 2.2
<http://osgeo-org.1560.x6.nabble.com/file/t384371/Screenshot_at_2019-01-13_20-38-25.png> Here is the commit with a bunch of changes: https://github.com/3x0dv5/mapserver/commit/61164981367899632006918b757c6a553cad1f02 Now the thing is that probably most of what I did was probably not needed, but maybe it is actually useful for the project. So if someone could take a quick look and see what could be used. My process to compile: 1. git clone of master 2. mkdir build 3. cd build 4. cmake -DCMAKE_INSTALL_PREFIX=/opt \ -DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/share/postgresql/10:/usr/local:/opt \ -DWITH_CLIENT_WFS=ON \ -DWITH_CLIENT_WMS=ON \ -DWITH_CURL=ON \ -DWITH_SOS=ON \ -DWITH_PHP=OFF \ -DWITH_PERL=OFF \ -DWITH_RUBY=OFF \ -DWITH_JAVA=OFF \ -DWITH_CSHARP=ON \ -DWITH_PYTHON=OFF \ -DWITH_SVGCAIRO=OFF \ -DWITH_ORACLESPATIAL=OFF \ -DWITH_MSSQL2008=OFF \ ../ >../configure.out.txt 5. at this point there is still one small issue with the code generated by SWIG: the file: build/mapscript/csharp/mapscriptPINVOKE.cs has the following duplicated, I needed to delete one static mapscriptPINVOKE() { } 6. make all 7. open Jetbrains Rider and create a sample console project and add reference to the mapscript_csharp.dll also add the PATH where mapscript.so is or copy it to the /bin/Debug/netcoreapp2.2/ My sample output: proj1$ dotnet run MapServer version MapServer version 7.3-dev OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Running on .NETCoreApp,Version=v2.2 Linux kernel: Unix 4.20.0.42000 -- Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html _______________________________________________ mapserver-users mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/mapserver-users
