none
Delay load the .NET depedency in Windows 2008 Server core ? RRS feed

  • Question

  • Hello,

    We have a WCF(Windows Communication Foundation) based Windows service application which exposes several web service endpoints written in .NET CLI C++.

    90% of the code in the service is written in C++, We are using the .NET framework just to expose these C++ functionalities in the form of Web Service which are exposed to the clients using several WCF web service endpoints.

    Now we have a problem. Windows Server 2008 server core does not support .NET CLR. We need to run this service in
    Windows Server 2008 server core also, even though most of the installations will be in Windows Server 2008(non server core), and Windows 2003 servers(existing installations). I would like to use the same code base to support both these configurations. (.NET based and non .NET based, since 90% of the code is legacy C++ code).

    What are the options i have here?. In the Windows service i add reference to the System.ServiceModel.dll, System.dll, System.XML.dll to use WCF inside the service.

    Can i some how "delay load these .NET assemblies" and at run time detect the configuration of the system(Windows server 2008 server core /non server core), and then load the .NET assemblies(to initialize the WCF framework and endpoints)

    Any pointers to this will be really appreciated.

    Thanks,
    Vineeth
    Sunday, April 13, 2008 6:21 AM

All replies

  • You have to separate your pure C++ code from the .NET stuff.  If you compile as Managed C++ or C++/CLR, the framework is required immediately at startup.  But native C++ does not have that issue.

    -Ryan / Kardax
    Tuesday, July 1, 2008 4:07 PM
  • There's no magic available here to solve your problem.  No framework == no managed code.
    Hans Passant.
    Wednesday, July 2, 2008 12:10 AM
    Moderator