473,395 Members | 2,436 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,395 software developers and data experts.

Running c# dll's from command line

Al
Is it possible to call c# dll's from the command line?

I am used to the Java world where classes are packaged in jar files
which can either be accessed from an application or run directly with
java.exe if there are one or more classes with main methods in them. So
i guess i am asking for an equivalent to java.exe in C#. Is there some
prebuilt app in the .NET environment that looks for a Main method in a
certain class in a dll that I can use to execute it?

I know the easiest way to get around this would be to just create a
console app that invokes the dll, but I need to know if it is possible
to run the dll directly from command line.

Oct 5 '06 #1
5 3408
Hello!
Is there some
prebuilt app in the .NET environment that looks for a Main method in a
certain class in a dll that I can use to execute it?
As far as I'm aware, there isn't such an utility available in the .NET SDK.
This means you would need to write one yourself.

If you use Reflection, you can write yourself a generic "starter"
application for example for testing purposes.

Hope this helps.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/
Oct 5 '06 #2
Al
Hope this helps.
Well, at least it confirms what I thought. Cheers.

Anyone else want to have a go at this?

Oct 5 '06 #3
What do you want to call from a DLL? A static method?

--
Best regards | Schöne Grüße
Michael

Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz/
http://www.ajaxpro.info/

"Al" <al********@gmail.comschrieb im Newsbeitrag
news:11**********************@i3g2000cwc.googlegro ups.com...
>
>Hope this helps.

Well, at least it confirms what I thought. Cheers.

Anyone else want to have a go at this?

Oct 5 '06 #4
Al
What do you want to call from a DLL? A static method?
In my case it is not a static method but i guess if I could call a
static method i could get hold of an instance as well with a
getInstance() or createInstance() method. Do you know how to call
static methods?

Oct 6 '06 #5
Hi,
"Al" <al********@gmail.comschrieb im Newsbeitrag
news:11*********************@h48g2000cwc.googlegro ups.com...
>
>What do you want to call from a DLL? A static method?

In my case it is not a static method but i guess if I could call a
static method i could get hold of an instance as well with a
getInstance() or createInstance() method. Do you know how to call
static methods?
yes, of course! One library I build (http://www.ajaxpro.info) is doing this.
Do you need any arguments?

Regards,
Michael


Oct 6 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Doug Partridge | last post by:
Hi, I was wondering if it's possible to run an .exe or other command line utility form an .asp page? What I am trying to do is have a report request page where the user would supply a few...
0
by: Byron | last post by:
I have an application that uses third-party DLL to do network communications and also does database operations independent of the DLL. Since there are licensing costs associated with the use of...
19
by: Randy | last post by:
Hi, I need to create a simple dll which will be used by MS Access and .ASP apps. What type of dll would be best and can anybody point me to a complete example which I can compile and run with...
11
by: Wolfgang Kaml | last post by:
I am not sure if this is more of an expert question, but I am sure that they are out there. I'd like to setup a general application or bin directory on my Win2003.Net Server that will hold some...
3
by: Rob | last post by:
No way this should be that difficult... I have a program that does a file watch on a folder. When a file is created in this folder, I simply want to zip it up using WinZip (with the command...
3
by: Shawnk | last post by:
I use two classes to manage the Main() command line (and alot of other stuff) for my prototyping environment. I tryed putting the MainClass in a DLL and just having the other class (which gets...
12
by: Karina | last post by:
Hello: I am taking over someone else's code and my users are experiencing tons of problems but when I try to go into the source code to edit and try to fix these problems, I realize that all the...
3
by: Morten Snedker | last post by:
On the load part of 6 differint aspx pages I wish to run the same code. Instead of having the same code on 6 pages it would be kind of nice to have it in one place and include/call it. How...
4
by: talkingpidgin | last post by:
I am trying to compile my first windows program using microsoft visuall c++ express. It is a command line program that must run completely isolated without any setup. It's not a large or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.