Why does my app require the full .NET 4 Framework?

485 views Asked by At

I have a WinForms app targeting the .NET 4 Client Profile. However, when I try to run it on a machine that has only the Client Profile (and not the full/extended profile), I get ".NET Framework Initialization Error" saying I need to install ".NETFramework,Version=v4.0":

".NET Framework Initialization Error" saying I need to install ".NETFramework,Version=v4.0"

I've double-checked the project file to make sure that it is indeed targeting the client profile, and it is:

<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>

As are all of the projects it references. I'm not even sure where else to look - what is going on here?

1

There are 1 answers

0
Art Lucia On BEST ANSWER

Check your app.configs and verify the supported runtime specified in the startup:

<startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>

should be replaced with

<startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client" />
</startup>