|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
.NET to x86Does 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 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. Show quote "Markus Eßmayr" <essmayr/at/racon-linz.at> ha scritto nel messaggio news:OQVerodRHHA.3996@TK2MSFTNGP04.phx.gbl... > 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 > Max,
Take a look at the following link for strategies to improve application startup times. http://msdn.microsoft.com/msdnmag/issues/06/02/CLRInsideOut/ Brian Show quote On Feb 1, 2:22 am, "Markus Eßmayr" <essmayr/at/racon-linz.at> wrote: > 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 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 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 Show quote "Michael Nemtsev" <nemt***@msn.com> schrieb im Newsbeitrag news:a279a63a3da59c8c91468793c122c@msnews.microsoft.com... > 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 > > "Markus Eßmayr" <essmayr/at/racon-linz.at> wrote We use RemoteSoft's stuff when we need to do this. Mostly, we need this for > > Does anybody of you know a way to compile any .NET assembly to x86 code? 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/ |
|||||||||||||||||||||||