Reputation: 11222
I have a .NET Winform application that targets the '.NET Framework 4 Client Profile', it uses four more class library assemblies but they are also all targeting the client profile.
When I test this on a vanilla Windows XP box with just the 4.0 Client Profile installed, I still get a '.NET Framework Initialization Error':
To run this application, you first must install one of the following versions on the .NET framework: .NETFramework, Version=v4.0
How can I find out what part of the app still needs a component of the full framework?
I assumed that by setting the target framework to 'client profile' the compiler would make sure I am only using components of the client profile.
Upvotes: 2
Views: 2472
Reputation: 11222
I went through all the assemblies again to make sure that they all target the client profile: yes.
Then I started with a fresh empty WinForms app and it ran on the client profile as expected. I then added my assemblies I use in my main app to this fresh app one by one. Even after referencing them all, the fresh app still ran.
I then looked at the app.config which has some DbProviderFactories entries but removing them did not help. While there I saw the first node:
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
hmm, maybe that specific sku stands for the full version. And indeed, changing it to
<startup>
<supportedRuntime version="v4.0" />
</startup>
solved all my problems.
Upvotes: 5