Windows Service Compatability

  • Thread starter Thread starter Nicholas Paldino [.NET/C# MVP]
  • Start date Start date
N

Nicholas Paldino [.NET/C# MVP]

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]
- (e-mail address removed)

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.Reflection.ReflectionTypeLoadException: 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
 
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.Reflection.ReflectionTypeLoadException: 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
 
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]
- (e-mail address removed)

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.Reflection.ReflectionTypeLoadException: 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
 
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.

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]
- (e-mail address removed)

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.Reflection.ReflectionTypeLoadException: 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
 
Back
Top