为什么从“.NET Framework 4 Client Profile”更改我的目标框架?到“.NET Framework 4”给我警告信息?
该行:
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
已添加到我的 App.config 文件中,现在我收到警告消息:
找不到元素“supportedRuntime”的架构信息
找不到属性“版本”的架构信息
找不到属性“sku”的架构信息
我可以从配置文件中删除该行吗?当我运行该应用程序时,一切正常。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您的应用程序设计为针对客户端配置文件,您应该设置您的 app.Config 以匹配。如果要以完整的 .NET Framework 为目标,请确保将 Visual Studio 的项目设置窗口中的项目类型更改为 .NET 4 Framework。
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.
这条线没有任何问题。从错误消息来看,听起来 app.config 中的前一行有错误或未关闭,或者该行已从正确的位置移动。
这是从工作项目复制的:
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:
这些行不是必需的。我需要编写一个控制台应用程序来使用 ASP.NET 会员资格提供程序。 System.web 无法与客户端配置文件一起使用。所以我改为.Net Framework 4。我删除了这些行,它没有给我带来任何问题。
首先不知道为什么需要它。
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.