none
How to identify and reference to the dependent Assembly or Library among Projects? resolve Error CS0012? RRS feed

  • Question

  • Error: 

    Error CS0012 The type 'IAsyncOperation<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows.Foundation.FoundationContract, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'. ViewModels

    My UWP app-solution has three projects:

    Project-1 (UWP):
    Target version: Windows 10 Anniversay Edition (10.0; build 14393)
    Min version: Windows 10 Anniversay Edition (10.0; build 14393)
    References:
    Analyzers
    HockeySDK.UWP
    Microsoft.NETCore.UniversalWindowsPlatform
    PcscSdk
    Serilog
    Serilog.Sinks.RollingFileAlternate.MultiPlatform
    System.Reactive
    UniversalWindows
    Xam.Plugin.Battery
    Xam.Plugin.PopupMenu
    Xam.Plugins.Settings
    Xamarin.Forms
    Dependencies: Projects\ViewModel

    Project-2 (Forms):
    Target framework: .NET Standard 1.4
    Dependencies: NuGet\
    Xam.Plugin.Battery (3.0.1)
    Xam.Plugin.PopupMenu (1.1.0)
    Xam.Plugins.Settings (3.1.1)
    Xamarin.Controls.SignaturePad.Form (2.2.0)
    Xamarin.Forms (2.5.0.122203)
    Dependencies: Projects\ViewModel
    Dependencies: SDK\NETStandard.Library(2.0.1)

    Project-2 (ViewModel):
    Target framework: .NET Standard 1.4
    Dependencies: Assemblies\ Windows.Foundation.UniversalApiContract
    Dependencies: NuGet\
    System.Reactive (3.1.1)
    Xam.Plugin.Battery (3.0.1)
    Xam.Plugins.Settings (3.1.1)
    Xamarin.Forms (2.5.0.122203)
    Dependencies: SDK\NETStandard.Library(2.0.1)

    Wednesday, January 30, 2019 2:50 PM

All replies

  • Hi,

    Since your problem is more related to Xamarin and it is out of the scope of UWP apps. I suggest that you might need to ask about this in the official Xamarin's forum. You will get more help there.

    Thank you for your patience.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, January 31, 2019 2:58 AM
  • I posted follow up questions to

    https://social.msdn.microsoft.com/Forums/windowsapps/en-US/cc4f2ef6-3a71-458a-9739-c998504cdc46/can-i-build-a-uwp-application-without-xamarin-example-library?forum=wpdevelop


    • Edited by graceds Thursday, January 31, 2019 1:39 PM
    Thursday, January 31, 2019 1:31 PM