简体   繁体   中英

c# windows phone 8.1 “use of windows namespace is reserved” error

I am developing windows phone 8.1 app. I have create Pivot App(Windows Phone) from templates. In same solution I have added Class Library(Portable for iOS, Android And windows) . I have added class library .dll to windows phone project. Here is Class Library project property screenshot

在此处输入图片说明

After adding reference to phone project it is giving error

The .winmd file 'Windows.winmd' contains type 'Windows.Data.Xml.Dom.XmlText'. The use of the Windows namespace is reserved.

The .winmd file 'Windows.winmd' contains type 'Windows.Globalization.NumberFormatting.ICurrencyFormatterFactory'. The use of the Windows namespace is reserved.

Here is screenshot

在此处输入图片说明

After removing this all things working perfectly. I am not getting, why it is giving all these errors after adding .dll ?

I had a similar problem with his references. What I did was reinstall the Windows 8 SDK.

http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx

or

I do not have a machine which is upgrade from Windows 7 to Wndows 8 to test against, but in my opinion it should be the root cause of your current issue. And would you mind to correct your issue by reinstalling a clean Windows 8?

Also

It seem like you are using an older version of the sdk.

I had a similar list of error in my Windows Phone 8.1 project, and it turned out that I was referencing Windows.winmd (Shown as 'Windows' under references) from one of the PCL projects in my solution! When I removed that reference, errors disappeared.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM