Daniel Schaffer
Daniel Schaffer

Reputation: 57862

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

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?

Upvotes: 3

Views: 488

Answers (1)

Art Lucia
Art Lucia

Reputation: 156

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>

Upvotes: 4

Related Questions