Skip to content

Commit

Permalink
feat: Upgrade to NetCore 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Kieranties authored Jul 29, 2020
2 parents 1ec91f8 + bd65f97 commit ab7b470
Show file tree
Hide file tree
Showing 15 changed files with 147 additions and 221 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -269,3 +269,4 @@ NDependOut/

# Build artifacts
Test-*.XML
.DS_Store
6 changes: 3 additions & 3 deletions CluedIn.Enricher.KnowledgeGraph.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{7E2E897B-E
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unit", "unit", "{A32B6852-82C7-4107-8C68-AE9232289E09}"
ProjectSection(SolutionItems) = preProject
test\unit\Directory.Build.props = test\unit\Directory.Build.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "integration", "integration", "{DBD1964B-DBD9-4C70-96CA-391C34B3D75F}"
EndProject
Expand All @@ -25,6 +22,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{E1A76004
ProjectSection(SolutionItems) = preProject
azure-pipelines.yml = azure-pipelines.yml
global.json = global.json
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9BD54E81-D9C8-4419-82B8-8EE6CC7E2647}"
Expand All @@ -35,6 +34,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{02641789-0D38-4DBB-9288-23592CF55D25}"
ProjectSection(SolutionItems) = preProject
NuGet.config = NuGet.config
Packages.props = Packages.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Code Style", "Code Style", "{2C3AECCF-DCB5-4ED7-8B7B-8F373EDE3A5E}"
Expand Down
52 changes: 32 additions & 20 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,30 +1,42 @@
<Project>
<PropertyGroup Label="Compilation Metadata">
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<PropertyGroup>
<!-- TODO: Clean up warnings -->
<PropertyGroup Label="Msbuild Handling">
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<NoWarn />
<WarningsAsErrors>CS0105;CS0108;CS0109;CS0114;CS0162;CS0168;CS0169;CS0219;CS0252;CS0414;CS0472;CS0649;CS0652;CS1717;CS1998;CS4014;xUnit1013;MSB3245;MSB3270,NU1602</WarningsAsErrors>
<!--
NU5105 : Semver 2 package version
-->
<NoWarn>$(NoWarn);NU5105</NoWarn>
<ErrorReport>prompt</ErrorReport>
<RunCodeAnalysis>false</RunCodeAnalysis>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net452</TargetFramework>
<PropertyGroup Label="Assembly Metadata">
<AssemblyVersion>$([System.Text.RegularExpressions.Regex]::Match($(Version), '\d+\.\d+').Value)</AssemblyVersion>
<FileVersion>$([System.Text.RegularExpressions.Regex]::Match($(Version), '\d+\.\d+.\d+').Value)</FileVersion>
<Company>CluedIn ApS</Company>
<Copyright>Copyright (c) 2020 $(Company). All rights reserved.</Copyright>
<Product>CluedIn</Product>
<AssemblyTitle>$(MSBuildProjectName)</AssemblyTitle>
<AssemblyName>$(Product).$(AssemblyTitle)</AssemblyName>
<RootNamespace>$(AssemblyName)</RootNamespace>
</PropertyGroup>

<PropertyGroup>
<Company>CluedIn</Company>
<Copyright>Copyright (c) 2019 CluedIn. All rights reserved.</Copyright>

<Description>Internal CluedIn Assembly</Description>

<RepositoryUrl>https://github.com/CluedIn-io/CluedIn.Csharp.Template.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>

<!-- Legacy NuGet symbols format, ref: https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg -->
<SymbolPackageFormat>symbols.nupkg</SymbolPackageFormat>
<IncludeSymbols>true</IncludeSymbols>

<PropertyGroup Label="Package Metadata">
<Title>$(RootNamespace)</Title>
<Authors>$(Company)</Authors>
<!-- TODO: Licensing -->
<!-- <PackageLicenseFile> if not using an open source license should be set to the path of a license _in_ the package -->
<!-- <PackageRequireLicenseAcceptance> should be set to true if a license is included -->
<PackageProjectUrl>http://cluedin.com</PackageProjectUrl>
<PackageIcon>nugetlogo.png</PackageIcon>
</PropertyGroup>
</Project>

<ItemGroup Label="Package Includes">
<None Include="$(MSBuildThisFileDirectory)build\assets\nugetlogo.png" Pack="true" PackagePath="\" />
</ItemGroup>
</Project>
35 changes: 17 additions & 18 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
<Project>
<!-- Ensure the targets for Central package management are imported -->
<Import Project="Sdk.targets" Sdk="Microsoft.Build.CentralPackageVersions"/>

<Target Name="ValidateAssemblyMeta" BeforeTargets="Build">
<Warning Code="CIQ0001" Text="`Product` [$(Product)] must be 'CluedIn'." Condition="'$(Product)' != 'CluedIn'"/>
<Warning Code="CIQ0002" Text="`AssemblyTitle` [$(AssemblyTitle)] must match project name [$(MSBuildProjectName)]." Condition="'$(AssemblyTitle)' != '$(MSBuildProjectName)'"/>
<Warning Code="CIQ0003" Text="`AssemblyName` [$(AssemblyName)] must match `Product.AssemblyTitle` [$(Product).$(AssemblyTitle)]." Condition="'$(AssemblyName)' != '$(Product).$(AssemblyTitle)'"/>
<Warning Code="CIQ0004" Text="`RootNamespace` [$(RootNamespace)] must match `AssemblyName` [$(AssemblyName)]." Condition="'$(RootNamespace)' != '$(AssemblyName)'"/>
</Target>

<ItemGroup>

<!-- De-comment to include GitVersionTask and Microsoft.SourceLink.GitHub dependencies.
Use when the artifact DLLs are to be versioned outside of a Docker container.
<PackageReference Include="GitVersionTask" Version="5.0.0-beta3-4">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-18618-05">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
-->

</ItemGroup>
<Target Name="ValidatePackMeta" BeforeTargets="Pack" Condition="'$(IsPackable)' == 'true'">
<Warning Code="CIQ1001" Text="`PackageId` [$(PackageId)] must match `AssemblyName` [$(AssemblyName)] for packable projects." Condition="'$(PackageId)' != '$(AssemblyName)'"/>
<Warning Code="CIQ1002" Text="`PackageVersion` [$(PackageVersion)] must match `Version` [$(Version)] for packable projects." Condition="'$(PackageVersion)' != '$(Version)'"/>
<Warning Code="CIQ1003" Text="`Authors` [$(Authors)] must match `Company` [$(Company)] for packable projects." Condition="'$(Authors)' != '$(Company)'"/>
<Warning Code="CIQ1004" Text="`Title` [$(Title)] must match `RootNamespace` [$(RootNamespace)] for packable projects." Condition="'$(Title)' != '$(RootNamespace)'"/>
<Warning Code="CIQ1005" Text="`Description` must be provided for packable projects." Condition="'$(Description)' == ''"/>
<Warning Code="CIQ1006" Text="`Copyright` must be provided for packable projects." Condition="'$(Copyright)' == ''"/>
</Target>

</Project>
4 changes: 2 additions & 2 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# GitVersion.yml
mode: ContinuousDelivery
branches: {}
next-version: 3.0
ignore:
sha: []
sha: []
49 changes: 49 additions & 0 deletions Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<Project>
<PropertyGroup Label="Dependency Versions">
<_ComponentHost>2.0.0-alpha-14</_ComponentHost>
<_AutoFixture>4.11.0</_AutoFixture>
<_CluedIn>3.0.0-netcore.*</_CluedIn>
</PropertyGroup>

<ItemGroup>
<!--
Specified versions for dependencies in test projects
MUST SPECIFY IN CSPROJ AS <PackageReference Name="<depName>" />
-->
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Update="AutoFixture.Xunit2" Version="$(_AutoFixture)" />
<PackageReference Update="AutoFixture.Idioms" Version="$(_AutoFixture)" />
<PackageReference Update="AutoFixture.AutoMoq" Version="$(_AutoFixture)" />
<PackageReference Update="coverlet.msbuild" Version="2.8.0" />
<PackageReference Update="Serilog.Sinks.XUnit" Version="1.0.21" />
<PackageReference Update="xunit" Version="2.4.1" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Update="Xunit.SkippableFact" Version="1.3.12" />
<PackageReference Update="Moq" Version="4.13.1" />
<PackageReference Update="Shouldly" Version="3.0.2" />
<!-- <PackageReference Update="CluedIn.Testing.Base" Version="$(_CluedIn)" />-->
</ItemGroup>

<ItemGroup>
<!--
Specified versions for dependencies across the solution
MUST SPECIFY IN CSPROJ AS <PackageReference Name="<depName>" />
-->
<PackageReference Update="CluedIn.Core" Version="$(_CluedIn)" />
<PackageReference Update="CluedIn.ExternalSearch" Version="$(_CluedIn)" />

</ItemGroup>

<ItemGroup Label="Global tools">
<!--
Automatically added to each project with :
- IncludeAssets="Analyzers;Build"
- PrivateAssets="All"
DO NOT NEED TO BE ADDED AS A PACKAGEREFERENCE
-->
<!-- <GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" /> -->
</ItemGroup>
</Project>
23 changes: 20 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,27 @@ pool:
vmImage: 'windows-latest'

variables:
Dotnet.Skip.First.Time.Experience: 'True'
testFolderPath: '$(Build.SourcesDirectory)/test'
- group: nuget
- name: testFolderPath
value: '$(Build.SourcesDirectory)/test'
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: true
- name: DOTNET_CLI_TELEMETRY_OPTOUT
value: true

steps:
- template: crawler.default.build.yml@templates

# Configure NuGet
- pwsh: |
@('develop','release','AzurePipelines') | ForEach-Object{
dotnet nuget update source $_ -p $env:NUGET_KEY -u VssSessionToken --configfile nuget.config
}
condition: and(succeeded(), variables['nuget.key'])
displayName: 'Add api token to access nuget artifacts'
env:
NUGET_KEY: $(nuget.key)

- template: crawler.netcore.build.yml@templates

- template: documentation.publish.yml@templates

Binary file added build/assets/nugetlogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/3.0.0-release-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
### Features
+ Support netcore and CluedIn 3.0.0+
10 changes: 10 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"sdk": {
"version": "3.1.201",
"rollForward": "latestFeature"
},
"msbuild-sdks": {
"Microsoft.Build.CentralPackageVersions": "2.0.52",
"Microsoft.Build.Traversal": "2.0.31"
}
}
70 changes: 0 additions & 70 deletions src/App.config

