Search Unity

[UWP] System.XML.Linq "Reference rewriter" error

Discussion in 'Windows' started by Maisey, Feb 23, 2016.

  1. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    Hello (again)! :)

    I have an .dll file created (for .NET 3.5). Inside it I'm using classes from the System.Xml.Linq namespace. But when building a C# VS Project I get the following error:

    Code (CSharp):
    1. Reference rewriter: Error: method `System.Void System.Xml.Linq.XDocument::Save(System.String)` doesn't exist in target framework. It is referenced from ACELib-Ads.dll
    My first guess would be that this namespace doesn't exist for UWP apps. But according to the Microsoft documentation (see here), the namespace should be available for UWP apps. So what might be the problem? Bug or am I missing something?

    Thanks!


    EDIT
    I found the issue. The method XDocument.Save(...) has different method signatures. In UWP apps it doesn't allow for specifying path by using only a String (instead you need to use TextWriter).
     
    Last edited: Feb 23, 2016