Cange namespace in compiled Class Library

  • Thread starter Thread starter Mattias Sjögren
  • Start date Start date
Tamir,

I doubt it, especially if it is signed. If it is signed, then I imagine
the namespace of each type makes up part of the hash that is embedded in the
assembly when it is signed.

What you could do is run ildasm on the assembly, creating files of IL,
and then call ilasm, which would compile the IL. You can change the
namespace in the IL, and get the same results, I believe.

Hope this helps.
 
Tamir,

When using IL, I think you need to specify the target to be a DLL, not
an executable.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Tamir Khason said:
ilasm failed here

Creating PE file
Error: No entry point declared for executable
Could not create output file, error code=0x80004005

message news:%[email protected]...
Tamir,

I doubt it, especially if it is signed. If it is signed, then I imagine
the namespace of each type makes up part of the hash that is embedded in the
assembly when it is signed.

What you could do is run ildasm on the assembly, creating files of IL,
and then call ilasm, which would compile the IL. You can change the
namespace in the IL, and get the same results, I believe.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Tamir Khason said:
I have a couple of class libraries wich I built about a year ago. I
want
to
add it no other project, but I want to change their namespaces without
recompliation ('cos I'm not sure that I have all nessesery libraries).
Is it possible anyhow change namespace of compiled .NET DLL ?

TNX
 
Tamir,

Can you send the IL files that you are using as input?

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


Tamir Khason said:
Added /DLL key and now I recieve the following:


Resolving member refs: 19157 -> 19157 defs, 0 refs
Could not create output file, error code=0x80070714

message news:%[email protected]...
Tamir,

When using IL, I think you need to specify the target to be a DLL, not
an executable.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Tamir Khason said:
ilasm failed here

Creating PE file
Error: No entry point declared for executable
Could not create output file, error code=0x80004005

"Nicholas Paldino [.NET/C# MVP]" <[email protected]>
wrote
in
message Tamir,

I doubt it, especially if it is signed. If it is signed, then I
imagine
the namespace of each type makes up part of the hash that is
embedded
in
the
assembly when it is signed.

What you could do is run ildasm on the assembly, creating files
of
IL,
and then call ilasm, which would compile the IL. You can change the
namespace in the IL, and get the same results, I believe.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

I have a couple of class libraries wich I built about a year ago.
I
want
to
add it no other project, but I want to change their namespaces without
recompliation ('cos I'm not sure that I have all nessesery libraries).
Is it possible anyhow change namespace of compiled .NET DLL ?

TNX
 
I have a couple of class libraries wich I built about a year ago. I want to
add it no other project, but I want to change their namespaces without
recompliation ('cos I'm not sure that I have all nessesery libraries).
Is it possible anyhow change namespace of compiled .NET DLL ?

TNX
 
Cos I need to incude it in project instead of other version (with different
namespace) so I do not want to mess with exchanging all references
 
No, the dll does not signed

Nicholas Paldino said:
Tamir,

I doubt it, especially if it is signed. If it is signed, then I imagine
the namespace of each type makes up part of the hash that is embedded in the
assembly when it is signed.

What you could do is run ildasm on the assembly, creating files of IL,
and then call ilasm, which would compile the IL. You can change the
namespace in the IL, and get the same results, I believe.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Tamir Khason said:
I have a couple of class libraries wich I built about a year ago. I want to
add it no other project, but I want to change their namespaces without
recompliation ('cos I'm not sure that I have all nessesery libraries).
Is it possible anyhow change namespace of compiled .NET DLL ?

TNX
 
ilasm failed here

Creating PE file
Error: No entry point declared for executable
Could not create output file, error code=0x80004005

Nicholas Paldino said:
Tamir,

I doubt it, especially if it is signed. If it is signed, then I imagine
the namespace of each type makes up part of the hash that is embedded in the
assembly when it is signed.

What you could do is run ildasm on the assembly, creating files of IL,
and then call ilasm, which would compile the IL. You can change the
namespace in the IL, and get the same results, I believe.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Tamir Khason said:
I have a couple of class libraries wich I built about a year ago. I want to
add it no other project, but I want to change their namespaces without
recompliation ('cos I'm not sure that I have all nessesery libraries).
Is it possible anyhow change namespace of compiled .NET DLL ?

TNX
 
This is the path I running

ilasm BaseOwnClass.il /RESOURCE=BaseOwnClass.ClassView.resources
/OUTPUT=BaseOwnClass.dll


Nicholas Paldino said:
Tamir,

When using IL, I think you need to specify the target to be a DLL, not
an executable.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Tamir Khason said:
ilasm failed here

Creating PE file
Error: No entry point declared for executable
Could not create output file, error code=0x80004005

message news:%[email protected]...
Tamir,

I doubt it, especially if it is signed. If it is signed, then I imagine
the namespace of each type makes up part of the hash that is embedded
in
the
assembly when it is signed.

What you could do is run ildasm on the assembly, creating files of IL,
and then call ilasm, which would compile the IL. You can change the
namespace in the IL, and get the same results, I believe.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

I have a couple of class libraries wich I built about a year ago. I want
to
add it no other project, but I want to change their namespaces without
recompliation ('cos I'm not sure that I have all nessesery libraries).
Is it possible anyhow change namespace of compiled .NET DLL ?

TNX
 
Added /DLL key and now I recieve the following:


Resolving member refs: 19157 -> 19157 defs, 0 refs
Could not create output file, error code=0x80070714

Nicholas Paldino said:
Tamir,

When using IL, I think you need to specify the target to be a DLL, not
an executable.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Tamir Khason said:
ilasm failed here

Creating PE file
Error: No entry point declared for executable
Could not create output file, error code=0x80004005

message news:%[email protected]...
Tamir,

I doubt it, especially if it is signed. If it is signed, then I imagine
the namespace of each type makes up part of the hash that is embedded
in
the
assembly when it is signed.

What you could do is run ildasm on the assembly, creating files of IL,
and then call ilasm, which would compile the IL. You can change the
namespace in the IL, and get the same results, I believe.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

I have a couple of class libraries wich I built about a year ago. I want
to
add it no other project, but I want to change their namespaces without
recompliation ('cos I'm not sure that I have all nessesery libraries).
Is it possible anyhow change namespace of compiled .NET DLL ?

TNX
 
Works fine with simple path ilasm MyClass.il /DLL :)
KISS = Keep It Stupid Simple :)

Thx to all...




Tamir Khason said:
ilasm failed here

Creating PE file
Error: No entry point declared for executable
Could not create output file, error code=0x80004005

message news:%[email protected]...
Tamir,

I doubt it, especially if it is signed. If it is signed, then I imagine
the namespace of each type makes up part of the hash that is embedded in the
assembly when it is signed.

What you could do is run ildasm on the assembly, creating files of IL,
and then call ilasm, which would compile the IL. You can change the
namespace in the IL, and get the same results, I believe.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Tamir Khason said:
I have a couple of class libraries wich I built about a year ago. I
want
to
add it no other project, but I want to change their namespaces without
recompliation ('cos I'm not sure that I have all nessesery libraries).
Is it possible anyhow change namespace of compiled .NET DLL ?

TNX
 
Back
Top