Skip to content

Commit

Permalink
feat: targetframework to netstandard2.0 (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
ByronMayne authored Mar 14, 2024
1 parent 72588e7 commit 9291da6
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 92 deletions.
3 changes: 2 additions & 1 deletion AsyncAPI.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DE167614-5BCB-4046-BD4C-ABB70E9F3462}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Common.Build.props = Common.Build.props
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LEGO.AsyncAPI.Bindings", "src\LEGO.AsyncAPI.Bindings\LEGO.AsyncAPI.Bindings.csproj", "{33CA31F4-ECFE-4227-BFE9-F49783DD29A0}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LEGO.AsyncAPI.Bindings", "src\LEGO.AsyncAPI.Bindings\LEGO.AsyncAPI.Bindings.csproj", "{33CA31F4-ECFE-4227-BFE9-F49783DD29A0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
13 changes: 13 additions & 0 deletions Common.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project>
<!-- Common Properties used by all assemblies -->
<PropertyGroup>
<LangVersion>10</LangVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Company>The LEGO Group</Company>
<PackageProjectUrl>https://github.com/LEGO/AsyncAPI.NET</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/LEGO/AsyncAPI.NET</RepositoryUrl>
<PackageTags>asyncapi .net openapi documentation</PackageTags>
</PropertyGroup>
</Project>
11 changes: 9 additions & 2 deletions src/LEGO.AsyncAPI.Bindings/BindingsCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@ public static TCollection Add<TCollection, TItem>(
IEnumerable<TItem> source)
where TCollection : ICollection<TItem>
{
ArgumentNullException.ThrowIfNull(destination);
ArgumentNullException.ThrowIfNull(source);
if (destination == null)
{
throw new ArgumentNullException(nameof(destination));
}

if (source == null)
{
throw new ArgumentNullException(nameof(source));
}

if (destination is List<TItem> list)
{
Expand Down
21 changes: 6 additions & 15 deletions src/LEGO.AsyncAPI.Bindings/LEGO.AsyncAPI.Bindings.csproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../Common.Build.props"/>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Company>The LEGO Group</Company>
<PackageProjectUrl>https://github.com/LEGO/AsyncAPI.NET</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Description>AsyncAPI.NET Bindings</Description>
<PackageTags>asyncapi .net openapi documentation</PackageTags>
<PackageId>AsyncAPI.NET.Bindings</PackageId>
<AssemblyName>LEGO.AsyncAPI.Bindings</AssemblyName>
<RootNamespace>LEGO.AsyncAPI.Bindings</RootNamespace>
<RepositoryUrl>https://github.com/LEGO/AsyncAPI.NET</RepositoryUrl>
<Description>AsyncAPI.NET Bindings</Description>
<PackageId>AsyncAPI.NET.Bindings</PackageId>
<AssemblyName>LEGO.AsyncAPI.Bindings</AssemblyName>
<RootNamespace>LEGO.AsyncAPI.Bindings</RootNamespace>
</PropertyGroup>


<ItemGroup>
<None Remove="stylecop.json" />
</ItemGroup>
Expand Down
17 changes: 5 additions & 12 deletions src/LEGO.AsyncAPI.Readers/LEGO.AsyncAPI.Readers.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="../../Common.Build.props"/>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
<Company>The LEGO Group</Company>
<PackageProjectUrl>https://github.com/LEGO/AsyncAPI.NET</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Description>AsyncAPI.NET Readers for JSON and YAML documents</Description>
<PackageTags>asyncapi .net openapi documentation</PackageTags>
<PackageId>AsyncAPI.NET.Readers</PackageId>
<AssemblyName>LEGO.AsyncAPI.Readers</AssemblyName>
<RootNamespace>LEGO.AsyncAPI.Readers</RootNamespace>
<RepositoryUrl>https://github.com/LEGO/AsyncAPI.NET</RepositoryUrl>
<Description>AsyncAPI.NET Readers for JSON and YAML documents</Description>
<PackageId>AsyncAPI.NET.Readers</PackageId>
<AssemblyName>LEGO.AsyncAPI.Readers</AssemblyName>
<RootNamespace>LEGO.AsyncAPI.Readers</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
19 changes: 6 additions & 13 deletions src/LEGO.AsyncAPI/LEGO.AsyncAPI.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="../../Common.Build.props"/>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Company>The LEGO Group</Company>
<PackageProjectUrl>https://github.com/LEGO/AsyncAPI.NET</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Description>AsyncAPI.NET models</Description>
<PackageTags>asyncapi .net openapi documentation</PackageTags>
<PackageId>AsyncAPI.NET</PackageId>
<AssemblyName>LEGO.AsyncAPI</AssemblyName>
<RootNamespace>LEGO.AsyncAPI</RootNamespace>
<RepositoryUrl>https://github.com/LEGO/AsyncAPI.NET</RepositoryUrl>
<Description>AsyncAPI.NET models</Description>
<PackageId>AsyncAPI.NET</PackageId>
<AssemblyName>LEGO.AsyncAPI</AssemblyName>
<RootNamespace>LEGO.AsyncAPI</RootNamespace>
</PropertyGroup>

<ItemGroup>
<None Remove="stylecop.json" />
</ItemGroup>
Expand All @@ -27,6 +19,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Text.Json" Version="8.0.2" />

<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>$(MSBuildProjectName).Tests</_Parameter1>
Expand Down
98 changes: 49 additions & 49 deletions test/LEGO.AsyncAPI.Tests/LEGO.AsyncAPI.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<NoWarn>$(NoWarn);SA1600</NoWarn>
</PropertyGroup>

<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.7.0" />
<PackageReference Include="LiquidTestReports.Markdown" Version="1.0.9" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="JsonSchema.Net" Version="2.0.1" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="ReportGenerator" Version="5.1.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.7.0" />
<PackageReference Include="LiquidTestReports.Markdown" Version="1.0.9" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="JsonSchema.Net" Version="2.0.1" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="ReportGenerator" Version="5.1.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\LEGO.AsyncAPI.Bindings\LEGO.AsyncAPI.Bindings.csproj" />
<ProjectReference Include="..\..\src\LEGO.AsyncAPI.Readers\LEGO.AsyncAPI.Readers.csproj" />
<ProjectReference Include="..\..\src\LEGO.AsyncAPI\LEGO.AsyncAPI.csproj" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\LEGO.AsyncAPI.Bindings\LEGO.AsyncAPI.Bindings.csproj" />
<ProjectReference Include="..\..\src\LEGO.AsyncAPI.Readers\LEGO.AsyncAPI.Readers.csproj" />
<ProjectReference Include="..\..\src\LEGO.AsyncAPI\LEGO.AsyncAPI.csproj" />
</ItemGroup>

<ItemGroup>
<None Remove="readers\Basic.yaml" />
</ItemGroup>
<ItemGroup>
<None Remove="readers\samples\AsyncApi\AsyncApiChannelObject\Basic.yaml" />
<None Remove="readers\samples\AsyncApi\AsyncApiInfoObject\Advanced.yaml" />
<None Remove="readers\samples\AsyncApi\AsyncApiInfoObject\Basic.yaml" />
<None Remove="readers\samples\AsyncApi\Basic.yaml" />
<None Remove="readers\samples\AsyncApi\schema-v2.3.0.json" />
<None Remove="stylecop.json" />
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="stylecop.json" />
</ItemGroup>
<ItemGroup>
<Folder Include="Attributes\" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\.editorconfig" Link=".editorconfig" />
</ItemGroup>
<ItemGroup>
<None Remove="readers\Basic.yaml" />
</ItemGroup>
<ItemGroup>
<None Remove="readers\samples\AsyncApi\AsyncApiChannelObject\Basic.yaml" />
<None Remove="readers\samples\AsyncApi\AsyncApiInfoObject\Advanced.yaml" />
<None Remove="readers\samples\AsyncApi\AsyncApiInfoObject\Basic.yaml" />
<None Remove="readers\samples\AsyncApi\Basic.yaml" />
<None Remove="readers\samples\AsyncApi\schema-v2.3.0.json" />
<None Remove="stylecop.json" />
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="stylecop.json" />
</ItemGroup>
<ItemGroup>
<Folder Include="Attributes\" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\.editorconfig" Link=".editorconfig" />
</ItemGroup>
</Project>

0 comments on commit 9291da6

Please sign in to comment.