.NET to x86

M

Markus Eßmayr

Hi everybody!

Does anybody of you know a way to compile any .NET assembly to x86 code?
But I don't mean NGen or something like that!!!!

I'd like to get a DLL which has absolutely NO DEPENDENCY to the .NET runtime
anymore!
Running it should not perform any CAS checks, ...
All used types should also get compiled to x86 code in either the same or
other DLLs!
As a result, I'd like to register the resulting DLL (which exposes a .NET
class to COM) using regsrv32.

I know, you now might be thinking: "Is this guy crazy!", but that's ok! :)
So, let me explain to you, why this question came up!
I'm working on an application which is developed in an unmanaged
environment. This environment allows very RAD and it also is able to consume
COM objects.
But the problem is, that the instanciation of COM objects written in .NET
which we need during application startup slows down the complete application
launch!!!!!!
We already tried NGen'd, strong named and GAC'd components, but it's still
slow.
So we think that loading the whole bunch of .NET files may result in that
big delays - and that creating completely unmanaged modules might help here,
as loading "normal" DLLs is quite fast.

Or has anybody of you another idea, what I coul'd try?

Thanks in advance!
Max
 
L

Laura T.

I would try preloading the app/components at the logon time (like Acrobat
and Office do).
There are some static linkers and something like that but they do not do
what you want.
..NET tools target .NET and there is not much we can do about it. One needs
to work around this limit.
 
M

Michael Nemtsev

Hello Markus Eßmayr" essmayr/at/racon-linz.at,

M> Hi everybody!
M>
M> Does anybody of you know a way to compile any .NET assembly to x86
M> code? But I don't mean NGen or something like that!!!!
M> I'd like to get a DLL which has absolutely NO DEPENDENCY to the .NET
M> runtime anymore!

Maybe only small dependency? :)
I recommed to look at RemoteSoft's linker/Thinstall Studio/Xenocode


M> But the problem is, that the instanciation of COM objects written in
M> .NET which we need during application startup slows down the complete
M> application launch!!!!!!
M> So we think that loading the whole bunch of .NET files may result in
M> that
M> big delays - and that creating completely unmanaged modules might
M> help here,

What if preload all your managed app before it used, not the moment when
u request it?
Some kind of caching

---
WBR, Michael Nemtsev [C# MVP] blog: http://spaces.live.com/laflour
team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
 
C

Chris Mullins [MVP]

Markus Eßmayr said:
Does anybody of you know a way to compile any .NET assembly to x86 code?

We use RemoteSoft's stuff when we need to do this. Mostly, we need this for
installation packages and/or bootstrappers. We've also used it once for a
WinForms app that had to run on alot of machines that couldn't have .Net
installed on them.

It's worked like a charm.

http://www.remotesoft.com/linker/
 
M

Markus Eßmayr

Thanks for the answer!

According to prealoading, I have one problem.
Some of our customers start the application using the "Startup" folder (and
they won't remove it from there).
This makes the startup-problem even more worse, but as this might happen,
adding a preloading-application to "Startup" too would make the problem just
bigger.
Or do you know a special way for a better preloading-algorithm?

Thanks!
Max
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top