如果属性标记为Obsolete attribtute,则会显示编译器警告(在自动生成的文件XamlTypeInfo.g.cs中) [英] If a property is marked with an Obsolete attribtute, compiler warnings are shown (in the auto-generated file XamlTypeInfo.g.cs)

查看:62
本文介绍了如果属性标记为Obsolete attribtute,则会显示编译器警告(在自动生成的文件XamlTypeInfo.g.cs中)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 

如果属性标记为过时的属性,显示编译器警告(在自动生成的文件XamlTypeInfo.g.cs中)

我可以看到

中报告的相同问题

https://connect.microsoft.com/VisualStudio/feedback/details/797357/windows-store-app-if-a-property-is-marked-with-an-obsolete-attribtute-compiler-warnings-are -shown-in-the-generated-file-xamltypeinfo-g-cs

无法获得解决方案。

你能帮我解决一下吗?

问候,

Jeyasri M。



解决方案

你真的无能为力。  这是您无法控制的自动生成的代码。  希望在Visual Studio的下一个版本中不会发生这种情况。  请记住,这只是代码仍会运行的警告。只需
建议您停止使用此属性,因为它已被其他内容替换。  

If a property is marked with an Obsolete attribtute, compiler warnings are shown (in the auto-generated file XamlTypeInfo.g.cs)

I can see the same issue reported in

https://connect.microsoft.com/VisualStudio/feedback/details/797357/windows-store-app-if-a-property-is-marked-with-an-obsolete-attribtute-compiler-warnings-are-shown-in-the-auto-generated-file-xamltypeinfo-g-cs

could not get the solution for it.

Could you help me to resolve the same.

Regards,

Jeyasri M.


解决方案

There is really nothing you can do about this.  It is auto generated code which you can not control.  Hopefully in the next version of visual studio it will not happen.  Remember that is just a warning the code will still run. It is just recommending you stop using this property because it has been replaced by something else.  


这篇关于如果属性标记为Obsolete attribtute,则会显示编译器警告(在自动生成的文件XamlTypeInfo.g.cs中)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