Windowstemplatestudio: Can not deploy app to the store - bluetooth?!

Created on 4 Aug 2017  路  21Comments  路  Source: microsoft/WindowsTemplateStudio

Did a release build and .NET Native threw errors

1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0005: Type 'Windows.Devices.Bluetooth.BluetoothAdapter' was not included in compilation, but was referenced in type 'Microsoft.Toolkit.Uwp.BluetoothLEHelper'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0005: Type 'Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceServicesResult' was not included in compilation, but was referenced in type 'Microsoft.Toolkit.Uwp.ObservableBluetoothLEDevice'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0005: Type 'Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristicsResult' was not included in compilation, but was referenced in method 'ObservableGattDeviceService.<GetAllCharacteristics>b__21_0()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0003: Method 'BluetoothLEHelper.IsPeripheralRoleSupported.get()' will always throw an exception due to the missing method 'BluetoothAdapter.get_IsPeripheralRoleSupported()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0003: Method 'BluetoothLEHelper.IsCentralRoleSupported.get()' will always throw an exception due to the missing method 'BluetoothAdapter.get_IsCentralRoleSupported()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0005: Type 'Windows.Devices.Bluetooth.GenericAttributeProfile.GattProtocolError' was not included in compilation, but was referenced in method 'GattProtocolErrorParser.GetErrorString(Nullable<byte>)'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0003: Method 'GattProtocolErrorParser.GetErrorString(Nullable<byte>)' will always throw an exception due to the missing method 'GattProtocolError.get_AttributeNotFound()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0003: Method 'BluetoothLEHelper.<Init>d__27.MoveNext()' will always throw an exception due to the missing method 'BluetoothAdapter.GetDefaultAsync()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0003: Method 'ObservableBluetoothLEDevice.<<ConnectAsync>b__42_0>d.MoveNext()' will always throw an exception due to the missing method 'GattDeviceServicesResult.get_Status()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0003: Method 'ObservableGattDeviceService.<GetAllCharacteristics>d__21.MoveNext()' will always throw an exception due to the missing method 'GattCharacteristicsResult.get_Status()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0005: Type 'Windows.UI.Text.TextDecorations' was not included in compilation, but was referenced in method 'XamlRenderer.RenderStrikethroughRun(InlineCollection, StrikethroughTextInline, XamlRenderer.RenderContext)'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : ILT0021: Could not resolve method 'Windows.Foundation.IAsyncOperation<$ILT$FakeType1_Windows_Devices_Bluetooth_GenericAttributeProfile_GattDeviceServicesResult> Windows.Devices.Bluetooth.BluetoothLEDevice.GetGattServicesAsync(Windows.Devices.Bluetooth.BluetoothCacheMode)'
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Type 'Windows.Devices.Bluetooth.BluetoothAdapter' was not included in compilation, but was referenced in type 'Microsoft.Toolkit.Uwp.BluetoothLEHelper'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Type 'Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceServicesResult' was not included in compilation, but was referenced in type 'Microsoft.Toolkit.Uwp.ObservableBluetoothLEDevice'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Type 'Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristicsResult' was not included in compilation, but was referenced in method 'ObservableGattDeviceService.<GetAllCharacteristics>b__21_0()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Method 'BluetoothLEHelper.IsPeripheralRoleSupported.get()' will always throw an exception due to the missing method 'BluetoothAdapter.get_IsPeripheralRoleSupported()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Method 'BluetoothLEHelper.IsCentralRoleSupported.get()' will always throw an exception due to the missing method 'BluetoothAdapter.get_IsCentralRoleSupported()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Type 'Windows.Devices.Bluetooth.GenericAttributeProfile.GattProtocolError' was not included in compilation, but was referenced in method 'GattProtocolErrorParser.GetErrorString(Nullable<byte>)'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Method 'GattProtocolErrorParser.GetErrorString(Nullable<byte>)' will always throw an exception due to the missing method 'GattProtocolError.get_AttributeNotFound()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Method 'BluetoothLEHelper.<Init>d__27.MoveNext()' will always throw an exception due to the missing method 'BluetoothAdapter.GetDefaultAsync()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Method 'ObservableBluetoothLEDevice.<<ConnectAsync>b__42_0>d.MoveNext()' will always throw an exception due to the missing method 'GattDeviceServicesResult.get_Status()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Method 'ObservableGattDeviceService.<GetAllCharacteristics>d__21.MoveNext()' will always throw an exception due to the missing method 'GattCharacteristicsResult.get_Status()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Type 'Windows.UI.Text.TextDecorations' was not included in compilation, but was referenced in method 'XamlRenderer.RenderStrikethroughRun(InlineCollection, StrikethroughTextInline, XamlRenderer.RenderContext)'. There may have been a missing assembly.

