Pregunta

I have written a windows service in c# using ide visual studio 2012. When I tried to install it on a windows server 2003 I got this error message:

Prerequisite check for system component Microsoft .NET Framework 4.5 (x86 and x64) failed with the following error message: "Installation of the Microsoft .NET Framework 4.5 is not supported on this operating system. Contact your application vendor."

So I went back into my project and set the target framework to 4.0. I then rebuilt the solution, re-added the installer and published again. However, when I try to install I get the exact same error.

For some reason it is not detecting that I have changed the framework to 4.0. Any ideas where I have force this change or where even to look??

Extra Info: It seems to be using click-once deployment.

¿Fue útil?

Solución

The only solution I came up with was to create a new project with the correct .NET version. Copied all my code across and it worked... shrug

Otros consejos

.NET Framework 4.5 is not supported on Windows XP, Windows Server 2003 and similar.

Supported Operating Systems (as per System Requirements page):

  • Windows 7 Service Pack 1, Windows Server 2008 R2 SP1, Windows Server 2008 Service Pack 2, Windows Vista Service Pack 2
  • Windows Vista SP2 (x86 and x64)
  • Windows 7 SP1 (x86 and x64)
  • Windows Server 2008 R2 SP1 (x64)
  • Windows Server 2008 SP2 (x86 and x64)

If you're using Wine to install it, run winecfg and change your Windows version to higher.

Otherwise install lower version of .NET Framework such as 3.0. If you're compiling the project, change it in Target framework.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top