Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

"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,673
    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