Skip to content

Commit

Permalink
Updated min and target SDKs and removed redundant conditional executi…
Browse files Browse the repository at this point in the history
…on paths.

Removed any WinJS reference.
  • Loading branch information
azchohfi committed Sep 17, 2020
1 parent 0e2d49f commit bc141e1
Show file tree
Hide file tree
Showing 106 changed files with 258 additions and 1,516 deletions.
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
<IsUwpProject Condition="'$(IsDesignProject)' != 'true'">$(MSBuildProjectName.Contains('Uwp'))</IsUwpProject>
<IsSampleProject>$(MSBuildProjectName.Contains('Sample'))</IsSampleProject>
<DefaultTargetPlatformVersion>18362</DefaultTargetPlatformVersion>
<DefaultTargetPlatformMinVersion>16299</DefaultTargetPlatformMinVersion>
<DefaultTargetPlatformVersion>19041</DefaultTargetPlatformVersion>
<DefaultTargetPlatformMinVersion>17763</DefaultTargetPlatformMinVersion>
<PackageOutputPath>$(MSBuildThisFileDirectory)bin\nupkg</PackageOutputPath>
</PropertyGroup>

Expand Down
5 changes: 1 addition & 4 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<Choose>
<When Condition="'$(TargetFramework)' == 'uap10.0' or '$(TargetFramework)' == 'uap10.0.16299' or '$(TargetFramework)' == 'native' or '$(TargetFramework)' == 'net461'">
<When Condition="'$(TargetFramework)' == 'uap10.0' or '$(TargetFramework)' == 'uap10.0.17763' or '$(TargetFramework)' == 'native' or '$(TargetFramework)' == 'net461'">
<!-- UAP versions for uap10.0 where TPMV isn't implied -->
<PropertyGroup>
<TargetPlatformVersion>10.0.$(DefaultTargetPlatformVersion).0</TargetPlatformVersion>
Expand All @@ -15,9 +15,6 @@
<SDKReference Condition="'$(UseWindowsDesktopSdk)' == 'true' " Include="WindowsDesktop, Version=$(TargetPlatformVersion)">
<Name>Windows Desktop Extensions for the UWP</Name>
</SDKReference>
<SDKReference Condition="'$(UseWindowsMobileSdk)' == 'true' " Include="WindowsMobile, Version=$(TargetPlatformVersion)">
<Name>Windows Mobile Extensions for the UWP</Name>
</SDKReference>
</ItemGroup>
</When>
</Choose>
Expand Down
2 changes: 1 addition & 1 deletion GazeInputTest/GazeInputTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<AssemblyName>GazeInputTest</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.18362.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
Expand Down
8 changes: 4 additions & 4 deletions Microsoft.Toolkit.Services/Microsoft.Toolkit.Services.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="MSBuild.Sdk.Extras">

<PropertyGroup>
<TargetFrameworks>uap10.0.16299;netstandard2.0;NET462</TargetFrameworks>
<TargetFrameworks>uap10.0.17763;netstandard2.0;NET462</TargetFrameworks>
<Title>Windows Community Toolkit .NET Standard Services</Title>
<Description>
This .NET standard library enables access to different data sources such as Microsoft Graph, OneDrive, Twitter, Microsoft Translator, and LinkedIn. It is part of the Windows Community Toolkit.
Expand All @@ -12,7 +12,7 @@
<DeterministicSourcePaths Condition="'$(EnableSourceLink)' == ''">false</DeterministicSourcePaths>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.16299'">
<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.17763'">
<DefineConstants Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">$(DefineConstants);WINRT</DefineConstants>
</PropertyGroup>

Expand All @@ -31,7 +31,7 @@
<PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='uap10.0.16299'">
<ItemGroup Condition="'$(TargetFramework)'=='uap10.0.17763'">
<ProjectReference Include="..\Microsoft.Toolkit.Uwp\Microsoft.Toolkit.Uwp.csproj" />
</ItemGroup>

Expand All @@ -47,7 +47,7 @@
<PackageReference Include="Microsoft.Toolkit.Forms.UI.Controls.WebView" Version="[5.0.0-preview.gb86cb1c4cb,)" />
</ItemGroup>

<ItemGroup Condition="!('$(TargetFramework)'=='uap10.0.16299')">
<ItemGroup Condition="!('$(TargetFramework)'=='uap10.0.17763')">
<Compile Remove="PlatformSpecific\Uwp\**\*" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using Windows.Devices.Bluetooth;
using Windows.Devices.Bluetooth.Advertisement;
using Windows.Devices.Enumeration;
using Windows.Foundation.Metadata;
using Windows.System;

namespace Microsoft.Toolkit.Uwp.Connectivity
Expand All @@ -27,11 +26,6 @@ public class BluetoothLEHelper
/// </summary>
private const string BluetoothLeDeviceWatcherAqs = "(System.Devices.Aep.ProtocolId:=\"{bb7bb05e-5972-42b5-94fc-76eaa7084d49}\")";

/// <summary>
/// Gets a value indicating whether the Bluetooth LE Helper is supported
/// </summary>
private static bool? _isBluetoothLESupported = null;

