• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

.NET Question

PowerMacG5

Diamond Member
I have a question. I understand that when compiling a program in .NET, it is compiled to an IL that the .NET Framework interprets to machine language then executes, but I want to find something out. Is there anyway to take that IL and compile it into a binary so that it can be run on a machine without the .NET Framework? The reason I ask is because I am making a program for a friend in VC#, and he doesn't want to install the .NET Framework, and I really don't wanna pull out my VC++ and MFC books for consulting (being that I am now fluent in C#, and VC++ is slowly fading to the back of my head). Any help is welcome.
 
No.

MS does not provide a way to make a "statically linked" build like you can with MFC, and given that the framework is so huge you probably wouldn't want it anyway. "Hello World" = 15 MB 🙂

(Even if they wanted to, it wouldn't work because the framework installer needs to replace DLLs and make registry changes.)
 
Originally posted by: KraziKid
I have a question. I understand that when compiling a program in .NET, it is compiled to an IL that the .NET Framework interprets to machine language then executes, but I want to find something out. Is there anyway to take that IL and compile it into a binary so that it can be run on a machine without the .NET Framework? The reason I ask is because I am making a program for a friend in VC#, and he doesn't want to install the .NET Framework, and I really don't wanna pull out my VC++ and MFC books for consulting (being that I am now fluent in C#, and VC++ is slowly fading to the back of my head). Any help is welcome.

As Dave said, no. MS treats the framework as an OS component at this point, your friend is likely going to need it for somethign else anyhow so he might as well install it 😉
Bill
 
Originally posted by: bsobel
Originally posted by: KraziKid
I have a question. I understand that when compiling a program in .NET, it is compiled to an IL that the .NET Framework interprets to machine language then executes, but I want to find something out. Is there anyway to take that IL and compile it into a binary so that it can be run on a machine without the .NET Framework? The reason I ask is because I am making a program for a friend in VC#, and he doesn't want to install the .NET Framework, and I really don't wanna pull out my VC++ and MFC books for consulting (being that I am now fluent in C#, and VC++ is slowly fading to the back of my head). Any help is welcome.

As Dave said, no. MS treats the framework as an OS component at this point, your friend is likely going to need it for somethign else anyhow so he might as well install it 😉
Bill

Thanks a lot, both of you. I will convince him (with force if necessary 😛) to install the .NET Framework. I know he will eventually need it for something else, but for some reason he is hesitant. Thanks again.
 
Personally I don't have it installed - for one reason: it shows up in your Internet Explorer user-agent string, so sites can see how many people have installed it. The fewer, the longer before it is adapted, giving other people more time to get their clones working properly 😉
 
You *could* do it if you were so inclined; however, as others have noted, without the FCL and its associated libraries one wouldn't have much functionality.

In other words, you could download "Rotor" and tweak the JIT compilation methods to emit the generated opcodes to a binary. Specifically, you'd have to tweak the FJit::jitCompile method and friends from fjitcompiler.cpp. You'd also have to manually handle the construction of the PE header and make it such that the stub loader for mscoree.dll wasn't present for non-XP platforms.

It is doable, but.... ouch.
 
Originally posted by: CTho9305
Personally I don't have it installed - for one reason: it shows up in your Internet Explorer user-agent string, so sites can see how many people have installed it. The fewer, the longer before it is adapted, giving other people more time to get their clones working properly 😉

It shows up in the user string so sites can know if they utilize .net features on the host....
Bill

 
Back
Top