System

  • VS Version:
  • WTS Wizard Version:
  • WTS Template Version:
  • Windows Build:
external-issue

Most helpful comment

Thank you for the support guys, this project is much better than Template10.

All 21 comments

me looking at that, it looks like it is the UWP Community Toolkit. @nmetulev ideas?

Template Studio itself take no dependency on Bluetooth or that item inside the toolkit. WIthout seeing the project, it is hard to debug with just that

I can prepare solution for test, but it is clean empty project with three text boxes.

So it wasn't generated by template studio?

This is that solution, it was created using

  • Visual Studio Ent 15.2.26430.16
  • UWP SDK version 10.0.14393
  • Template Studio 1.2.17198.1

Trogon.CarId.zip

Whole error during creation of Store package:

Restoring NuGet packages...
To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.'
1>------ Build started: Project: Trogon.CarId, Configuration: Release x86 ------
1>  Trogon.CarId -> C:\Users\Dev\documents\visual studio 2017\Projects\Trogon.CarId\Trogon.CarId\bin\x86\Release\Trogon.CarId.exe
1>  Starting .NET Native compilation
1>  Processing application code
1>C:\Users\Dev\documents\visual studio 2017\Projects\Trogon.CarId\Trogon.CarId\Resources.System.Linq.Expressions.rd.xml(35): warning : ILTransform_0027: Method 'CreateLambda' within 'System.Linq.Expressions.Expression' could not be found.
1>C:\Users\Dev\documents\visual studio 2017\Projects\Trogon.CarId\Trogon.CarId\Resources.System.Linq.Expressions.rd.xml(91): warning : ILTransform_0027: Method 'ParameterIsAssignable' within 'System.Linq.Expressions.Expression' could not be found.
1>  Computing application closure and generating interop code
1>  Generating serialization code
1>  Compiling interop code
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0005: Type 'Windows.Devices.Bluetooth.BluetoothAdapter' was not included in compilation, but was referenced in type 'Microsoft.Toolkit.Uwp.BluetoothLEHelper'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0005: Type 'Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceServicesResult' was not included in compilation, but was referenced in type 'Microsoft.Toolkit.Uwp.ObservableBluetoothLEDevice'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0005: Type 'Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristicsResult' was not included in compilation, but was referenced in method 'ObservableGattDeviceService.<GetAllCharacteristics>b__21_0()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0003: Method 'BluetoothLEHelper.IsPeripheralRoleSupported.get()' will always throw an exception due to the missing method 'BluetoothAdapter.get_IsPeripheralRoleSupported()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0003: Method 'BluetoothLEHelper.IsCentralRoleSupported.get()' will always throw an exception due to the missing method 'BluetoothAdapter.get_IsCentralRoleSupported()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0005: Type 'Windows.Devices.Bluetooth.GenericAttributeProfile.GattProtocolError' was not included in compilation, but was referenced in method 'GattProtocolErrorParser.GetErrorString(Nullable<byte>)'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0003: Method 'GattProtocolErrorParser.GetErrorString(Nullable<byte>)' will always throw an exception due to the missing method 'GattProtocolError.get_AttributeNotFound()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0003: Method 'BluetoothLEHelper.<Init>d__27.MoveNext()' will always throw an exception due to the missing method 'BluetoothAdapter.GetDefaultAsync()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0003: Method 'ObservableBluetoothLEDevice.<<ConnectAsync>b__42_0>d.MoveNext()' will always throw an exception due to the missing method 'GattDeviceServicesResult.get_Status()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0003: Method 'ObservableGattDeviceService.<GetAllCharacteristics>d__21.MoveNext()' will always throw an exception due to the missing method 'GattCharacteristicsResult.get_Status()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): warning : ILTransform_0005: Type 'Windows.UI.Text.TextDecorations' was not included in compilation, but was referenced in method 'XamlRenderer.RenderStrikethroughRun(InlineCollection, StrikethroughTextInline, XamlRenderer.RenderContext)'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : ILT0021: Could not resolve method 'Windows.Foundation.IAsyncOperation<$ILT$FakeType1_Windows_Devices_Bluetooth_GenericAttributeProfile_GattDeviceServicesResult> Windows.Devices.Bluetooth.BluetoothLEDevice.GetGattServicesAsync(Windows.Devices.Bluetooth.BluetoothCacheMode)'
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Type 'Windows.Devices.Bluetooth.BluetoothAdapter' was not included in compilation, but was referenced in type 'Microsoft.Toolkit.Uwp.BluetoothLEHelper'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Type 'Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceServicesResult' was not included in compilation, but was referenced in type 'Microsoft.Toolkit.Uwp.ObservableBluetoothLEDevice'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Type 'Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristicsResult' was not included in compilation, but was referenced in method 'ObservableGattDeviceService.<GetAllCharacteristics>b__21_0()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Method 'BluetoothLEHelper.IsPeripheralRoleSupported.get()' will always throw an exception due to the missing method 'BluetoothAdapter.get_IsPeripheralRoleSupported()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Method 'BluetoothLEHelper.IsCentralRoleSupported.get()' will always throw an exception due to the missing method 'BluetoothAdapter.get_IsCentralRoleSupported()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Type 'Windows.Devices.Bluetooth.GenericAttributeProfile.GattProtocolError' was not included in compilation, but was referenced in method 'GattProtocolErrorParser.GetErrorString(Nullable<byte>)'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Method 'GattProtocolErrorParser.GetErrorString(Nullable<byte>)' will always throw an exception due to the missing method 'GattProtocolError.get_AttributeNotFound()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Method 'BluetoothLEHelper.<Init>d__27.MoveNext()' will always throw an exception due to the missing method 'BluetoothAdapter.GetDefaultAsync()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Method 'ObservableBluetoothLEDevice.<<ConnectAsync>b__42_0>d.MoveNext()' will always throw an exception due to the missing method 'GattDeviceServicesResult.get_Status()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Method 'ObservableGattDeviceService.<GetAllCharacteristics>d__21.MoveNext()' will always throw an exception due to the missing method 'GattCharacteristicsResult.get_Status()'. There may have been a missing assembly.
1>C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\IlcInternals.targets(936,5): error : Type 'Windows.UI.Text.TextDecorations' was not included in compilation, but was referenced in method 'XamlRenderer.RenderStrikethroughRun(InlineCollection, StrikethroughTextInline, XamlRenderer.RenderContext)'. There may have been a missing assembly.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Package: 0 succeeded, 3 failed ===========

