Search Unity

"Windows.Foundation.UniversalApiContract" AND "Windows" conflict

Discussion in 'Windows' started by kshitijgandhi, Sep 28, 2015.

  1. kshitijgandhi

    kshitijgandhi

    Joined:
    Jul 13, 2015
    Posts:
    28
    I just updated to Unity 5.2.1p1

    I was having issues similar to the ones in this thread.

    Those issues are gone but I'm facing issues which seem to me to be similar.
    While building for Win 10 I get the following error -

    Code (CSharp):
    1. The type 'SocketErrorStatus' exists in both 'Windows.Foundation.UniversalApiContract, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' and 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'
    I get similar error messages for "StreamSocket", "HttpClient" etc.

    All help is appreciated
     
  2. MartinLaursen

    MartinLaursen

    Joined:
    Jun 11, 2015
    Posts:
    5
    Same issue here, also having similar problems to the thread linked in the original post. I am seeing conflicts with the class "ThreadPool". The conflict wasn't there before the update.

    Code (CSharp):
    1. error CS0433: The type 'ThreadPool' exists in both 'Windows.Foundation.UniversalApiContract, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' and 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'
     
  3. kshitijgandhi

    kshitijgandhi

    Joined:
    Jul 13, 2015
    Posts:
    28
    Any updates from the devs would be appreciated... Is it something wrong on our end? or is it a problem in Unity only?

    Any temporary solutions?
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,900
    The workaround is :
    * Go to C:\Program Files (x86)\Windows Kits\10\UnionMetadata backup Windows.winmd there
    * Copy C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Facade\Windows.winmd over to C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Windows.winmd

    Restore original Windows.winmd after new 5.2 patch release come out
     
  5. van_ustwo

    van_ustwo

    Joined:
    Jul 10, 2012
    Posts:
    82
    I'm using this workaround and I get this error when Create App Package in Visual Studio

    Error MCG0018: MCG0018:TypeExpected Type 'Windows.Foundation.IReferenceArray' was not found. Check that your build system references Windows.winmd, references .NET for Windows Store Apps, and is configured to use .NET