microsoft / Quantum

Microsoft Quantum Development Kit Samples
https://docs.microsoft.com/quantum
MIT License
3.86k stars 918 forks source link

Issue adding Microsoft.Quantum.Canon NuGet package to UWP project #83

Closed rickengle closed 5 years ago

rickengle commented 5 years ago

Hi, while I could add the Microsoft.Quantum.Development.Kit NuGet package to my Windows 10 C# UWP project, when I tried to add the Microsoft.Quantum.Canon package as well I got this issue:

Severity Code Description Project File Line Suppression State Error NU1202 Package Microsoft.Quantum.Canon 0.2.1809.701-preview is not compatible with uap10.0.15063 (UAP,Version=v10.0.15063). Package Microsoft.Quantum.Canon 0.2.1809.701-preview supports: netstandard2.0 (.NETStandard,Version=v2.0)

Do you have some UWP compatible packages? I don't want to be limited to a C# Console app as the host app.

Thanks, Rick

alan-geller commented 5 years ago

We build the libraries with .NET Core to make sure they work cross-platform. According to https://docs.microsoft.com/en-us/dotnet/standard/net-standard, you should be able to use any .NET Framework version 4.6.1 or higher with the Canon package. I know we use 4.6.1 for unit testing in some cases.

If that doesn't work, you might want to take a look at the H2SimulationGUI sample, https://github.com/Microsoft/Quantum/tree/master/Samples/H2SimulationGUI. That uses Electron to put a nice user interface around the quantum app.

I hope this helps!

RolfHuisman commented 5 years ago

You need to switch the minimum supported version to "build 16299", because there support for dotnetstandard 2.0 was introduced to UAP. Seee https://github.com/dotnet/standard/issues/462 for more information.

In order to use .NET Standard 2.0 in UWP, you need to target Fall Creators Update (FCU) as the minimum version of your UWP project. That’s because .NET Standard 2.0 contains many APIs that require FCU to make them work in the context of the UWP execution environment, specifically AppContainer.