<div dir="ltr"><br><br><div class="gmail_quote">2008/10/8 Mateusz Ģoskot <span dir="ltr"><<a href="mailto:mateusz@loskot.net">mateusz@loskot.net</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Martin,<br>
<br>
I can't find any instructions on the Wiki or README file in the source tree about how to build .NET bindings.</blockquote><div>Yes you are right. I need ad support for build the bindings. <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Could you please give me the list of steps needed to build .NET<br>
bindings using Visual Studio 2005/2008 ?</blockquote><div>sure. This bindings are build acording most engineering apps in .NET.<br><br>In .NET people can create solutions. Solutions can manage several projects inside (itīs the same that netbeans for c++). In the trunk i add a solution and several folders. In that folder i add projects. If you open the solution you can see all projects on your right hand (like in visual c++). One project is the liblasdotnet bindings. Other project is the hello world (I will add more project with samples). Other project is the NUNIT test.<br>
<br>In a solution you need set some projects like the main project. In my case i have the hello world app like the main app (perhaps dont work for you because i read a las file in my computer.).<br><br>.NET project have references. Hello world app have liblasdotnet like reference. NUNIT test have NUnit and libladotnet like references. If you make changes in the liblasdotnet project and you compile the visual studio magically copy the update DLL to all projects.<br>
<br>Here MSBuild help i a lot i think.<br><a href="http://www.monodevelop.com/Release_notes_for_MonoDevelop_2.0_Alpha_1#MSBuild_File_format">http://www.monodevelop.com/Release_notes_for_MonoDevelop_2.0_Alpha_1#MSBuild_File_format</a><br>
MSBuild is like NMAKE but for .NET.<br>Now MSBuild is the default build system for visual studio and monodevelop.<br><br><br>Visual studio for .NET by default create a debug and release folder for every project. If you run the app you compile in the debug folder. <br>
If you want build a release version you need build the solution in the build button.<br><br>....<br><br>Now the problems come.<br><br>Usually in .NET references are add magically to the projects. but native libraries not. This is not a common problem because<br>
if you call to the winapi for example you know that libraries in the system, but liblas.dll not.<br>Therefore i think osgeo need choose a path in windows for all DLLs.<br>With nsis would be really easy add this. GTK people choose the c:\path\bin.<br>
If you install some of the releases of GTK for windows you can see it:<br><a href="http://gladewin32.sourceforge.net/">http://gladewin32.sourceforge.net/</a><br>GTK installer use NSIS like emule, ruby, etc...<br><br>___<br>
<br>In my case by now i copy the liblas.DLL to all folders by hand. Perhaps we have some option in visual studio for that, but i donīt find it by now.<br><br><br>The unit test need be used for NUNIT tools:<br><a href="http://www.nunit.org/index.php?p=nunit-console&r=2.4.7">http://www.nunit.org/index.php?p=nunit-console&r=2.4.7</a><br>
<a href="http://www.nunit.org/index.php?p=nunit-gui&r=2.4.7">http://www.nunit.org/index.php?p=nunit-gui&r=2.4.7</a><br>NUNIT have a nice installer for windows.<br><br><br>Now the GAC.<br><br>In my job i use several references installed in the GAC. every widget in the windows forms for example is a dll installed in the gac.<br>
If you go to the add reference window you have a .NET, COM and local option. In the .NET tab you can find the .NET dll installed in the GAC. Esri for example install all .NET stuff there. In the COM tab you have the COM references used in vb6,... In local you can find a .NET DLL from the disk. By now this is the method i have.<br>
<br>If you go to the references properties added in a project you can see you can tell visual studio make a copy to the system. By default<br>basic .NET components not be copied to the system. All people have have .NET have windows forms in the GAC..., but in bentley, esri, autodesk references you need copied to the projects, because yoour clientes donīt have that .NET dlls or not what you want.<br>
For example:<br>If you need create a Autocad .NET app you need do this:<br>Create a project for autocad 2004,2005 and 2006 need you add the 2006 component.<br>Create a project for autocad 2007 and 2008 need you add the 2008 component.<br>
In the last case for example if a user only have autocad 2007 in the computer only have the 2007 component...<br><br>To add assemblies to the GAC you have the console gacutils. <br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
To summarize, I have Windows XP + Visual Studio 2005 Pro (both VC++ and VC# compilers installed). What should I do to build the .NET bindings?</blockquote><div>The solution is for the Visual Studio 2005 xpress and therefore i hope works for you.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
Could you help me?</blockquote><div><br>I hope had help you a little. My spanglish really sucks.<br><br>Regards. <br></div><br></div><br></div>