Closed NicolasCalvi closed 4 years ago
I've published an update to the Microsoft.Windows.MixedReality.DotNetWinRT package which should resolve this, by adding support for the Windows APIs used by the Azure Spatial Anchors scripts: https://www.nuget.org/packages/Microsoft.Windows.MixedReality.DotNetWinRT/0.5.1045
If you'd prefer to continue using the built-in .NET projection for these APIs instead of Microsoft.Windows.MixedReality.DotNetWinRT, you can update the scripts to qualify references to Windows.*
with global::Windows.*
.
Thanks for the fix @dfields-msft! The fix is now out in MRTK 2.3.0, which you can download here: https://github.com/Microsoft/MixedRealityToolkit-Unity/releases
You can David's update to MRTK's DotNetWinRT dependency version in this PR.
They are a namespace conflict between MRTK2 and Azure Spatial Anchors SDK on UWP target. In the ".\Assets\AzureSpatialAnchors.SDK\Scripts\SpatialAnchorManager.cs" file we have at line 320 and 321 a reference of "Windows.Perception.Spatial.SpatialPerceptionAccessStatus" object in UWP framework. But, when we build, the compilator replace "Windows.Perception.Spatial.SpatialPerceptionAccessStatus" by "Micorosoft.Windows.Perception.Spatial.SpatialPerceptionAccessStatus".
The "Micorosoft.Windows.Perception.Spatial" in MRTK hide the "Windows.Perception.Spatial" in UWP.
Separetly this two SDK works fine.
Errors generated :
"Assets\AzureSpatialAnchors.SDK\Scripts\SpatialAnchorManager.cs(320,44): error CS0234: The type or namespace name 'SpatialPerceptionAccessStatus' does not exist in the namespace 'Microsoft.Windows.Perception.Spatial' (are you missing an assembly reference?)"
"Assets\AzureSpatialAnchors.SDK\Scripts\SpatialAnchorManager.cs(320,95): error CS0234: The type or namespace name 'SpatialAnchorExporter' does not exist in the namespace 'Microsoft.Windows.Perception.Spatial' (are you missing an assembly reference?)"
"Assets\AzureSpatialAnchors.SDK\Scripts\SpatialAnchorManager.cs(321,50): error CS0234: The type or namespace name 'SpatialPerceptionAccessStatus' does not exist in the namespace 'Microsoft.Windows.Perception.Spatial' (are you missing an assembly reference?)"
I find a interesting case, with the MRTK 2.1, the both SDK can compile together. The problem is with the MRTK 2.2.
Issu open on MRTK git too : https://github.com/microsoft/MixedRealityToolkit-Unity/issues/7191