473,412 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Command Line Complier + 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 /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!
Oct 18 '08 #1
2 1226
SvenV
50
Try to specify the complete path in the lib switch, f.e.
csc /t:winexe /lib:C:\MyApp\DLL /r:uiobj.dll msf_exe.cs
Oct 18 '08 #2
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
--> app.exe.config
-->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.

Thanks for help.
Until next time , bye.
Oct 19 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: MLH | last post by:
I am having failures processing the following command and I wonder if you can tell me what I must do in order to have success. When I try to run source mysql_dump.sql.txt ==> it is a problem...
4
by: tomek | last post by:
hi i'm desperate... i'm trying this for 2 days now... so if anyone can help - please. i have upload form in which users can choose TYPE of file they are uploading (graphic/text/music) - and...
2
by: johnxhc | last post by:
I am trying to use sos extension but almost half of the sos command do not work, for example 0:027!findtable No export findtable found 0:027!bpmd No export bpmd found 0:027!GCHandleLeaks...
7
by: Greg | last post by:
Visual Studio - Line numbers missing from error list I'm writing an app in ASP.NET using VS 2005. There are no line numbers with the build errors reported. Any suggestions? I can't find any...
0
pbmods
by: pbmods | last post by:
FIXING NETINFO ERRORS ON THE COMMAND LINE LEVEL: ADVANCED PREREQS: TERMINAL / COMMAND LINE, USERS AND GROUPS Intro Today, while performing routine maintenance, I noticed that I was no...
6
by: News | last post by:
Hi folks I've got a really easy question yet I can't seem to get an answer from any book. I am playing around with ARGV and ARGC and I think I understand the use of these parameters pretty well but...
51
by: Ojas | last post by:
Hi!, I just out of curiosity want to know how top detect the client side application under which the script is getting run. I mean to ask the how to know whether the script is running under...
2
by: =?Utf-8?B?UmFtb24gR2VuZQ==?= | last post by:
Hello: I am building a console application and I am having an issue with the command line arguments. A couple of my arguments are paths and they are usually enclosed in double quotes. If one of...
7
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.