开发者

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? Ever开发者_JS百科ything works fine when I run the app.


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.


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>


These lines are not required. I needed to write a console application to use asp.net membership provider. System.web was not available with client profile. So i changed to .Net framework 4. I removed these lines, it gave me no issues. Not sure why is it needed at first place.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