Hi,

 

i have a 4 Projects, 3 of them compiling to a Dll one to a Windows-Form-exe.

 

I would like to place the Dlls in a subdirectory called \lib to the exe File. Compilation runs without errors, but when I start my application it crashes because the exe – file can’t find the one Dll in the lib-Dir it needs. It always searches for the appropriate File in the same Path as the exe.

 

This is my build-file:

 

<project name="ExpGUI" default="rel">

            <property name="basename" value="ExpGUI"/>

            <property name="debug" value="false"/>

 

            <target name="clean">

                        <delete>

                                   <fileset>

                                               <include name="bin\Debug\${basename}.exe"/>

                                               <include name="bin\Debug\${basename}.pdb"/>

                                               <include name="bin\Debug\Common.dll"/>

                                               <include name="bin\Debug\Common.pdb"/>                  

                                               <include name="..\..\current\${basename}.exe"/>

                                   </fileset>

                        </delete>

            </target>

 

            <target name="rel">

                        <csc target="winexe" output="..\..\current\${basename}.exe" debug="false">      

                                   <sources>

                                               <include name="*.cs"/>

                                               <exclude name="Form4.cs"/>

                                   </sources>

                                   <resources>

                                               <include name="*.resx"/>

                                   </resources>

                        </csc>

                       

                        <copy file="..\..\current\lib\gdpduExpCommon.dll" tofile="..\..\current\gdpduExpCommon.dll"/>

                        <copy file="..\..\current\lib\SAP.Connector.dll" tofile="..\..\current\SAP.Connector.dll"/>

 

            </target>

 

This is how it works – but I don’t like to copy the files to the BaseDir of the exe-File like I do at the end.

 

I already tried with references and lib tags but don’t get it to work – any help?

 

Thanks – and sorry – I just started with Nant today – because VS-Compilation sucks.

 

By the way – I already tried an tlbimp-task – but Nant can’t execute it.

 

Thanks

 

Martin

Reply via email to