Re: How to compile c# code to not be dependent on CLR

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



How can I compile my VS2005 c# code to not be dependent on CLR to run?

I want people that install my software to be able to run it without
having to bother with CLR's and "Windows installers".

I would like to generate a binary for lets say Windows XP.

How do I do this?

As far as I know, this is not possible. VS2005/C# generate code to be run
under the .NET framework, that is the CLR. Not only the compiler generate IL
code for CLR, but it make heavy use of the .NET runtime classes.

I would like to generate a binary for lets say Windows XP.

It looks like you want to generate a win32 program. C# is not the right
language to do that. You sould use another language. For example C++ or
Delphi which have both win32 and .NET compilers. I personally like Delphi
because the same IDE (BDS2006) is able to handle Delphi.win32, Delphi.net,
C# (.NET only) and C++ (win32 only) within the same IDE. Delphi is
particulary interesting because you can more or less have single source code
for both win32 and .NET (You have to pay attention to the runtime you use.
They provide VCL.NET and VCL.WIN32 which is a cross platform component
library. See http://www.borland.com/us/products/delphi/index.html).


--
Francois PIETTE
http://www.overbyte.be


.



Relevant Pages

  • Re: Distributing IE with .Net Windows Forms app.
    ... Well also Delphi is moving to .Net ... The Windows 98 problem should you only encounter with fresh new ... install button, as IE requires a reboot after installation ... > I should have been clearer - it's not our app that depends on IE, ...
    (microsoft.public.dotnet.framework.setup)
  • Re: Multiple Version Install?
    ... Windows 98, if it matters. ... One more thing you Python guys got right. ... numbers change on Windows, you also need to install matching ... a certain set of Delphi "components". ...
    (comp.lang.python)
  • Re: The Future of native code
    ... the API targeted for 64-bit versions of Windows" ... But I still wonder about the future of native Delphi in the Win32 world. ... So, even risking being wrong as it can be dangerous to do "futurology" in IT, I'd say that CodeGear has enough Win32 and Win64 around for a few more decades. ... And if that runtime somehow fails to install, how well do you think those users will be able to "fix" it? ...
    (borland.public.delphi.non-technical)
  • Re: 64-bit Fans
    ... I've been running Delphi 2005 Enterprise since RC2. ... I'm using Windows 2003 Server, ... > still have no idea how to install Delphi 2005 on Windows XP x64 Edition. ... the compatibility warning ...
    (borland.public.delphi.non-technical)
  • Re: Advantages of Delphi.NET
    ... > developers I've spoken to opted for WinForms for a true .NET experience. ... The simplest way to illustrate this: WinForms runs only on Windows. ... because it has P/Invoke calls to the Win32 API. ... always been using Delphi - which was always a visual, yet low-level, real ...
    (borland.public.delphi.non-technical)