Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why did changing my target framework from ".NET Framework 4 Client Profile" to ".NET framework 4" give me warning messages?

The line:

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

was added to my App.config file and now i get the warning messages:

Could not find schema information for the element 'supportedRuntime'

Could not find schema information for the attribute 'version'

Could not find schema information for the attribute 'sku'

Can I just delete that line from the config file? Everything works fine when I run the app.

like image 423
Dez Hood Avatar asked Jun 16 '11 16:06

Dez Hood


People also ask

How do I change .NET Framework 4 client Profile If I change it to .NET Framework 4?

NET Framework 4.0. Navigate to the Project toolbar item, and then select Properties (Application properties). In the Application tab, change the Target framework to . NET Framework 4.

What is the difference between .NET Framework 4.0 and client profile?

NET Framework 4 Client Profile provides a subset of features from the . NET Framework 4. The Client Profile is designed to run client applications and to enable the fastest possible deployment for Windows Presentation Foundation (WPF) and Windows Forms technology.

What does target .NET framework mean?

When you target a framework in an app or library, you're specifying the set of APIs that you'd like to make available to the app or library. You specify the target framework in your project file using a target framework moniker (TFM). An app or library can target a version of . NET Standard. .


2 Answers

If your application is designed to target the Client Profile, you should setup your app.Config to match. If you want to target the full .NET Framework, make sure to change your project type in the project settings window of Visual Studio to .NET 4 Framework.

like image 113
Reed Copsey Avatar answered Sep 30 '22 18:09

Reed Copsey


There is nothing wrong with this line. From the error messages, it sounds like there is a previous line in your app.config which has errors or is unclosed, or that this line was moved from it's correct place. This is copied from a working project:

<configuration>

 <!-- Other configuration -->

  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
</configuration>
like image 45
Simon Bondo Avatar answered Sep 30 '22 16:09

Simon Bondo