|
If I have several versions of the same DLL in the GAC which I always encounter.
When my application run, which version is selected to run if I did not specify which version of the dll to be used in the .net application.
Thanks.
|
|
|
|
|
When you specify a DLL in a project (web or windows) the version is also specified in there. I.E.:
<compilation>
<assemblies>
<add assembly="System.Data, Version=1.0.2411.0,
Culture=neutral,
PublicKeyToken=b77a5c561934e089"/>
</assemblies>
</compilation>
This is the version selected by your app.
"Whether you think you can, or you think you can't--either way, you are right." — Henry Ford
"When I waste my time, I only use the best, Code Project...don't leave home without it." — Slacker007
|
|
|
|
|
I don't think that answers the question. The question states, "if I did not specify which version"; what you show appears to specify the version.
I also notice that when I look at the properties of a reference (in VS) I can set Specific Version to true or false, I've always seen it as false, so which version will be used at run time?
Plus, as for me, I generally compile at the command line and don't use VS and its project files; so which version is used then?
|
|
|
|
|
I think it's the highest version which is compatible with the version of the .Net Framework you're compiling against.
|
|
|
|
|
You can of course actually get the version at run time. So you can run your app and then print it.
|
|
|
|
|
Hi,
I would like to know how to develop a QMS software (Queue management system) similar to the one used in banks and other companies.
It's basically a database application which I have no problem with it..
Also, I don't think there will be a problem displaying the queue on the screen as I am going to use VGA extender and display what every is showing on a Multimedia PC).
But my only concern is how to announce the number? so if the next is number 322 which supposed to go to room 5 it should be announ ced saying Ticket 322 Room no# 5
can anyone quide please..
Thanks in advance..
|
|
|
|
|
Well, the easiest way is to have each number as a sound file and just play the relevant sound files.
|
|
|
|
|
To add to Pete reply, you could use the Speech Synthesis built into .NET:
SpeechSynthesizer speak = new SpeechSynthesizer();
speak.SpeakAsync("Number 322 please go to room 5");
You will need a reference to "System.Speech" and a using System.Speech.Synthesis statement.
It isn't perfect, but it is understandable!
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
I have a script in python.
I would like to call it from a winform in C#, is it possible? and how?
Thanks
|
|
|
|
|
If it works for you from a "command prompt", then Process.Start() can handle it.
|
|
|
|
|
Thanks.
and if I want to call a single function from the script, is there a way?
|
|
|
|
|
If you know how to do it from a "command prompt", then Process.Start() can handle it.
|
|
|
|
|
no I don't know, can you explain please
|
|
|
|
|
I can not.
|
|
|
|
|
I think you can. Because from Csharp we can call another dll's functions by importing them with DllImport. However your python script should be a dll that registered to the system once
|
|
|
|
|
do you know how can I turn the python script into a dll.
Or should I forward the question to the phyton forum?
|
|
|
|
|
I don't know how to do that but, if you know what that pyhon script do, you can write it yourself in csharp as a dll file.
|
|
|
|
|
Yes it is. You need to install Iron Python[^. Then you gain access to your Python functions directly from .NET.
|
|
|
|
|
You can use IronPython[^] in a C# application. A simple implementation of loading a python file using IronPython looks something like this:-
Console.WriteLine("Loading discountprice.py");
ScriptRuntime py = Python.CreateRuntime();
dynamic random = py.UseFile(@"D:\Documents\Python Scripts\discountprice.py");
Console.WriteLine("discountprice.py loaded.");
that snippet loads a basic python file called discountprice.py in my python scripts folder. To implement this you need to download IronPython and reference Microsoft.Scripting.Hosting and also IronPython.Hosting .
Hope this helps
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
Thanks it helps. (tried it with a simple script)
my question now is:
I have a python script that import module IntelHex.
when executing the script itself it works properly.
when calling it frm my C# application, I got an exception "No module named intelHex"
Do you have a clue how can I solve this?
Thanks,
|
|
|
|
|
Hi All,
Is there a dll that deal with Intel-Hex ( http://en.wikipedia.org/wiki/Intel_HEX[^] ) file format?
I have 2 hex file (in intel-hex format) and I need to compare them.
the output must be the addresses where data differs.
Do you know if such a thing already exists?
Thanks
|
|
|
|
|
Not that I know of.
From your description, why would you process the file wide respect to byte order? If you're giving an offset into the file where there is a difference the byte order of the data in the file wouldn't make any difference at all.
|
|
|
|
|
Thanks.
I don't really undestand your answer.
I don't have the offset, I need to find it.
more than that, I need to compare address vs. address not the entire file. this is why I need to parse it.
|
|
|
|
|
object code file formats such as Intel Hex and Motorola Hex have an address field and some data fields (often worth 16 or 32 bytes) on each of the lines; the data bytes are ordered within each line, the lines themselves can come, and do come, in any order. So one can not simply do a text compare.
|
|
|
|
|
Yeah, the way he described it, I took the "address where differs" as the offset into the file.
|
|
|
|