Skip to content

Commit cdd5d26

Browse files
committed
Remove netstandard2.0 support, part 1
1 parent e4dbed2 commit cdd5d26

File tree

7 files changed

+5
-77
lines changed

7 files changed

+5
-77
lines changed

src/Iot.Device.Bindings.SkiaSharpAdapter/Iot.Device.Bindings.SkiaSharpAdapter.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0</TargetFrameworks>
55
<LangVersion>10</LangVersion>
66
<Nullable>enable</Nullable>
77
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

src/Iot.Device.Bindings/Iot.Device.Bindings.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0</TargetFrameworks>
55
<LangVersion>10</LangVersion>
66
<Nullable>enable</Nullable>
77
<DefineConstants>$(DefineConstants);BUILDING_IOT_DEVICE_BINDINGS</DefineConstants>
@@ -41,9 +41,6 @@
4141
<!-- This package is only used for windows specific stuff. -->
4242
<PackageReference Include="System.Drawing.Common" Version="$(SystemDrawingCommonPackageVersion)" />
4343
</ItemGroup>
44-
<ItemGroup Condition="$(TargetFramework) == 'netstandard2.0'">
45-
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
46-
</ItemGroup>
4744
<ItemGroup>
4845
<EmbeddedResource Include="../devices/CharacterLcd/BigFontMap.txt" />
4946
<EmbeddedResource Include="../devices/BuildHat/data/firmware.bin" />
Lines changed: 1 addition & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
4-
<TargetFrameworks Condition="$(NETCoreSdkRuntimeIdentifier.StartsWith('win'))">$(TargetFrameworks);net6.0-windows10.0.17763.0</TargetFrameworks>
3+
<TargetFrameworks>net6.0;</TargetFrameworks>
54
<LangVersion>10</LangVersion>
65
<Nullable>enable</Nullable>
76
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -10,66 +9,10 @@
109
</PropertyGroup>
1110

1211
<ItemGroup>
13-
<Compile Remove="winmd\**" />
14-
<EmbeddedResource Remove="winmd\**" />
15-
<None Remove="winmd\**" />
16-
<None Include="buildTransitive\net5.0\System.Device.Gpio.targets" Pack="true" PackagePath="\buildTransitive\net5.0" />
1712
<PackageReference Include="Microsoft.DotNet.GenAPI" Version="$(MicrosoftDotNetGenApiPackageVersion)">
1813
<PrivateAssets>all</PrivateAssets>
1914
</PackageReference>
2015
<Content Include="$(RepoRoot)README-nuget.md" Pack="true" Visible="false" PackagePath="\README.md" />
2116
</ItemGroup>
2217

