Skip to content

Commit 0938ef2

Browse files
committed
Migrate mscorlib to v2
- Update and migrate pipeline files. - Update references. - Bump native assembly version. - Replace SpanByte with Span<byte> or ReadOnlySpan<byte>. - Update license header. - General improvements in IntelliSense comments.
1 parent 4f06982 commit 0938ef2

File tree

10 files changed

+41
-15
lines changed

10 files changed

+41
-15
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright (c) .NET Foundation and Contributors
2+
# See LICENSE file in the project root for full license information.
3+
4+
# This workflow will periodically check .NET nanoFramework dependencies and updates them in the repository it's running.
5+
# Can also be triggered by a repository dispatch event.
6+
7+
name: Update .NET nanoFramework dependencies (develop)
8+
9+
on:
10+
schedule:
11+
# At 00:10 UTC every Mon,Thu.
12+
- cron: '10 00 * * Mon,Thu'
13+
repository_dispatch:
14+
types: update-dependencies
15+
16+
jobs:
17+
update-dependencies:
18+
name: nanoFramework
19+
uses: nanoframework/nf-tools/.github/workflows/update-dependencies.yml@main
20+
secrets: inherit
21+
with:
22+
solutionsToCheck: 'nanoFramework.System.Device.I2s.sln'
23+
previewPackages: true
24+
branchToPr: 'develop'
25+

System.Device.I2s/I2sDevice.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public I2sDevice(I2sConnectionSettings settings)
4545
/// The length of the buffer determines how much data to read from the I2s device.
4646
/// </param>
4747
[MethodImpl(MethodImplOptions.InternalCall)]
48-
public extern void Read(SpanByte buffer);
48+
public extern void Read(Span<byte> buffer);
4949

5050
/// <summary>
5151
/// Writes data to the I2s device.
@@ -55,7 +55,7 @@ public I2sDevice(I2sConnectionSettings settings)
5555
/// The data should not include the I2s device address.
5656
/// </param>
5757
[MethodImpl(MethodImplOptions.InternalCall)]
58-
public extern void Write(SpanByte buffer);
58+
public extern void Write(ReadOnlySpan<byte> buffer);
5959

6060
/// <summary>
6161
/// Creates a communications channel to a device on an I2s bus running on the current platform

System.Device.I2s/Properties/AssemblyInfo.cs

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

1818
////////////////////////////////////////////////////////////////
1919
// update this whenever the native assembly signature changes //
20-
[assembly: AssemblyNativeVersion("100.0.0.1")]
20+
[assembly: AssemblyNativeVersion("100.2.0.0")]
2121
////////////////////////////////////////////////////////////////
2222

2323
// Setting ComVisible to false makes the types in this assembly not visible

System.Device.I2s/System.Device.I2s.nfproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
<ProjectGuid>d74a7890-8a23-417b-ab74-923d57e987ea</ProjectGuid>
1313
<OutputType>Library</OutputType>
1414
<FileAlignment>512</FileAlignment>
15-
<RootNamespace></RootNamespace>
15+
<RootNamespace>
16+
</RootNamespace>
1617
<AssemblyName>System.Device.I2s</AssemblyName>
1718
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
1819
<NF_IsCoreLibrary>True</NF_IsCoreLibrary>
@@ -57,8 +58,8 @@
5758
<Content Include="packages.lock.json" />
5859
</ItemGroup>
5960
<ItemGroup>
60-
<Reference Include="mscorlib, Version=1.17.11.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
61-
<HintPath>..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll</HintPath>
61+
<Reference Include="mscorlib">
62+
<HintPath>..\packages\nanoFramework.CoreLibrary.2.0.0-preview.29\lib\netnano1.0\mscorlib.dll</HintPath>
6263
</Reference>
6364
</ItemGroup>
6465
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />

System.Device.I2s/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="nanoFramework.CoreLibrary" version="1.17.11" targetFramework="netnano1.0" />
3+
<package id="nanoFramework.CoreLibrary" version="2.0.0-preview.29" targetFramework="netnano1.0" />
44
<package id="Nerdbank.GitVersioning" version="3.9.50" developmentDependency="true" targetFramework="netnano1.0" />
55
</packages>

System.Device.I2s/packages.lock.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
".NETnanoFramework,Version=v1.0": {
55
"nanoFramework.CoreLibrary": {
66
"type": "Direct",
7-
"requested": "[1.17.11, 1.17.11]",
8-
"resolved": "1.17.11",
9-
"contentHash": "HezzAc0o2XrSGf85xSeD/6xsO6ohF9hX6/iMQ1IZS6Zw6umr4WfAN2Jv0BrPxkaYwzEegJxxZujkHoUIAqtOMw=="
7+
"requested": "[2.0.0-preview.29, 2.0.0-preview.29]",
8+
"resolved": "2.0.0-preview.29",
9+
"contentHash": "7NDp9Sda9FTFBDN//X34r23rJBHUkCvyGvrFh9s5B8H2nMoet4J0OlEOiZRUsEPBXlsNpZFVp+Cd6OSjnLSg5A=="
1010
},
1111
"Nerdbank.GitVersioning": {
1212
"type": "Direct",

azure-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ steps:
5252
- template: azure-pipelines-templates/class-lib-build.yml@templates
5353
parameters:
5454
sonarCloudProject: 'nanoframework_nanoFramework.System.Device.I2s'
55+
usePreviewBuild: true
5556

5657
# step from template @ nf-tools repo
5758
# report error

nanoFramework.System.Device.I2s.nuspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
33
<metadata>
44
<id>nanoFramework.System.Device.I2s</id>
@@ -19,7 +19,7 @@
1919
This package requires a target with System.Device.I2s v$nativeVersion$ (checksum $checksum$).</description>
2020
<tags>nanoFramework C# csharp netmf netnf System.Device.I2s</tags>
2121
<dependencies>
22-
<dependency id="nanoFramework.CoreLibrary" version="1.17.11" />
22+
<dependency id="nanoFramework.CoreLibrary" version="2.0.0-preview.29" />
2323
</dependencies>
2424
</metadata>
2525
<files>
@@ -33,4 +33,4 @@ This package requires a target with System.Device.I2s v$nativeVersion$ (checksum
3333
<file src="assets\nf-logo.png" target="images" />
3434
<file src="LICENSE.md" target="" />
3535
</files>
36-
</package>
36+
</package>

nanoFramework.System.Device.I2s.sln

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "System.Device.I2s", "System
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0660B91C-D1F7-4940-8BD4-688D84E666D2}"
99
ProjectSection(SolutionItems) = preProject
10-
nanoFramework.System.Device.I2s.DELIVERABLES.nuspec = nanoFramework.System.Device.I2s.DELIVERABLES.nuspec
1110
nanoFramework.System.Device.I2s.nuspec = nanoFramework.System.Device.I2s.nuspec
1211
NuGet.Config = NuGet.Config
1312
version.json = version.json

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
3-
"version": "1.0",
3+
"version": "2.0.0-preview.{height}",
44
"assemblyVersion": {
55
"precision": "build"
66
},

0 commit comments

Comments
 (0)