views:

561

answers:

2

After upgrading my project to Visual Studio 2010 and .Net 4.0, my app.config file generates these messages upon building the project:

  • 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'.

Here is my entire app.config file:

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

If I create a new VS2010 project and literally copy/paste the same app.config file, I receive no such messages.

Obviously these messages are not causing any runtime problems, but they are still annoying and disconcerting.

How do I fix whatever problem is making these messages appear?

I see the answer at http://stackoverflow.com/questions/229155/app-config-configsections-custom-settings-can-not-find-schema-information, but I see nowhere in the properties list to enter the path to the schema.

Thanks.

+1  A: 

Are you sure the conversion went ok? Maybe the correct target framework wasn't configured. Open your project properties and check if the target framework is actually .NET Framework 4 or .NET Framework 4 Client Profile.

Ronald Wildenberg
It is indeed .NET Framework 4 Client Profile, as intended. There were no errors during the upgrade.
Walt D
+1  A: 

I changed the schema from DotNetConfig to DotNetConfig35 and it took care of the issue. This is available in the properties of the app.config file.

joe
Noting because this confused me at first. At least in VS2k10 You need to look at the properties shown when the file is shown in the edit window, not the properties shown when selecting the file in Solution Explorer.
Dan Neely