/// <summary>
/// We need to cache all DeviceInformation objects we get as they may
/// get updated in the future. The update may make them eligible to be put on
Expand Down Expand Up @@ -82,12 +76,6 @@ private BluetoothLEHelper(DispatcherQueue dispatcherQueue = null)
/// </summary>
public static BluetoothLEHelper Context { get; } = new BluetoothLEHelper();

/// <summary>
/// Gets a value indicating whether the Bluetooth LE Helper is supported.
/// </summary>
public static bool IsBluetoothLESupported => (bool)(_isBluetoothLESupported ??
(_isBluetoothLESupported = ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 4)));

/// <summary>
/// Gets the list of available bluetooth devices
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="MSBuild.Sdk.Extras">

<PropertyGroup>
<TargetFramework>uap10.0.16299</TargetFramework>
<TargetFramework>uap10.0.17763</TargetFramework>
<Title>Windows Community Toolkit Devices</Title>
<Description>This library enables easier consumption of connectivity Devices/Peripherals and handle its connection to Windows devices. It contains BluetoothLE and Network connectivity helpers.</Description>
<PackageTags>UWP Toolkit Windows Devices Bluetooth BluetoothLE BLE Networking</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="MSBuild.Sdk.Extras">

<PropertyGroup>
<TargetFramework>uap10.0.16299</TargetFramework>
<TargetFramework>uap10.0.17763</TargetFramework>
<Title>Windows Community Toolkit Developer Tools</Title>
<Description>This library provides XAML user controls and services to help developers build their app. It is part of the Windows Community Toolkit.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<AppContainerApplication>true</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<ProjectName>Microsoft.Toolkit.Uwp.Input.GazeInteraction</ProjectName>
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Description>
Generate tile, toast, and badge notifications for Windows 10 via code, with the help of IntelliSense.
Adds Support for adaptive tiles and adaptive/interactive toasts for Windows 10. It is part of the Windows Community Toolkit.
Supports C# and C++ UWP project types (see Microsoft.Toolkit.Uwp.Notifications.JavaScript for the JS version).
Supports C# and C++ UWP project types.
Also works with C# portable class libraries and non-UWP C# projects like server projects.
This project contains outputs for netstandard1.4, uap10.0 and native for WinRT.
</Description>
Expand Down Expand Up @@ -65,7 +65,7 @@
<NugetTargetMoniker Condition="'$(DesignTimeBuild)' == 'true'">native</NugetTargetMoniker>
<NugetTargetMoniker Condition="'$(DesignTimeBuild)' != 'true'">UAP,Version=v10.0</NugetTargetMoniker>
<PackageTargetFallback>uap10.0</PackageTargetFallback>
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == '' ">10.0.18362.0</TargetPlatformVersion>
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion Condition="'$(TargetPlatformMinVersion)' == '' ">10.0.10240.0</TargetPlatformMinVersion>
<DefineConstants Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">$(DefineConstants);NETFX_CORE;WINDOWS_UWP;WINRT</DefineConstants>
<CopyLocalLockFileAssemblies Condition="'$(CopyLocalLockFileAssemblies)' == ''">false</CopyLocalLockFileAssemblies>
Expand Down
14 changes: 4 additions & 10 deletions Microsoft.Toolkit.Uwp.Notifications/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,16 @@ Any code for generating notifications should be written in the Microsoft.Toolkit
If there's UWP-specific code, use the appropriate `#ifdef`, `WINDOWS_UWP` or `WINRT`.

## What are all the projects for?
There's two notification projects...
- Microsoft.Toolkit.Uwp.Notifications
- Microsoft.Toolkit.Uwp.Notifications.JavaScript
All the code is contained on the Microsoft.Toolkit.Uwp.Notifications project.

The first project is where all the code is contained.
It outputs `netstandard1.4`, `uap10.0`, `native` for WinRT, and netcoreapp for .Net Core projects. The UWP library is only for C#, while the WinRT library is a Windows Runtime Component for C++.

The JavaScript project is just for packaging the `WinMD` to work for WinJS projects.


The first project contains outputs for `netstandard1.4`, `uap10.0` and a `native` for WinRT. The UWP library is only for C#, while the WinRT library is a Windows Runtime Component for JavaScript and C++.


| C# | JavaScript/C++ |
| C# | C++ |
| ---------------- | ------------------- |
| NET Standard 1.4 | UWP WinRT Component |
| UWP C# DLL | |
| .Net Core DLL | |



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<AssemblyName>Microsoft.Toolkit.Uwp.SampleApp</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
Expand Down Expand Up @@ -412,10 +412,7 @@
<Content Include="SamplePages\Incremental Loading Collection\IncrementalLoadingCollectionCode.bind" />
<Content Include="SamplePages\ImageCache\ImageCacheCode.bind" />
<Content Include="SamplePages\DropShadowPanel\DropShadowPanelXaml.bind" />
<Content Include="SamplePages\LiveTile\LiveTileCodeJavaScript.bind" />
<Content Include="SamplePages\Toast\ToastCodeJavaScript.bind" />
<Content Include="SamplePages\Object Storage\ObjectStorageCode.bind" />
<Content Include="SamplePages\WeatherLiveTileAndToast\WeatherLiveTileAndToastCodeJavaScript.bind" />
<Content Include="SamplePages\BackgroundTaskHelper\BackgroundTaskHelperCode.bind" />
<Content Include="SamplePages\MasterDetailsView\MasterDetailsView.bind" />
<Content Include="SamplePages\NetworkHelper\NetworkHelperCode.bind" />
Expand Down
15 changes: 0 additions & 15 deletions Microsoft.Toolkit.Uwp.SampleApp/Models/Sample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ public string CodeUrl

