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

Internalize WinRT dependency & re-release CLI as a net6.0 only #180

Open
tthiery opened this issue Oct 31, 2021 · 1 comment
Open

Internalize WinRT dependency & re-release CLI as a net6.0 only #180

tthiery opened this issue Oct 31, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@tthiery
Copy link
Member

tthiery commented Oct 31, 2021

The packaging issue of the CsWinRT project seem to be resolved with the .NET 6 release wave. There is a diff showing the expected behavior.

@tthiery tthiery added the enhancement New feature or request label Oct 31, 2021
@tthiery tthiery added this to the v5.0 (breaking) milestone Oct 31, 2021
@tthiery tthiery changed the title Internalize WinRT dependency & re-release CLI as a net5.0 only Internalize WinRT dependency & re-release CLI as a net6.0 only Nov 2, 2021
@tthiery
Copy link
Member Author

tthiery commented Jan 3, 2024

When using the CsWinRTEmbedded option I need to specify the types used (directly and indirectly). Unfortunately, this does not end well dependency-wise.

  <PropertyGroup>
    <CsWinRTIncludes>
      Windows.Foundation;
      Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisement
      Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementWatcher;
      Windows.Devices.Bluetooth.Advertisement.BluetoothLEScanningMode;
      Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementReceivedEventArgs;
      Windows.Devices.Bluetooth.Advertisement.IBluetoothLEAdvertisement
      Windows.Devices.Bluetooth.Advertisement.IBluetoothLEAdvertisementBytePattern;
      Windows.Devices.Bluetooth.Advertisement.IBluetoothLEAdvertisementReceivedEventArgs;
      Windows.Devices.Bluetooth.Advertisement.IBluetoothLEAdvertisementPublisher;
      Windows.Devices.Bluetooth.Advertisement.IBluetoothLEAdvertisementWatcher;
      Windows.Devices.Bluetooth.Advertisement.BluetoothLEManufacturerData;
      Windows.Devices.Bluetooth.Advertisement.IBluetoothLEManufacturerData;
      Windows.Devices.Bluetooth.BluetoothLEAppearance;
      Windows.Devices.Bluetooth.BluetoothSignalStrengthFilter;
      Windows.Devices.Bluetooth.BluetoothDeviceId;
      Windows.Devices.Bluetooth.BluetoothLEDevice;
      Windows.Devices.Bluetooth.GenericAttributeProfile;
      Windows.Devices.Bluetooth.BluetoothAddressType;
      Windows.Devices.Bluetooth.BluetoothCacheMode;
      Windows.Devices.Bluetooth.BluetoothConnectionStatus;
      Windows.Devices.Bluetooth.BluetoothError;
      Windows.Devices.Bluetooth.IBluetoothDeviceId;
      Windows.Devices.Bluetooth.IBluetoothLEAppearance;
      Windows.Devices.Bluetooth.IBluetoothSignalStrengthFilter;
      Windows.Devices.Bluetooth.IBluetoothLEDevice;
      Windows.Storage.Streams.IBuffer;
      Windows.Storage.Streams.Buffer;
      Windows.Storage.Streams.IInputStream;
      Windows.Storage.Streams.IOutputStream;
      Windows.Storage.Streams.InputStreamOptions;
      Windows.Storage.Streams.IRandomAccessStream;
      
      Windows.Storage.Streams.IContentTypeProvider;
      Windows.Devices.Enumeration.IDeviceAccessInformation;
      Windows.Devices.Enumeration.DeviceAccessChangedEventArgs;
      Windows.Devices.Enumeration.IDeviceAccessChangedEventArgs;
      Windows.Devices.Enumeration.DeviceAccessStatus;
      Windows.Devices.Enumeration.DeviceAccessInformation;
      Windows.Devices.Enumeration.DeviceClass;
    </CsWinRTIncludes>
    <CsWinRTExcludes>
      Windows.Foundation.Diagnostic;
      Windows.Devices.Bluetooth.IBluetoothLEDevice2;
      Windows.Devices.Bluetooth.IBluetoothLEDevice3;
      Windows.Devices.Bluetooth.IBluetoothLEDevice4;
      Windows.Storage.Streams.IRandomAccessStreamReferenceStatics;
      Windows.Storage.Streams.RandomAccessStreamReference;
      Windows.Foundation.PropertyType;
    </CsWinRTExcludes>
  </PropertyGroup>

With 1 remaining issue which can not be resolved without including the whole rest of WinRT.

CsWinRT\Windows.Devices.Bluetooth.cs(593,52): error CS0234: [..] "DeviceInformation" [..]  "Windows.Devices.Enumeration" [..]

There is a request to exclude members not needed from the projection in this issue in the CsWinRT repo. We may need to wait till this is implemented or another way shows up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant