Windows Service Compatability

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter

    #1

    Windows Service Compatability

    I have created a Windows Service with VS.NET 2003 and compiled the service with Supported Runtimes v1.1.4322, v1.0.3705. When I try to install it on a machine that has only .NET 1.0 runtimes I get the following error message:

    'System.Reflect ion.ReflectionT ypeLoadExceptio n: One or more of the types in the assembly unable to load.'

    When I compile the same code using .NET 1.0 SDK the program installs without any problems.

    Does anyone know how to setup VS.NET 2003 to compile Windows Service to run on machine with .NET 1.0 only.


    Peter

    --
    Thanks
    -------------------
    czupet@wsinc.co m
  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Windows Service Compatability

    Peter,

    Quite simply, you can not. VS.NET 2003 targets the 1.1 version of the
    runtime. This is a good thing, as there are features in 1.1 that are not
    supported in the 1.0 version of the runtime.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - nicholas.paldin o@exisconsultin g.com

    "Peter" <czupet@wsinc.c om> wrote in message
    news:%237KD48RU DHA.556@TK2MSFT NGP12.phx.gbl.. .
    I have created a Windows Service with VS.NET 2003 and compiled the service
    with Supported Runtimes v1.1.4322, v1.0.3705. When I try to install it on a
    machine that has only .NET 1.0 runtimes I get the following error message:

    'System.Reflect ion.ReflectionT ypeLoadExceptio n: One or more of the types in
    the assembly unable to load.'

    When I compile the same code using .NET 1.0 SDK the program installs without
    any problems.

    Does anyone know how to setup VS.NET 2003 to compile Windows Service to run
    on machine with .NET 1.0 only.


    Peter

    --
    Thanks
    -------------------
    czupet@wsinc.co m


    Comment

    • Nicholas Paldino [.NET/C# MVP]

      #3
      Re: Windows Service Compatability

      Peter,

      I actually spoke too soon. You might be able to create a config file for your app which will say which runtimes are supported. If you are not using any functionality in 1.1 that can be called from 1.0 (methods that don't exist, etc, etc), then you should be able to change the config file to add the "runtime supported" element and indicate that you support previous runtimes.


      --
      - Nicholas Paldino [.NET/C# MVP]
      - nicholas.paldin o@exisconsultin g.com

      "Peter" <czupet@wsinc.c om> wrote in message news:%237KD48RU DHA.556@TK2MSFT NGP12.phx.gbl.. .
      I have created a Windows Service with VS.NET 2003 and compiled the service with Supported Runtimes v1.1.4322, v1.0.3705. When I try to install it on a machine that has only .NET 1.0 runtimes I get the following error message:

      'System.Reflect ion.ReflectionT ypeLoadExceptio n: One or more of the types in the assembly unable to load.'

      When I compile the same code using .NET 1.0 SDK the program installs without any problems.

      Does anyone know how to setup VS.NET 2003 to compile Windows Service to run on machine with .NET 1.0 only.


      Peter

      --
      Thanks
      -------------------
      czupet@wsinc.co m

      Comment

      • Peter

        #4
        Re: Windows Service Compatability

        I did that, in the project properties I selected Supported Runtimes v1.1.4322, v1.0.3705 which creates the project.config. exe file, but I still get the error, but the same code works fine when I compile it with ..NET 1.0 SDK.

        "Nicholas Paldino [.NET/C# MVP]" <nicholas.paldi no@exisconsulti ng.com> wrote in message news:OsSuOBSUDH A.3700@tk2msftn gp13.phx.gbl...
        Peter,

        I actually spoke too soon. You might be able to create a config file for your app which will say which runtimes are supported. If you are not using any functionality in 1.1 that can be called from 1.0 (methods that don't exist, etc, etc), then you should be able to change the config file to add the "runtime supported" element and indicate that you support previous runtimes.


        --
        - Nicholas Paldino [.NET/C# MVP]
        - nicholas.paldin o@exisconsultin g.com

        "Peter" <czupet@wsinc.c om> wrote in message news:%237KD48RU DHA.556@TK2MSFT NGP12.phx.gbl.. .
        I have created a Windows Service with VS.NET 2003 and compiled the service with Supported Runtimes v1.1.4322, v1.0.3705. When I try to install it on a machine that has only .NET 1.0 runtimes I get the following error message:

        'System.Reflect ion.ReflectionT ypeLoadExceptio n: One or more of the types in the assembly unable to load.'

        When I compile the same code using .NET 1.0 SDK the program installs without any problems.

        Does anyone know how to setup VS.NET 2003 to compile Windows Service to run on machine with .NET 1.0 only.


        Peter

        --
        Thanks
        -------------------
        czupet@wsinc.co m

        Comment

        Working...