23-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
24-
<PackageReference Include="Microsoft.Win32.Registry" Version="$(MicrosoftWin32RegistryPackageVersion)" /> <!-- This is Windows specific -->
25-
<PackageReference Include="System.Memory" Version="$(SystemMemoryPackageVersion)" />
26-
<PackageReference Include="System.Runtime.WindowsRuntime" Version="$(SystemRuntimeWindowsRuntimePackageVersion)" />
27-
<PackageReference Include="System.Runtime.InteropServices.WindowsRuntime" Version="$(SystemRuntimeInteropServicesWindowsRuntimePackageVersion)" />
28-
<PackageReference Include="System.Threading.Tasks.Extensions" Version="$(SystemThreadingTasksExtensionsPackageVersion)" />
29-
30-
<Reference Include="Windows.Devices.DevicesLowLevelContract">
31-
<HintPath>winmd\Windows.Devices.DevicesLowLevelContract.winmd</HintPath>
32-
<IsWinMDFile>true</IsWinMDFile>
33-
</Reference>
34-
<Reference Include="Windows.Foundation.FoundationContract">
35-
<HintPath>winmd\Windows.Foundation.FoundationContract.winmd</HintPath>
36-
<IsWinMDFile>true</IsWinMDFile>
37-
</Reference>
38-
<Reference Include="Windows.Foundation.UniversalApiContract">
39-
<HintPath>winmd\Windows.Foundation.UniversalApiContract.winmd</HintPath>
40-
<IsWinMDFile>true</IsWinMDFile>
41-
</Reference>
42-
</ItemGroup>
43-
44-
<ItemGroup Condition="'$(TargetFramework)' != 'net6.0'">
45-
<!--Remove the Linux-specific code-->
46-
<Compile Remove="System\Device\Gpio\Drivers\Windows10Driver.notSupported.cs" />
47-
<Compile Remove="System\Device\I2c\I2cDevice.nonWindows.cs" />
48-
<Compile Remove="System\Device\I2c\I2cBus.nonWindows.cs" />
49-
<Compile Remove="System\Device\Pwm\PwmChannel.nonWindows.cs" />
50-
<Compile Remove="System\Device\Spi\SpiDevice.nonWindows.cs" />
51-
<Compile Remove="System\Device\CommonHelpers.cs" />
52-
</ItemGroup>
53-
54-
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
55-
<!--Remove Windows Code-->
56-
<Compile Remove="Interop\Windows\WinRT\*.cs" />
57-
<Compile Remove="System\Device\Gpio\Drivers\Windows10DriverPin.cs" />
58-
<Compile Remove="System\Device\Gpio\Drivers\Windows10Driver.cs" />
59-
<Compile Remove="System\Device\I2c\Devices\Windows10I2cBus.cs" />
60-
<Compile Remove="System\Device\I2c\Devices\Windows10I2cDevice.cs" />
61-
<Compile Remove="System\Device\I2c\Devices\Windows10I2cBusDevice.cs" />
62-
<Compile Remove="System\Device\Pwm\Channels\Windows10PwmChannel.cs" />
63-
<Compile Remove="System\Device\Spi\Devices\Windows10SpiDevice.cs" />
64-
<Compile Remove="System\Device\I2c\I2cDevice.Windows.cs" />
65-
<Compile Remove="System\Device\I2c\I2cBus.Windows.cs" />
66-
<Compile Remove="System\Device\Pwm\PwmChannel.Windows.cs" />
67-
<Compile Remove="System\Device\Spi\SpiDevice.Windows.cs" />
68-
69-
</ItemGroup>
70-
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
71-
<!-- Need this for record support in older runtimes -->
72-
<Compile Remove="System\Device\IsExternalInit.cs" />
73-
</ItemGroup>
74-
7518
</Project>

src/devices/Common/Common.csproj

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,4 @@
2525
<!-- The following is supported on windows only. We need it to take screenshots under windows -->
2626
<PackageReference Include="System.Drawing.Common" Version="$(SystemDrawingCommonPackageVersion)" />
2727
</ItemGroup>
28-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
29-
<Compile Include="FrameworkCompatibilityExtensions.cs" />
30-
</ItemGroup>
31-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
32-
<Compile Include="IsExternalInit.cs" />
33-
</ItemGroup>
34-
<ItemGroup Condition="$(TargetFramework) == 'netstandard2.0'">
35-
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
36-
</ItemGroup>
3728
</Project>

src/devices/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<PropertyGroup>
55
<!-- Most projects should use this value to build for all possible target frameworks -->
6-
<DefaultBindingTfms>net6.0;netstandard2.0;</DefaultBindingTfms>
6+
<DefaultBindingTfms>net6.0;</DefaultBindingTfms>
77
<DefaultSampleTfms>net6.0</DefaultSampleTfms>
88
<DefaultTestTfms>net6.0</DefaultTestTfms>
99
<NoWarn>$(NoWarn);CS8321</NoWarn>

src/devices/Nmea0183/Nmea0183.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
<ProjectReference Include="..\Rtc\Rtc.csproj" />
2121
<PackageReference Include="Microsoft.Extensions.Logging" Version="$(MicrosoftExtensionsLoggingPackageVersion)" />
2222
</ItemGroup>
23-
<ItemGroup Condition="$(TargetFramework) == 'netstandard2.0'">
24-
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
25-
</ItemGroup>
2623
<!-- Make the internal classes visible to the unit test assembly -->
2724
<ItemGroup>
2825
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
4+
<TargetFrameworks>$(DefaultBindingTfms)</TargetFrameworks>
55
</PropertyGroup>
66

77
</Project>

0 commit comments

Comments
 (0)