Skip to content

Commit bd7bd27

Browse files
authored
Rework project to use SDK style (#351)
***NO_CI***
1 parent d9d3a76 commit bd7bd27

File tree

9 files changed

+23
-220
lines changed

9 files changed

+23
-220
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ PublishScripts/
152152

153153
# NuGet Packages
154154
*.nupkg
155+
*.snupkg
155156
# The packages folder can be ignored because of Package Restore
156157
**/packages/*
157158
# except build/, which is used as an MSBuild target.

USB Test App WPF/App.config

-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
</startup>
66
<runtime>
77
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
8-
<dependentAssembly>
9-
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
10-
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1"/>
11-
</dependentAssembly>
128
</assemblyBinding>
139
</runtime>
1410
</configuration>

azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ steps:
161161
inputs:
162162
solution: '$(solution)'
163163
platform: '$(buildPlatform)'
164-
msbuildArgs: '-p:PublicRelease=true -t:pack'
164+
msbuildArgs: '-p:PublicRelease=true -t:build,pack'
165165
configuration: '$(buildConfiguration)'
166166

167167
# we don't have tests (yet)

nanoFramework.Tools.DebugLibrary.Net/Properties/AssemblyInfo.cs

-19
This file was deleted.

nanoFramework.Tools.DebugLibrary.Net/app.config

-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup>
44
<runtime>
55
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
6-
<dependentAssembly>
7-
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
8-
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1"/>
9-
</dependentAssembly>
106
</assemblyBinding>
117
</runtime>
128
</configuration>
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
42
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{101D57AD-D22F-4905-A992-DE15E723F164}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>nanoFramework.Tools.Debugger</RootNamespace>
11-
<AssemblyName>nanoFramework.Tools.Debugger.Net</AssemblyName>
12-
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
15-
<NuGetPackageImportStamp>
16-
</NuGetPackageImportStamp>
17-
<TargetFrameworkProfile />
18-
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
3+
<OutputType>library</OutputType>
4+
<TargetFrameworks>net6.0;net472</TargetFrameworks>
5+
<PlatformTarget>anycpu</PlatformTarget>
6+
<PackageOutputPath>../</PackageOutputPath>
7+
<LangVersion>latest</LangVersion>
198
<EmbedUntrackedSources>true</EmbedUntrackedSources>
209
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2110
<Deterministic>true</Deterministic>
@@ -26,35 +15,22 @@
2615
<!-- need this here to rebuild the packages.lock.json file in case the hashes fail to validate -->
2716
<!-- <DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder> -->
2817
</PropertyGroup>
18+
2919
<PropertyGroup>
3020
<PackageId>nanoFramework.Tools.Debugger.Net</PackageId>
3121
<Authors>nanoframework</Authors>
3222
<Product>.NET nanoFramework debug library (.NET)</Product>
3323
<Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>
34-
<Company>.NET nanoFramework</Company>
3524
<RepositoryType>git</RepositoryType>
25+
<PackageIcon>images\nf-logo.png</PackageIcon>
3626
<RepositoryUrl>https://github.com/nanoframework/nf-debugger</RepositoryUrl>
3727
<PackageProjectUrl>https://github.com/nanoframework/nf-debugger</PackageProjectUrl>
38-
<PackageIconUrl>
39-
</PackageIconUrl>
4028
<Description>This .NET library provides a debug client for .NET nanoFramework devices using USB or Serial connection to a board.</Description>
41-
<PackageTags>nanoFramework C# csharp netmf netnf</PackageTags>
29+
<PackageTags>nanoFramework;C#;csharp;netmf;netnf;nanoframework;iot</PackageTags>
4230
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
4331
<PackageIcon>images\nf-logo.png</PackageIcon>
4432
<PackageReadmeFile>README.md</PackageReadmeFile>
4533
</PropertyGroup>
46-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
47-
<DebugSymbols>true</DebugSymbols>
48-
<DebugType>full</DebugType>
49-
<Optimize>false</Optimize>
50-
<OutputPath>bin\Debug\</OutputPath>
51-
<DefineConstants>DEBUG;TRACE</DefineConstants>
52-
<ErrorReport>prompt</ErrorReport>
53-
<WarningLevel>4</WarningLevel>
54-
<PlatformTarget>AnyCPU</PlatformTarget>
55-
<LangVersion>default</LangVersion>
56-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
57-
</PropertyGroup>
5834
<ItemGroup>
5935
<None Include="..\README.md">
6036
<Pack>True</Pack>
@@ -70,48 +46,27 @@
7046
</PackagePath>
7147
</None>
7248
</ItemGroup>
73-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
74-
<DebugType>portable</DebugType>
75-
<DebugSymbols>true</DebugSymbols>
76-
<Optimize>true</Optimize>
77-
<OutputPath>bin\Release\</OutputPath>
78-
<DefineConstants>TRACE</DefineConstants>
79-
<ErrorReport>prompt</ErrorReport>
80-
<WarningLevel>4</WarningLevel>
81-
<PlatformTarget>AnyCPU</PlatformTarget>
82-
<LangVersion>default</LangVersion>
83-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
84-
</PropertyGroup>
8549
<PropertyGroup>
8650
<SignAssembly>true</SignAssembly>
8751
</PropertyGroup>
8852
<PropertyGroup>
8953
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
54+
<AutoGenerateBindingRedirects>True</AutoGenerateBindingRedirects>
55+
<GenerateDocumentationFile>True</GenerateDocumentationFile>
56+
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
57+
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
9058
</PropertyGroup>
91-
<ItemGroup>
92-
<Reference Include="PresentationFramework" />
93-
<Reference Include="Microsoft.CSharp" />
94-
<Reference Include="System" />
95-
<Reference Include="System.ComponentModel.DataAnnotations" />
96-
<Reference Include="System.Runtime" />
97-
<Reference Include="System.Runtime.Serialization" />
98-
</ItemGroup>
99-
<ItemGroup>
100-
<Compile Include="BinaryFormatter.cs" />
101-
<Compile Include="PortDefinitions\PortBase.cs" />
102-
<Compile Include="Properties\AssemblyInfo.cs" />
103-
</ItemGroup>
10459
<ItemGroup>
10560
<None Include="app.config" />
10661
<None Include="key.snk" />
107-
<None Include="packages.lock.json" />
10862
</ItemGroup>
10963
<ItemGroup>
11064
<PackageReference Include="Fody">
11165
<Version>4.2.1</Version>
11266
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
11367
<PrivateAssets>all</PrivateAssets>
11468
</PackageReference>
69+
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="6.0.0" />
11570
<PackageReference Include="Microsoft.SourceLink.GitHub">
11671
<Version>1.1.1</Version>
11772
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
@@ -130,25 +85,15 @@
13085
<PackageReference Include="Polly">
13186
<Version>7.2.3</Version>
13287
</PackageReference>
133-
<PackageReference Include="Polly.Contrib.WaitAndRetry">
134-
<Version>1.1.1</Version>
135-
</PackageReference>
13688
<PackageReference Include="PropertyChanged.Fody">
13789
<Version>2.6.1</Version>
13890
</PackageReference>
13991
<PackageReference Include="System.IO.Ports">
14092
<Version>6.0.0</Version>
14193
</PackageReference>
142-
<PackageReference Include="System.Threading.Tasks.Extensions">
143-
<Version>4.5.4</Version>
144-
</PackageReference>
145-
<PackageReference Include="System.ValueTuple">
146-
<Version>4.5.0</Version>
147-
</PackageReference>
14894
</ItemGroup>
14995
<ItemGroup>
15096
<Content Include="FodyWeavers.xml" />
15197
</ItemGroup>
15298
<Import Project="..\nanoFramework.Tools.DebugLibrary.Shared\nanoFramework.Tools.DebugLibrary.Net.projitems" Label="Shared" />
153-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
15499
</Project>

nanoFramework.Tools.DebugLibrary.Net/packages.lock.json

-116
This file was deleted.

nanoFramework.Tools.Debugger.sln

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debug Components", "Debug C
77
EndProject
88
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "nanoFramework.Tools.DebugLibrary.Shared", "nanoFramework.Tools.DebugLibrary.Shared\nanoFramework.Tools.DebugLibrary.Shared.shproj", "{31472CAE-4B1A-4AB9-9B2A-8F28DBE01BCF}"
99
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nanoFramework.Tools.DebugLibrary.Net", "nanoFramework.Tools.DebugLibrary.Net\nanoFramework.Tools.DebugLibrary.Net.csproj", "{101D57AD-D22F-4905-A992-DE15E723F164}"
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nanoFramework.Tools.DebugLibrary.Net", "nanoFramework.Tools.DebugLibrary.Net\nanoFramework.Tools.DebugLibrary.Net.csproj", "{101D57AD-D22F-4905-A992-DE15E723F164}"
1111
EndProject
1212
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test Apps", "Test Apps", "{4BB47DB4-92A3-4DE9-81C0-462373258F49}"
1313
EndProject
@@ -21,10 +21,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2121
EndProjectSection
2222
EndProject
2323
Global
24-
GlobalSection(SharedMSBuildProjectFiles) = preSolution
25-
nanoFramework.Tools.DebugLibrary.Shared\nanoFramework.Tools.DebugLibrary.Net.projitems*{101d57ad-d22f-4905-a992-de15e723f164}*SharedItemsImports = 4
26-
nanoFramework.Tools.DebugLibrary.Shared\nanoFramework.Tools.DebugLibrary.Net.projitems*{31472cae-4b1a-4ab9-9b2a-8f28dbe01bcf}*SharedItemsImports = 13
27-
EndGlobalSection
2824
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2925
Debug|Any CPU = Debug|Any CPU
3026
Debug|ARM = Debug|ARM
@@ -77,4 +73,8 @@ Global
7773
GlobalSection(ExtensibilityGlobals) = postSolution
7874
SolutionGuid = {0E005ECA-A03A-4A11-BB97-0C89AEC45CF3}
7975
EndGlobalSection
76+
GlobalSection(SharedMSBuildProjectFiles) = preSolution
77+
nanoFramework.Tools.DebugLibrary.Shared\nanoFramework.Tools.DebugLibrary.Net.projitems*{101d57ad-d22f-4905-a992-de15e723f164}*SharedItemsImports = 5
78+
nanoFramework.Tools.DebugLibrary.Shared\nanoFramework.Tools.DebugLibrary.Net.projitems*{31472cae-4b1a-4ab9-9b2a-8f28dbe01bcf}*SharedItemsImports = 13
79+
EndGlobalSection
8080
EndGlobal

version.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
3-
"version": "2.3",
3+
"version": "2.4",
44
"assemblyVersion": {
55
"precision": "minor"
66
},
@@ -9,7 +9,7 @@
99
"semVer": 2
1010
},
1111
"publicReleaseRefSpec": [
12-
"^$",
12+
"^$"
1313
],
1414
"cloudBuild": {
1515
"setVersionVariables": true,

0 commit comments

Comments
 (0)