public string CodeFile { get; set; }

public string JavaScriptCodeFile { get; set; }

public string XamlCodeFile { get; set; }

public bool DisableXamlEditorRendering { get; set; }
Expand All @@ -163,8 +161,6 @@ public string CodeUrl

public bool HasCSharpCode => !string.IsNullOrEmpty(CodeFile);

public bool HasJavaScriptCode => !string.IsNullOrEmpty(JavaScriptCodeFile);

public bool HasDocumentation => !string.IsNullOrEmpty(DocumentationUrl);

public bool IsSupported
Expand All @@ -191,17 +187,6 @@ public async Task<string> GetCSharpSourceAsync()
}
}

public async Task<string> GetJavaScriptSourceAsync()
{
using (var codeStream = await StreamHelper.GetPackagedFileStreamAsync(JavaScriptCodeFile.StartsWith('/') ? JavaScriptCodeFile : $"SamplePages/{Name}/{JavaScriptCodeFile}"))
{
using (var streamReader = new StreamReader(codeStream.AsStream()))
{
return await streamReader.ReadToEndAsync();
}
}
}

#pragma warning disable SA1009 // Doesn't like ValueTuples.
public async Task<(string contents, string path)> GetDocumentationAsync()
#pragma warning restore SA1009 // Doesn't like ValueTuples.
Expand Down
6 changes: 0 additions & 6 deletions Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,6 @@
IsFocusEngagementEnabled="False" />
</PivotItem>

<PivotItem x:Name="JavaScriptPivotItem"
Padding="0, 10,0,0"
Header="Javascript">
<controlsLocal:CodeRenderer x:Name="JavaScriptCodeRenderer" />
</PivotItem>

<PivotItem x:Name="DocumentationPivotItem"
Padding="0, 10,0,0"
Header="Documentation">
Expand Down
16 changes: 0 additions & 16 deletions Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,6 @@ protected override async void OnNavigatedTo(NavigationEventArgs e)
InfoAreaPivot.Items.Add(CSharpPivotItem);
}

if (CurrentSample.HasJavaScriptCode)
{
var code = await CurrentSample.GetJavaScriptSourceAsync();

JavaScriptCodeRenderer.SetCode(code, "js");
InfoAreaPivot.Items.Add(JavaScriptPivotItem);
}

if (CurrentSample.HasDocumentation)
{
#pragma warning disable SA1008 // Opening parenthesis must be spaced correctly
Expand Down Expand Up @@ -421,14 +413,6 @@ private async void InfoAreaPivot_OnSelectionChanged(object sender, SelectionChan

return;
}

if (CurrentSample.HasJavaScriptCode && InfoAreaPivot.SelectedItem == JavaScriptPivotItem)
{
var code = await CurrentSample.GetJavaScriptSourceAsync();
JavaScriptCodeRenderer.SetCode(code, "js");

return;
}
}

private async void XamlCodeEditor_UpdateRequested(object sender, EventArgs e)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
// Get a local copy of the context for easier reading
BluetoothLEHelper bluetoothLEHelper = BluetoothLEHelper.Context;

// check if BluetoothLE APIs are available
if (BluetoothLEHelper.IsBluetoothLESupported)
{
// Start the Enumeration
bluetoothLEHelper.StartEnumeration();
// Start the Enumeration
bluetoothLEHelper.StartEnumeration();

// At this point the user needs to select a device they want to connect to. This can be done by
// creating a ListView and binding the bluetoothLEHelper collection to it. Once a device is found,
// the Connect() method can be called to connect to the device and start interacting with its services
// At this point the user needs to select a device they want to connect to. This can be done by
// creating a ListView and binding the bluetoothLEHelper collection to it. Once a device is found,
// the Connect() method can be called to connect to the device and start interacting with its services

// Connect to a device if your choice
ObservableBluetoothLEDevice device = bluetoothLEHelper.BluetoothLeDevices[<Device you choose>];
await device.ConnectAsync();
// Connect to a device if your choice
ObservableBluetoothLEDevice device = bluetoothLEHelper.BluetoothLeDevices[<Device you choose>];
await device.ConnectAsync();

// At this point the device is connected and the Services property is populated.
// At this point the device is connected and the Services property is populated.

// See all the services
var services = device.Services;
}
// See all the services
var services = device.Services;
Loading

0 comments on commit bc141e1

Please sign in to comment.