none
How to Create a Nugget Package in Uwp Using Nuget Package Explorer?

    Question

  • Since 2016 I tried thousands of times publishing my libraries to nuget. I already uploaded it and ready to use, but the problem the program will not compile its says, 

    1. Severity Code Description Project File Line Suppression State
    Error  Type universe cannot resolve assembly: AppStudio.Uwp, Version=1.5.3.0, Culture=neutral, PublicKeyToken=null. App1 C:\Users\Robel\OneDrive\Documents\Projects\UWP\ExtendedHamburgerMenu.UWP\App1\MainPage.<g class="gr_ gr_224 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="224" id="224">xaml</g>  

    2. 

    Windows.UI.Xaml.Markup.XamlParseException
      HResult=0x802B000A
      <g class="gr_ gr_275 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins replaceWithoutSep" data-gr-id="275" id="275">Message=The</g> text associated with this error code could not be found.

    Cannot deserialize XBF metadata property list as 'NavigationItems' was not found in type 'AppStudio.Uwp.Controls.ShellControl'. [Line: 0 nbsp; Source=Windows
      StackTrace:
       at Windows.UI.Xaml.Application.LoadComponent(Object component, Uri resourceLocator, ComponentResourceLocation componentResourceLocation)
       at App1.MainPage.InitializeComponent() in C:\Users\Robel\OneDrive\Documents\Projects\UWP\ExtendedHamburgerMenu.UWP\App1\obj\x86\Debug\MainPage.g.i.cs:line 45
       at App1.MainPage..ctor() in C:\Users\Robel\OneDrive\Documents\Projects\UWP\ExtendedHamburgerMenu.UWP\App1\MainPage.xaml.cs:line 27
       at App1.App1_XamlTypeInfo.XamlTypeInfoProvider.Activate_20_MainPage() in C:\Users\Robel\OneDrive\Documents\Projects\UWP\ExtendedHamburgerMenu.UWP\App1\obj\x86\Debug\XamlTypeInfo.g.cs:line 292
       at App1.App1_XamlTypeInfo.XamlUserType.ActivateInstance() in C:\Users\Robel\OneDrive\Documents\Projects\UWP\ExtendedHamburgerMenu.UWP\App1\obj\x86\Debug\XamlTypeInfo.g.cs:line 1166

    3. the file HamburgerMenuSearch.UWP.xr.xml not found.

    A many more errors that cannot resolve since 2016 until the year  2019 I cannot have a working NuGet package.

    Here my library for uwp that I want to Publish. If you can help me to resolve this... or just publish it. Thanks.

    HamburgerMenuSearch.UWP

    Nuget API Key =   oy2ago7hti64nqvr6kzqjo77dqgndn4uhdd6sisq663cma





    Sunday, May 26, 2019 5:25 AM

Answers

  • Hi maze4,

    Welcome to MSDN forum.

    According to error message1: It seems the project which consumes the .nupkg can't find the AppStudio.UWP nuget package. I've checked your project and find your HamburgerMenuSearch.UWP project adds reference to these two packages:

    And for package reference format, the assemblies in these two packages didn't be copied to output. So when a new project add reference to you nuget package, it gets compiler error since the new project can't find these assemblies.

    As a temporary workaround:

    If you create a project which consumes your nuget package, you should consumes the two AppStudio nuget packages also. After that rebuild the project to check if it helps.

    Actually, I think it's not something about using nuget package explorer, the cause of the issue is when building your HamburgerMenuSearch project, the vs doesn't copy the referenced assembly to output.

    I'm not sure if there is one option to help this situation.(I hope it exists) I'm still researching this topic. And hope the temporary workaround can help. 

    Looking forward to your reply.

    Best Regards

    Lance


    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.

    Monday, May 27, 2019 10:03 AM

All replies

  • Hi ,

    Since the problem is more related to Nuget Package, I'll help you to move this thread to the Visual Studio General Questions Forum. You could get more professional support 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.

    Monday, May 27, 2019 6:12 AM
  • Hi maze4,

    Welcome to MSDN forum.

    According to error message1: It seems the project which consumes the .nupkg can't find the AppStudio.UWP nuget package. I've checked your project and find your HamburgerMenuSearch.UWP project adds reference to these two packages:

    And for package reference format, the assemblies in these two packages didn't be copied to output. So when a new project add reference to you nuget package, it gets compiler error since the new project can't find these assemblies.

    As a temporary workaround:

    If you create a project which consumes your nuget package, you should consumes the two AppStudio nuget packages also. After that rebuild the project to check if it helps.

    Actually, I think it's not something about using nuget package explorer, the cause of the issue is when building your HamburgerMenuSearch project, the vs doesn't copy the referenced assembly to output.

    I'm not sure if there is one option to help this situation.(I hope it exists) I'm still researching this topic. And hope the temporary workaround can help. 

    Looking forward to your reply.

    Best Regards

    Lance


    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.

    Monday, May 27, 2019 10:03 AM
  • Hi, thanks for the reply I hope I can make this to work someday. So that my useful libraries will be there for the future... Thank s

    <g class="gr_ gr_15 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="15" id="15">maxe</g>




    • Edited by maze4 Sunday, June 2, 2019 2:32 PM
    Sunday, June 2, 2019 2:31 PM