This file was deleted.

36 changes: 1 addition & 35 deletions src/ExternalSearch.Providers.KnowledgeGraph.csproj
Original file line number Diff line number Diff line change
@@ -1,39 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{FAAD6DC5-6B35-4D73-AD98-8D2C3D86FEA4}</ProjectGuid>
<RootNamespace>CluedIn.ExternalSearch.Providers.KnowledgeGraph</RootNamespace>
<AssemblyName>CluedIn.ExternalSearch.Providers.KnowledgeGraph</AssemblyName>
<TargetFramework>net452</TargetFramework>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<AssemblyTitle>ExternalSearch.Providers.KnowledgeGraph</AssemblyTitle>
<Company>CluedIn</Company>
<Product>ExternalSearch.Providers.KnowledgeGraph</Product>
<Copyright>Copyright (c) 2019 Clued In. All rights reserved.</Copyright>
<OutputPath>bin\$(Configuration)\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Backup\**" />
<EmbeddedResource Remove="Backup\**" />
<None Remove="Backup\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CluedIn.ExternalSearch" Version="2.5.2" />
<PackageReference Include="EntityFramework" Version="6.1.2" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="RestSharp" Version="105.2.3" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Net" />
<Reference Include="System.Web" />
<Reference Include="Microsoft.CSharp" />
<PackageReference Include="CluedIn.ExternalSearch" />
</ItemGroup>
</Project>
21 changes: 8 additions & 13 deletions test/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
<Project>
<Import Project="..\Directory.Build.props" />
<Import Project="..\Directory.Build.props"/>

<PropertyGroup>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoFixture.Xunit2" Version="4.8.0" />
<PackageReference Include="coverlet.msbuild" Version="2.6.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.analyzers" Version="0.10.0" />
<!-- De-comment to use xunit.core and .assert instead of the main package
because compilation fails due to warnings triggered by xunit.analyzers.
<PackageReference Include="xunit.core" Version="2.4.1" />
<PackageReference Include="xunit.assert" Version="2.4.1" />
-->
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="xunit.runner.utility" Version="2.4.1" />
<PackageReference Include="AutoFixture.Xunit2"/>
<PackageReference Include="coverlet.msbuild"/>
<PackageReference Include="Microsoft.NET.Test.Sdk"/>
<PackageReference Include="xunit"/>
<PackageReference Include="xunit.runner.visualstudio"/>
<PackageReference Include="Moq"/>
<PackageReference Include="Shouldly"/>
</ItemGroup>
</Project>
Loading

0 comments on commit ab7b470

Please sign in to comment.