Library Rename

pdabasic

Active Member
Licensed User
I renamed some Official and Additional library because their name was very long and difficult.

In the debug everything works fine, but after compile the app want to use the Original named dlls :(

How can I use the renamed dll?
 

Zenerdiode

Active Member
Licensed User
Why would you want to do that :confused:

The library name never has to be typed-in; you just select it in 'Components' and its in - forget about it. If the library name was fifty characters in length, you would still just browse to it and click. Do you mean something else?
 

klaus

Expert
Licensed User
Longtime User
If you change the name of all 3 files *.dll, *.cs and *.chm it works.

But as Zenerdiode allready said: What for ?
I wouldn't do it either. I'm shure that this will bring you more trouble than advantages, especially when you want to update the libraries.

Best regards.
 

pdabasic

Active Member
Licensed User
Ok I understand your suggestions, but I like if my thinks is in an order...

The reason why I rename for example the db2000 ini file manager libray, but it doesn't have '.cs' and '.chm' file but it doesn't work
 

agraham

Expert
Licensed User
Longtime User
You can't rename a library dll and then use that dll in a compiled application because the original filename of the library is compiled into the library dll as the name of the .NET assembly it represents. The compiled application knows which assemblies it needs and locates them by assuming that the filename is the same as the assembly name. If the actual filename and the compiled assembly name don't match then the the compiled application cannot locate the required assembly at runtime.

If the source is merged at compilation then this does not apply as there is now no need to locate the library as an external assembly because the code is compiled into the final application.
 

pdabasic

Active Member
Licensed User
Thx now I see it's not a way to me!

So how can I use the original dll into my app?

How can I change the name without any alert and fault?

I can replace the name into the .sbp file with a text editor or how?
 

agraham

Expert
Licensed User
Longtime User
So how can I use the original dll into my app?
Why do you need to ask - just use it like any other library. :confused:

How can I change the name without any alert and fault?
You can't. The filename is burnt into the library like I said above. It's part of .NET security that you can't change the filename of a compiled assembly.
 
Top