CFanatic

Go Back   CFanatic > Programming > C# Programming

Join CFanatic Forum Now

Command Line Compile + Subdirectory DLL Not Working? topic posted under C# Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 10-18-2008, 02:44 PM
Junior Member
 
Join Date: Oct 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
will is on a distinguished road
| More
Command Line Compile + Subdirectory DLL Not Working?

Ok , heres the thing. I have a project im workin on, and i have my exe , in a directory, with a subdirectory named DLL and inside that my dll.

I was sure that


csc /t:winexe /libLL /r:uiobj.dll msf_exe.cs

also have tried

csc /t:winexe /lib:.\DLL /r:uiobj.dll msf_exe.cs


is the compiler command i would use to create my exe, set up a DLL subdirectory and reference the dll inside it...

But alas when i run the exe and JiT Debugger error somes up saying System.IO.FileNotFound exception.... even though the command compiler does not have any error compiling the code.

It doesnt matter what i do , if i dont have my dll inside the folder with the exe it wont work. I can even add my dll to the GAC with gacutil.exe and that works fine. I just cant access my private dll's inside my subdirectory. Could it be that my environment vars are set wrong , or something else. i was sure that /:lib set a directory reference , but its just not working for me /cry

Any help or ideas would be great, thanks you in advance!

PS : i dunno what i need to do to stop that stupid green smile face , its supposed to be a d.

Last edited by will; 10-18-2008 at 02:50 PM.
Reply With Quote
  #2  
Old 10-18-2008, 09:41 PM
Junior Member
 
Join Date: Oct 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
will is on a distinguished road
| More
Re: Command Line Compile + Subdirectory DLL Not Working?

Damn , im went two days fighting with this, and i have the answer to my question. I have never come across the need to use a Config file before , but it is the solution to all problems. If you are like me and want your project to maintain some form of organization, you will probably not want oodles of dll's inside your main app directory. This is easily achieved with a config file. You can create your application config file with notepad. EG:

Assuming that you wish to use a directory structure siliar to this :

Application Folder --> app.exe
Application Folder --> app.exe.config
Application Folder -->Folder DLL
Folder DLL --> your_dll1.dll
Folder DLL --> your_dll2.dll
Folder DLL --> your_dll3.dll


Open up notepad and and add this ....

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="DLL"/>
</assemblyBinding>
</runtime>
</configuration>


Now save it as UTF-8 and name it as seen here ...
<application-name.exe.config where <application-name> is the name of your application.

Until next time , bye.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
a function that takes 3 command-line arguments new4c C Programming 3 12-29-2008 01:14 AM
Simple class not working psppb C++ Programming 3 01-08-2008 10:24 PM
working of memset() function sureshN C Programming 3 05-28-2007 04:42 AM
how to store the command line arguments which are passed in previous execution vidhya Win32 Programming 2 05-24-2007 01:28 AM
csproj command line build .NET1.1 codeunlock C# Programming 0 04-29-2007 12:46 AM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 04:25 AM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board