can 100% repro this in your project, i think this is some oddity with .net native. Sync'ing with @shenchauhan and @nmetulev

I can repro this, and I know why this is happening!

The project is targeting 14393 (Anniversary Update), but Windows.Devices.Bluetooth.BluetoothAdapter requires 15063 (Creators Update) as it is stated in the docs

As expected, it worked fine after changing the target version!

image

This is bad then as the entire control package needs that version when it doesn't reference it

But the odd thing here is we can create a project where this doesn't happen targeting 14393

Have you build it in "Release" mode to ensure it uses the .NET Native toolchain?

99% sure

Will test in a few

Ok, new (and better fix): keep the 14393 and just update the nuget packages to the latest!

It works after that! 馃榿

I thought I tried that on their solution and it failed.

Worked fine after I updated all night packages to the latest version.

Got two permutations to work.

Documenting steps:

  • unzipped w/ unblock
  • UWP Nuget 5.2.3 & Toolkit 1.5.0 & target version and min version are 14393 and 10586

    • release & x86 -> does not work

  • UWP Nuget 5.2.3 & Toolkit 1.5.1 & target version and min version are 14393 and 10586

    • release & x86 -> does not work

  • UWP Nuget 5.3.4 & Toolkit 1.5.1 & target version and min version are 14393 and 10586

    • release & x86 -> works

  • UWP Nuget 5.2.3 & Toolkit 1.5.0 & target version and min version are 15086 and 10586

    • release & x86 -> works

@mklemarczyk did you downgrade the platform version? If this was generated with 1.2, it should have had the target version to 15086. Your project shows it was generated with 1.2 as well.

I think we should be updating our packages but as is, this was caused by down leveling the target version. WTS can compile a release version as we generated it.

@crutkas I found that problem in Microsoft.Toolkit.Uwp.UI.Controls. When I removed it everything was fine.
Moreover, upgrade the NuGet packages to fallowing versions fixed that problem:

  • Microsoft.NETCore.UniversalWindowsPlatform: 5.2.3 -> 5.3.3
  • Microsoft.Xaml.Behaviors.Uwp.Managed: 2.0.0
  • Microsoft.Toolkit.Uwp.UI.Controls: 1.5.0 -> 1.5.1
  • Newtonsoft.Json: 10.0.2 -> 10.0.3

Problem occurs only when I build for store. I could use it for testing.
In my opinion Microsoft.Toolkit.Uwp.UI.Controls have some hidden dependencies to Microsoft.NETCore.UniversalWindowsPlatform but no one listed it in NuGet package.

It would be a good for project to create a test with all template features that process Store Build.

@mklemarczyk, we are resolving this issue in next release of the toolkit by moving APIs such as Bluetooth to new packages and requiring dependency to 5.3.3 or higher: https://github.com/Microsoft/UWPCommunityToolkit/pull/1377

Thank you for the support guys, this project is much better than Template10.

Was this page helpful?
0 / 5 - 0 ratings