Skip to content

Commit 9291da6

Browse files
authored
feat: targetframework to netstandard2.0 (#150)
1 parent 72588e7 commit 9291da6

File tree

7 files changed

+90
-92
lines changed

7 files changed

+90
-92
lines changed

AsyncAPI.sln

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ EndProject
1212
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DE167614-5BCB-4046-BD4C-ABB70E9F3462}"
1313
ProjectSection(SolutionItems) = preProject
1414
.editorconfig = .editorconfig
15+
Common.Build.props = Common.Build.props
1516
EndProjectSection
1617
EndProject
17-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LEGO.AsyncAPI.Bindings", "src\LEGO.AsyncAPI.Bindings\LEGO.AsyncAPI.Bindings.csproj", "{33CA31F4-ECFE-4227-BFE9-F49783DD29A0}"
18+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LEGO.AsyncAPI.Bindings", "src\LEGO.AsyncAPI.Bindings\LEGO.AsyncAPI.Bindings.csproj", "{33CA31F4-ECFE-4227-BFE9-F49783DD29A0}"
1819
EndProject
1920
Global
2021
GlobalSection(SolutionConfigurationPlatforms) = preSolution

Common.Build.props

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Project>
2+
<!-- Common Properties used by all assemblies -->
3+
<PropertyGroup>
4+
<LangVersion>10</LangVersion>
5+
<TargetFramework>netstandard2.0</TargetFramework>
6+
<ImplicitUsings>disable</ImplicitUsings>
7+
<Company>The LEGO Group</Company>
8+
<PackageProjectUrl>https://github.com/LEGO/AsyncAPI.NET</PackageProjectUrl>
9+
<PackageReadmeFile>README.md</PackageReadmeFile>
10+
<RepositoryUrl>https://github.com/LEGO/AsyncAPI.NET</RepositoryUrl>
11+
<PackageTags>asyncapi .net openapi documentation</PackageTags>
12+
</PropertyGroup>
13+
</Project>

src/LEGO.AsyncAPI.Bindings/BindingsCollection.cs

