Skip to content

Commit

Permalink
Merge pull request #3 from vov4uk/Migrate-to-NetCore
Browse files Browse the repository at this point in the history
Migrate to .NetCore
  • Loading branch information
vov4uk authored Nov 22, 2019
2 parents 4a393b9 + 795f87a commit a9a7971
Show file tree
Hide file tree
Showing 30 changed files with 1,129 additions and 550 deletions.
46 changes: 13 additions & 33 deletions HikConsole.sln
Original file line number Diff line number Diff line change
@@ -1,51 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29306.81
# Visual Studio 15
VisualStudioVersion = 15.0.28307.852
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HikConsole", "src\HikConsole\HikConsole.csproj", "{7BFF9903-03B0-4179-BFCA-272148721326}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HikConsoleCore", "src\HikConsole\HikConsole.csproj", "{1E49A7B7-1549-4566-84AA-A073179FE013}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HikConsole.Tests", "src\HikConsole.Tests\HikConsole.Tests.csproj", "{6B19B422-4D15-49D4-99EC-58FF2C4902C8}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HikConsole.Tests", "src\HikConsole.Tests\HikConsole.Tests.csproj", "{941C4E4E-2898-4A78-AF93-7A7E6EB87DA3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7BFF9903-03B0-4179-BFCA-272148721326}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7BFF9903-03B0-4179-BFCA-272148721326}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7BFF9903-03B0-4179-BFCA-272148721326}.Debug|x64.ActiveCfg = Debug|Any CPU
{7BFF9903-03B0-4179-BFCA-272148721326}.Debug|x64.Build.0 = Debug|Any CPU
{7BFF9903-03B0-4179-BFCA-272148721326}.Debug|x86.ActiveCfg = Debug|Any CPU
{7BFF9903-03B0-4179-BFCA-272148721326}.Debug|x86.Build.0 = Debug|Any CPU
{7BFF9903-03B0-4179-BFCA-272148721326}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7BFF9903-03B0-4179-BFCA-272148721326}.Release|Any CPU.Build.0 = Release|Any CPU
{7BFF9903-03B0-4179-BFCA-272148721326}.Release|x64.ActiveCfg = Release|Any CPU
{7BFF9903-03B0-4179-BFCA-272148721326}.Release|x64.Build.0 = Release|Any CPU
{7BFF9903-03B0-4179-BFCA-272148721326}.Release|x86.ActiveCfg = Release|Any CPU
{7BFF9903-03B0-4179-BFCA-272148721326}.Release|x86.Build.0 = Release|Any CPU
{6B19B422-4D15-49D4-99EC-58FF2C4902C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B19B422-4D15-49D4-99EC-58FF2C4902C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B19B422-4D15-49D4-99EC-58FF2C4902C8}.Debug|x64.ActiveCfg = Debug|Any CPU
{6B19B422-4D15-49D4-99EC-58FF2C4902C8}.Debug|x64.Build.0 = Debug|Any CPU
{6B19B422-4D15-49D4-99EC-58FF2C4902C8}.Debug|x86.ActiveCfg = Debug|Any CPU
{6B19B422-4D15-49D4-99EC-58FF2C4902C8}.Debug|x86.Build.0 = Debug|Any CPU
{6B19B422-4D15-49D4-99EC-58FF2C4902C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B19B422-4D15-49D4-99EC-58FF2C4902C8}.Release|Any CPU.Build.0 = Release|Any CPU
{6B19B422-4D15-49D4-99EC-58FF2C4902C8}.Release|x64.ActiveCfg = Release|Any CPU
{6B19B422-4D15-49D4-99EC-58FF2C4902C8}.Release|x64.Build.0 = Release|Any CPU
{6B19B422-4D15-49D4-99EC-58FF2C4902C8}.Release|x86.ActiveCfg = Release|Any CPU
{6B19B422-4D15-49D4-99EC-58FF2C4902C8}.Release|x86.Build.0 = Release|Any CPU
{1E49A7B7-1549-4566-84AA-A073179FE013}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E49A7B7-1549-4566-84AA-A073179FE013}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E49A7B7-1549-4566-84AA-A073179FE013}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E49A7B7-1549-4566-84AA-A073179FE013}.Release|Any CPU.Build.0 = Release|Any CPU
{941C4E4E-2898-4A78-AF93-7A7E6EB87DA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{941C4E4E-2898-4A78-AF93-7A7E6EB87DA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{941C4E4E-2898-4A78-AF93-7A7E6EB87DA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{941C4E4E-2898-4A78-AF93-7A7E6EB87DA3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {026CEA07-568F-47DE-9D36-95F610CD2D98}
SolutionGuid = {BC11C5EE-74C4-497D-9A6F-46A53EC063DF}
EndGlobalSection
EndGlobal
5 changes: 5 additions & 0 deletions Sonar.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SonarScanner.MSBuild.exe begin /k:"HikConsole" /d:sonar.host.url="http://localhost:9000" /d:sonar.login=%1 /d:sonar.cs.opencover.reportsPaths=".\src\HikConsole.Tests\TestResults\opencover*.xml" /d:sonar.log.level=error

"%LOCALAPPDATA%\Apps\OpenCover\OpenCover.Console.exe" -excludebyattribute:*.ExcludeFromCodeCoverageAttribute -oldStyle -output:".\src\HikConsole.Tests\TestResults\opencover.xml" -register:user -target:"C:\Program Files\dotnet\dotnet.exe" -targetargs:"test" -register:Administrator

SonarScanner.MSBuild.exe end /d:sonar.login=%1
7 changes: 4 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ steps:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'

- task: VSTest@2
- task: DotNetCoreCLI@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
command: test
projects: '**/*Tests/*.csproj'
arguments: '--configuration $(buildConfiguration)'
111 changes: 21 additions & 90 deletions src/HikConsole.Tests/HikConsole.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,99 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\MSTest.TestAdapter.2.0.0\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.2.0.0\build\net45\MSTest.TestAdapter.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6B19B422-4D15-49D4-99EC-58FF2C4902C8}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>HikConsoleTests</RootNamespace>
<AssemblyName>HikConsole.Tests</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>UnitTestsRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>netcoreapp2.2</TargetFramework>
<CodeAnalysisRuleSet>UnitTestsRules.ruleset</CodeAnalysisRuleSet>
<IsPackable>false</IsPackable>
<DebugType>full</DebugType>
</PropertyGroup>

<ItemGroup>
<Reference Include="AutoFixture, Version=4.11.0.0, Culture=neutral, PublicKeyToken=b24654c590009d4f, processorArchitecture=MSIL">
<HintPath>..\..\packages\AutoFixture.4.11.0\lib\net452\AutoFixture.dll</HintPath>
</Reference>
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\..\packages\Castle.Core.4.4.0\lib\net45\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="Fare, Version=2.1.0.0, Culture=neutral, PublicKeyToken=ea68d375bf33a7c8, processorArchitecture=MSIL">
<HintPath>..\..\packages\Fare.2.1.1\lib\net35\Fare.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\MSTest.TestFramework.2.0.0\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\MSTest.TestFramework.2.0.0\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.13.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\..\packages\Moq.4.13.0\lib\net45\Moq.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="HikConsoleTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<PackageReference Include="AutoFixture" Version="4.11.0" />
<PackageReference Include="Moq" Version="4.13.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
<ProjectReference Include="..\HikConsole\HikConsole.csproj" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\HikConsole\HikConsole.csproj">
<Project>{7bff9903-03b0-4179-bfca-272148721326}</Project>
<Name>HikConsole</Name>
</ProjectReference>
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\MSTest.TestAdapter.2.0.0\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\MSTest.TestAdapter.2.0.0\build\net45\MSTest.TestAdapter.props'))" />
<Error Condition="!Exists('..\..\packages\MSTest.TestAdapter.2.0.0\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\MSTest.TestAdapter.2.0.0\build\net45\MSTest.TestAdapter.targets'))" />
</Target>
<Import Project="..\..\packages\MSTest.TestAdapter.2.0.0\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\..\packages\MSTest.TestAdapter.2.0.0\build\net45\MSTest.TestAdapter.targets')" />
</Project>

</Project>
Loading

0 comments on commit a9a7971

Please sign in to comment.