Pregunta

I have created an exc in VS2012 (C#) using .NET 3.5 Framework. And run that exe on test machine - Win OS 2012 .NET Framework 4.5 only It is giving me following message

Feature Couldn't be installed

I have following questions : 1. Why it is not supporting backward compatibility of .NET Framework 3.5 ? 2. Is there any way to handle this or user has to install 3.5 .NET Framework ?

Thanks in advance.

¿Fue útil?

Solución 3

I have added following configuration in app.config file and it worked like charm

  <startup>
    <supportedRuntime version="v2.0.50727" />
    <supportedRuntime version="V4.0" />
  </startup>

Otros consejos

Upgrade the project to Framework 4 of 4.5, or install 3.5 (from Server Manager) are your only options i think...

See http://msdn.microsoft.com/en-us/library/ff602939.aspx for more details.

You have probably set .Net 3.5 as requirement at the Installer.


The .NET Framework 4.5 is backward-compatible with applications that were built with the .NET Framework versions 1.1, 2.0, 3.0, 3.5, and 4. In other words, applications and components built with previous versions of the .NET Framework will work on the .NET Framework 4.5.

http://msdn.microsoft.com/en-us/library/ff602939.aspx

http://blogs.msdn.com/b/dotnet/archive/2011/09/26/compatibility-of-net-framework-4-5.aspx

dism /online /enable-feature /featurename:NetFx3 /All /Source:d:\sources\sxs /LimitAccess

where d:\ is the CD ROM drive your windows CD is in.

then try again.

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