+9-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,15 @@ public static TCollection Add<TCollection, TItem>(
1919
IEnumerable<TItem> source)
2020
where TCollection : ICollection<TItem>
2121
{
22-
ArgumentNullException.ThrowIfNull(destination);
23-
ArgumentNullException.ThrowIfNull(source);
22+
if (destination == null)
23+
{
24+
throw new ArgumentNullException(nameof(destination));
25+
}
26+
27+
if (source == null)
28+
{
29+
throw new ArgumentNullException(nameof(source));
30+
}
2431

2532
if (destination is List<TItem> list)
2633
{

src/LEGO.AsyncAPI.Bindings/LEGO.AsyncAPI.Bindings.csproj

+6-15
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
2-
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="../../Common.Build.props"/>
33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
5-
<ImplicitUsings>disable</ImplicitUsings>
6-
<Company>The LEGO Group</Company>
7-
<PackageProjectUrl>https://github.com/LEGO/AsyncAPI.NET</PackageProjectUrl>
8-
<PackageReadmeFile>README.md</PackageReadmeFile>
9-
<Description>AsyncAPI.NET Bindings</Description>
10-
<PackageTags>asyncapi .net openapi documentation</PackageTags>
11-
<PackageId>AsyncAPI.NET.Bindings</PackageId>
12-
<AssemblyName>LEGO.AsyncAPI.Bindings</AssemblyName>
13-
<RootNamespace>LEGO.AsyncAPI.Bindings</RootNamespace>
14-
<RepositoryUrl>https://github.com/LEGO/AsyncAPI.NET</RepositoryUrl>
4+
<Description>AsyncAPI.NET Bindings</Description>
5+
<PackageId>AsyncAPI.NET.Bindings</PackageId>
6+
<AssemblyName>LEGO.AsyncAPI.Bindings</AssemblyName>
7+
<RootNamespace>LEGO.AsyncAPI.Bindings</RootNamespace>
158
</PropertyGroup>
16-
17-
189
<ItemGroup>
1910
<None Remove="stylecop.json" />
2011
</ItemGroup>

src/LEGO.AsyncAPI.Readers/LEGO.AsyncAPI.Readers.csproj

+5-12
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
2+
<Import Project="../../Common.Build.props"/>
33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
5-
<ImplicitUsings>disable</ImplicitUsings>
64
<Nullable>disable</Nullable>
7-
<Company>The LEGO Group</Company>
8-
<PackageProjectUrl>https://github.com/LEGO/AsyncAPI.NET</PackageProjectUrl>
9-
<PackageReadmeFile>README.md</PackageReadmeFile>
10-
<Description>AsyncAPI.NET Readers for JSON and YAML documents</Description>
11-
<PackageTags>asyncapi .net openapi documentation</PackageTags>
12-
<PackageId>AsyncAPI.NET.Readers</PackageId>
13-
<AssemblyName>LEGO.AsyncAPI.Readers</AssemblyName>
14-
<RootNamespace>LEGO.AsyncAPI.Readers</RootNamespace>
15-
<RepositoryUrl>https://github.com/LEGO/AsyncAPI.NET</RepositoryUrl>
5+
<Description>AsyncAPI.NET Readers for JSON and YAML documents</Description>
6+
<PackageId>AsyncAPI.NET.Readers</PackageId>
7+
<AssemblyName>LEGO.AsyncAPI.Readers</AssemblyName>
8+
<RootNamespace>LEGO.AsyncAPI.Readers</RootNamespace>
169
</PropertyGroup>
1710

1811
<ItemGroup>

src/LEGO.AsyncAPI/LEGO.AsyncAPI.csproj

+6-13
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
2+
<Import Project="../../Common.Build.props"/>
33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
5-
<ImplicitUsings>disable</ImplicitUsings>
6-
<Company>The LEGO Group</Company>
7-
<PackageProjectUrl>https://github.com/LEGO/AsyncAPI.NET</PackageProjectUrl>
8-
<PackageReadmeFile>README.md</PackageReadmeFile>
9-
<Description>AsyncAPI.NET models</Description>
10-
<PackageTags>asyncapi .net openapi documentation</PackageTags>
11-
<PackageId>AsyncAPI.NET</PackageId>
12-
<AssemblyName>LEGO.AsyncAPI</AssemblyName>
13-
<RootNamespace>LEGO.AsyncAPI</RootNamespace>
14-
<RepositoryUrl>https://github.com/LEGO/AsyncAPI.NET</RepositoryUrl>
4+
<Description>AsyncAPI.NET models</Description>
5+
<PackageId>AsyncAPI.NET</PackageId>
6+
<AssemblyName>LEGO.AsyncAPI</AssemblyName>
7+
<RootNamespace>LEGO.AsyncAPI</RootNamespace>
158
</PropertyGroup>
16-
179
<ItemGroup>
1810
<None Remove="stylecop.json" />
1911
</ItemGroup>
@@ -27,6 +19,7 @@
2719
<PrivateAssets>all</PrivateAssets>
2820
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2921
</PackageReference>
22+
<PackageReference Include="System.Text.Json" Version="8.0.2" />
3023

3124
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
3225
<_Parameter1>$(MSBuildProjectName).Tests</_Parameter1>
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
5-
<ImplicitUsings>disable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
3+
<PropertyGroup>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<ImplicitUsings>disable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
<IsPackable>false</IsPackable>
8+
<NoWarn>$(NoWarn);SA1600</NoWarn>
9+
</PropertyGroup>
710

8-
<IsPackable>false</IsPackable>
9-
</PropertyGroup>
11+
<ItemGroup>
12+
<PackageReference Include="FluentAssertions" Version="6.7.0" />
13+
<PackageReference Include="LiquidTestReports.Markdown" Version="1.0.9" />
14+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
15+
<PackageReference Include="JsonSchema.Net" Version="2.0.1" />
16+
<PackageReference Include="NUnit" Version="3.13.2" />
17+
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
18+
<PackageReference Include="coverlet.collector" Version="3.1.2">
19+
<PrivateAssets>all</PrivateAssets>
20+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
21+
</PackageReference>
22+
<PackageReference Include="ReportGenerator" Version="5.1.2" />
23+
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
24+
<PrivateAssets>all</PrivateAssets>
25+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
26+
</PackageReference>
27+
</ItemGroup>
1028

11-
<ItemGroup>
12-
<PackageReference Include="FluentAssertions" Version="6.7.0" />
13-
<PackageReference Include="LiquidTestReports.Markdown" Version="1.0.9" />
14-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
15-
<PackageReference Include="JsonSchema.Net" Version="2.0.1" />
16-
<PackageReference Include="NUnit" Version="3.13.2" />
17-
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
18-
<PackageReference Include="coverlet.collector" Version="3.1.2">
19-
<PrivateAssets>all</PrivateAssets>
20-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
21-
</PackageReference>
22-
<PackageReference Include="ReportGenerator" Version="5.1.2" />
23-
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
24-
<PrivateAssets>all</PrivateAssets>
25-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
26-
</PackageReference>
27-
</ItemGroup>
29+
<ItemGroup>
30+
<ProjectReference Include="..\..\src\LEGO.AsyncAPI.Bindings\LEGO.AsyncAPI.Bindings.csproj" />
31+
<ProjectReference Include="..\..\src\LEGO.AsyncAPI.Readers\LEGO.AsyncAPI.Readers.csproj" />
32+
<ProjectReference Include="..\..\src\LEGO.AsyncAPI\LEGO.AsyncAPI.csproj" />
33+
</ItemGroup>
2834

29-
<ItemGroup>
30-
<ProjectReference Include="..\..\src\LEGO.AsyncAPI.Bindings\LEGO.AsyncAPI.Bindings.csproj" />
31-
<ProjectReference Include="..\..\src\LEGO.AsyncAPI.Readers\LEGO.AsyncAPI.Readers.csproj" />
32-
<ProjectReference Include="..\..\src\LEGO.AsyncAPI\LEGO.AsyncAPI.csproj" />
33-
</ItemGroup>
34-
35-
<ItemGroup>
36-
<None Remove="readers\Basic.yaml" />
37-
</ItemGroup>
38-
<ItemGroup>
39-
<None Remove="readers\samples\AsyncApi\AsyncApiChannelObject\Basic.yaml" />
40-
<None Remove="readers\samples\AsyncApi\AsyncApiInfoObject\Advanced.yaml" />
41-
<None Remove="readers\samples\AsyncApi\AsyncApiInfoObject\Basic.yaml" />
42-
<None Remove="readers\samples\AsyncApi\Basic.yaml" />
43-
<None Remove="readers\samples\AsyncApi\schema-v2.3.0.json" />
44-
<None Remove="stylecop.json" />
45-
</ItemGroup>
46-
<ItemGroup>
47-
<AdditionalFiles Include="stylecop.json" />
48-
</ItemGroup>
49-
<ItemGroup>
50-
<Folder Include="Attributes\" />
51-
</ItemGroup>
52-
<ItemGroup>
53-
<None Include="..\..\.editorconfig" Link=".editorconfig" />
54-
</ItemGroup>
35+
<ItemGroup>
36+
<None Remove="readers\Basic.yaml" />
37+
</ItemGroup>
38+
<ItemGroup>
39+
<None Remove="readers\samples\AsyncApi\AsyncApiChannelObject\Basic.yaml" />
40+
<None Remove="readers\samples\AsyncApi\AsyncApiInfoObject\Advanced.yaml" />
41+
<None Remove="readers\samples\AsyncApi\AsyncApiInfoObject\Basic.yaml" />
42+
<None Remove="readers\samples\AsyncApi\Basic.yaml" />
43+
<None Remove="readers\samples\AsyncApi\schema-v2.3.0.json" />
44+
<None Remove="stylecop.json" />
45+
</ItemGroup>
46+
<ItemGroup>
47+
<AdditionalFiles Include="stylecop.json" />
48+
</ItemGroup>
49+
<ItemGroup>
50+
<Folder Include="Attributes\" />
51+
</ItemGroup>
52+
<ItemGroup>
53+
<None Include="..\..\.editorconfig" Link=".editorconfig" />
54+
</ItemGroup>
5555
</Project>

0 commit comments

Comments
 (0)