Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NuGet package does not support UAP #44

Closed
zirkelc opened this issue Jul 25, 2016 · 7 comments
Closed

NuGet package does not support UAP #44

zirkelc opened this issue Jul 25, 2016 · 7 comments

Comments

@zirkelc
Copy link

zirkelc commented Jul 25, 2016

I tried to install the NuGet package in my UAP app but I get the following errors form the packagaing manager console:

Install-Package : QRCoder 1.1.9 is not compatible with UAP,Version=v10.0.
In Zeile:1 Zeichen:1

  • Install-Package QRCoder
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

Install-Package : Some packages are not compatible with UAP,Version=v10.0.
In Zeile:1 Zeichen:1

  • Install-Package QRCoder
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

Install-Package : QRCoder 1.1.9 is not compatible with UAP,Version=v10.0 (win10-arm).
In Zeile:1 Zeichen:1

  • Install-Package QRCoder
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

Install-Package : Some packages are not compatible with UAP,Version=v10.0 (win10-arm).
In Zeile:1 Zeichen:1

  • Install-Package QRCoder
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

Install-Package : QRCoder 1.1.9 is not compatible with UAP,Version=v10.0 (win10-arm-aot).
In Zeile:1 Zeichen:1

  • Install-Package QRCoder
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

Install-Package : Some packages are not compatible with UAP,Version=v10.0 (win10-arm-aot).
In Zeile:1 Zeichen:1

  • Install-Package QRCoder
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

Install-Package : QRCoder 1.1.9 is not compatible with UAP,Version=v10.0 (win10-x64).
In Zeile:1 Zeichen:1

  • Install-Package QRCoder
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

Install-Package : Some packages are not compatible with UAP,Version=v10.0 (win10-x64).
In Zeile:1 Zeichen:1

  • Install-Package QRCoder
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

Install-Package : QRCoder 1.1.9 is not compatible with UAP,Version=v10.0 (win10-x64-aot).
In Zeile:1 Zeichen:1

  • Install-Package QRCoder
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

Install-Package : Some packages are not compatible with UAP,Version=v10.0 (win10-x64-aot).
In Zeile:1 Zeichen:1

  • Install-Package QRCoder
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

Install-Package : QRCoder 1.1.9 is not compatible with UAP,Version=v10.0 (win10-x86).
In Zeile:1 Zeichen:1

  • Install-Package QRCoder
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

Install-Package : Some packages are not compatible with UAP,Version=v10.0 (win10-x86).
In Zeile:1 Zeichen:1

  • Install-Package QRCoder
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

Install-Package : QRCoder 1.1.9 is not compatible with UAP,Version=v10.0 (win10-x86-aot).
In Zeile:1 Zeichen:1

  • Install-Package QRCoder
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

Install-Package : Some packages are not compatible with UAP,Version=v10.0 (win10-x86-aot).
In Zeile:1 Zeichen:1

  • Install-Package QRCoder
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

Paketwiederherstellungsfehler für "TempCheckPiUI".
Install-Package : Fehler bei der Paketwiederherstellung. Es wird ein Rollback der Paketänderungen für "TempCheckPiUI" ausgeführt.
In Zeile:1 Zeichen:1

  • Install-Package QRCoder
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

I could try to insert the code directly in my project but I would prefer to have the official package.

@codebude
Copy link
Owner

codebude commented Sep 8, 2016

The problem is, that QRCoder library targets the .NET-Framework. Those type of lib isn't supported by UWP apps. To use it in UWP context, I had to convert the QRCoder library to a PCL (Portable class library) which targets the .NET-Core framework. From my codebase this would be no problem, because all functions used in QRCoder should be also available in .NET Core.

But when doing so, I would lose backwards compatibility, because PCLs work in the classic .NET world only with .NET 4 (with updates) and newer.

So one solution would be to clone this project and open a new development tree where QRCoder is compiled as PCL. The I would add a second Nuget package (e.g. "QRCoder PCL") which could be used by UWP programmers, etc..

But then I had to manage changes in two code bases, so let me think a day or two if there isn't a better solution.

Maybe one of the other QRCoder users has a better idea?

@stevehansen
Copy link

https://github.com/JamesNK/Newtonsoft.Json has been doing this forever. The trick is to create the project file yourself so that they both (PCL/Full .NET) point to the same files on your file system.

In the https://github.com/JamesNK/Newtonsoft.Json/tree/master/Src/Newtonsoft.Json folder you can see the multiple .csproj files.

@codebude
Copy link
Owner

codebude commented Sep 8, 2016

Hey @stevehansen - thanks for your input. This looks like a good solution. One more question: Do you also know, if it is possible, to deliver both library versions in one Nuget package? (Hereby I don't mean that both dlls will be referenced when installing the Nuget package, but that both are in Nuget package, so that Visual Studio can decide which one to reference, when installing the package.)

@stevehansen
Copy link

Absolutely possible, NuGet works by checking the lib subfolders for certain named frameworks so that only those files are referenced depending on the current project in Visual Studio.

I did this myself for a simple class library:
https://github.com/stevehansen/csv/blob/master/Csv/Csv.nuspec

<files> <file src="..\Csv\bin\Release\Csv.dll" target="lib\portable-net45+win\Csv.dll" /> <file src="..\Csv\bin\Release\Csv.xml" target="lib\portable-net45+win\Csv.xml" /> <file src="..\Csv\bin\Release\Csv.dll" target="lib\dotnet\Csv.dll" /> <file src="..\Csv\bin\Release\Csv.xml" target="lib\dotnet\Csv.xml" /> </files>

The different possible names are defined on the NuGet documentation: https://docs.nuget.org/create/targetframeworks

So after the 2 projects are build you could have them copied to lib\net45 for full .NET framework and to lib\dotnet to support .NET core.

@codebude
Copy link
Owner

codebude commented Sep 8, 2016

That's perfect! Since I let build the solution automatically (triggered by Giothub commits) via MyGet (which also is used for publishing the "major versions" to NuGet), I only have to rewrite my build.bat and then UWP support will be given.

@codebude
Copy link
Owner

codebude commented Sep 9, 2016

Hi @stevehansen seems like I was a little bit to optimistic. QRCoder won't compile as PCL because it uses classes from the System.Drawing namespace (for the QRCode generation) which aren't available in PCL libraries.

So do I really have to open a new development tree for each targeting platform with their platform dependent solution? I'm not adavanced in multiple platform development. Can anybody point me into the right direction?

@codebude
Copy link
Owner

codebude commented Sep 10, 2016

Added PCL support (and an UWP demo app) in the PR: #49

@chriszirkel could you please test if the current version (1.2.1) on NuGet works with your project?
@stevehansen Thanks again, for you support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants