<div dir="ltr">Hi,<div><br></div><div>The sample applications should be compiled to net5.0 or above:</div><div><br></div><div>"-DCSHARP_LIBRARY_VERSION=netstandard2.0" "-DCSHARP_APPLICATION_VERSION=net5.0"</div><div><br></div><div>Best regards,</div><div><br></div><div>Tamas</div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Parveen Sharma <<a href="mailto:sharma1981@outlook.com">sharma1981@outlook.com</a>> ezt írta (időpont: 2025. márc. 6., Cs, 12:27):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-6148125736008479561">




<div dir="ltr">
<div style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin:0px;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:Calibri,Helvetica,sans-serif">Hello tamas<br>
<br>
I am trying to build with these options<br>
<br>
</span><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif"><arg value="-DBUILD_CSHARP_BINDINGS=ON"/><!-- C# Bindings--></span></div>
<div style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<arg value="-DCSHARP_LIBRARY_VERSION=netstandard2.0"/></div>
<div style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<arg value="-DCSHARP_APPLICATION_VERSION=netstandard2.0"/> </div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
<br>
However, I am getting errors wrt to finding the executables like OGRInfo.exe etc among others<br>
<br>
</div>
<table style="box-sizing:border-box;border-collapse:collapse;border-spacing:0px">
<tbody>
<tr>
<td style="width:974.532px;height:22px;border-width:1px;border-style:solid;border-color:rgb(171,171,171);vertical-align:top;box-sizing:border-box">
<div style="text-align:left;text-indent:0px;margin:0px;font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
[INFO]      [exec]   -- Installing: C:/workarea/Source/gdal/build_Debug/install/share/csharp/OgrInfo/OgrInfo.deps.json</div>
<div style="text-align:left;text-indent:0px;margin:0px;font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
[INFO]      [exec]   CMake Error at swig/csharp/cmake_install.cmake:152 (file):</div>
<div style="text-align:left;text-indent:0px;margin:0px;font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="background-color:rgb(255,255,0)">[INFO]      [exec]     file INSTALL cannot find</span></div>
<div style="text-align:left;text-indent:0px;margin:0px;font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="background-color:rgb(255,255,0)">[INFO]      [exec]     "C:/workarea/Source/gdal/build_Debug/swig/csharp/OgrInfo/OgrInfo.exe</span>":</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
</td>
</tr>
</tbody>
</table>
<div><br>
<br>
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
My question : If I set CMAKE OPTIONS as shown to "netstandard2.0" then do i expect to see the EXEs getting generated as I understand that .NET STANDARD is just specification and not any runtime. Will these make any difference?<br>
<br>
Best regards,</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div id="m_-6148125736008479561appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="m_-6148125736008479561divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Tamas Szekeres <<a href="mailto:szekerest@gmail.com" target="_blank">szekerest@gmail.com</a>><br>
<b>Sent:</b> Thursday, March 6, 2025 5:12 PM<br>
<b>To:</b> Parveen Sharma <<a href="mailto:sharma1981@outlook.com" target="_blank">sharma1981@outlook.com</a>><br>
<b>Cc:</b> Michał Kowalczuk via gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>><br>
<b>Subject:</b> Re: [gdal-dev] Can we build CSharp Bindings in GDAL v3.9.3 or later with DOT NET FRAMEWORK 4.8?</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi,
<div><br>
</div>
<div>You can let cmake to build the csharp libs for netstandard2.0  ("-DCSHARP_LIBRARY_VERSION=netstandard2.0") which makes it compatible with both the netframework and netcore versions.</div>
<div><br>
</div>
<div>Best regards,</div>
<div><br>
</div>
<div>Tamas</div>
<div><br>
</div>
</div>
<br>
<div>
<div dir="ltr">Parveen Sharma via gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>> ezt írta (időpont: 2025. febr. 19., Sze, 9:59):<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hello<br>
<br>
</div>
<div style="direction:ltr;font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I am trying to build GDAL CSharp bindings from <a href="https://github.com/OSGeo/gdal/tree/v3.9.3/swig/csharp" id="m_-6148125736008479561x_m_-1817498141166190219LPlnk593606" title="https://github.com/OSGeo/gdal/tree/v3.9.3/swig/csharp" target="_blank">
v3.9.3 branch</a>.<br>
<br>
</div>
<div style="direction:ltr;font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
The <a href="https://gdal.org/en/stable/api/csharp/csharp_compile_cmake.html#net-build-toolchain" id="m_-6148125736008479561x_m_-1817498141166190219LPlnk" title="https://gdal.org/en/stable/api/csharp/csharp_compile_cmake.html#net-build-toolchain" target="_blank">
documentation for v3.9.3</a> states that it needs .NET 5.0 OR Mono</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
<img id="m_-6148125736008479561x_m_-1817498141166190219image_0" size="40496" style="max-width: 1267px;" src="cid:ii_1956ccfd127cb971f161"></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<b>Question : </b><u>Is it possible to build GDAL source v3.9.3 using DOT NET Framework 4.8 or less?
</u>I am using below flags BUT it seems the build process is attempting to look for only .NET SDK and not the DOT NET FRAMEWORK<br>
<br>
</div>
<table style="box-sizing:border-box;border-collapse:collapse;border-spacing:0px">
<tbody>
<tr>
<td style="width:802.141px;height:22px;border-width:1px;border-style:solid;border-color:rgb(171,171,171);background-color:rgb(204,228,246);vertical-align:top;color:rgb(0,0,0);box-sizing:border-box">
<div style="text-align:left;text-indent:0px;margin:0px;font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
      <arg value="-DBUILD_CSHARP_BINDINGS=ON"/><!-- C# Bindings--></div>
<div style="text-align:left;text-indent:0px;margin:0px;font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
      <arg value="-DCSHARP_LIBRARY_VERSION=4.8"/></div>
<div style="text-align:left;text-indent:0px;margin:0px;font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
      <arg value="-DCSHARP_APPLICATION_VERSION=4.8"/></div>
</td>
</tr>
</tbody>
</table>
<br>
<br>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<b><u>Does GDAL still support building CSharp Bindings with .net framework?</u></b></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Please let me know.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Best regards,</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Parveen</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
</div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div>
</blockquote>
</div>
</div>
</div>

</div></blockquote></div>