-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2263 from snakefoot/Vs2017NetCore2
Support .NET Standard 2.0 and move to VS 2017
- Loading branch information
Showing
226 changed files
with
2,237 additions
and
11,334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,4 @@ build/ | |
*.DotSettings | ||
*.vshost.* | ||
/.vs | ||
/src/.vs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,37 @@ | ||
language: csharp | ||
solution: src/NLog.mono.sln | ||
|
||
mono: 5.2.0 | ||
dotnet: 2.0.0 | ||
dist: trusty | ||
|
||
|
||
install: | ||
- nuget restore src/NLog.mono.sln | ||
- nuget install xunit.runners -Version 1.9.2 -OutputDirectory testrunner | ||
- nuget install xunit.runner.console -version 2.2.0 | ||
# workaround for missing .net 4.5 targing pack | ||
- export FrameworkPathOverride=$(dirname $(which mono))/../lib/mono/4.5/ | ||
# Display dotnet version info | ||
- which dotnet; | ||
if [ $? -eq 0 ]; then | ||
echo "Using dotnet:"; | ||
dotnet --info; | ||
else | ||
echo "dotnet.exe not found" | ||
exit 1; | ||
fi | ||
|
||
# Restore dependencies | ||
- dotnet restore src/NLog | ||
- dotnet restore src/NLogAutoLoadExtension | ||
|
||
- dotnet restore tests/SampleExtensions | ||
|
||
- dotnet restore tests/NLog.UnitTests | ||
|
||
script: | ||
- xbuild /p:Configuration=Release src/NLog.mono.sln | ||
- mono ./testrunner/xunit.runners.1.9.2/tools/xunit.console.clr4.exe "./build/bin/Release/Mono 2.x/NLog.UnitTests.dll" | ||
|
||
# Run tests | ||
- dotnet test tests/NLog.UnitTests --configuration Release --framework netcoreapp2.0 | ||
|
||
- dotnet msbuild /t:Restore /p:targetframework=net452 /p:monobuild=1 src/NLog | ||
- dotnet msbuild /t:Restore /p:targetframework=net452 /p:monobuild=1 tests/NLog.UnitTests | ||
- dotnet msbuild /t:Rebuild /p:targetframework=net452 /p:configuration=Release /p:monobuild=1 tests/NLog.UnitTests | ||
- mono ./xunit.runner.console.2.2.0/tools/xunit.console.exe "./tests/NLog.UnitTests/bin/Release/net452/NLog.UnitTests.dll" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,44 @@ | ||
version: 4.4.{build} | ||
version: 4.5.0-beta{build} | ||
image: Visual Studio 2017 | ||
configuration: Release | ||
clone_folder: c:\projects\nlog | ||
environment: | ||
github_auth_token: | ||
secure: +vzVo4DsD93fPeSkrIL12KQsq2VJrge4ZSt3KanSxtnifHsBXYmGko4Ck00sVOqD | ||
sonar_token: | ||
secure: GBaeujJgXPbcDto3kyJXpwrTJdPNKNOjwzyzAGNvvKYg+X/S3anpG+8qKMBjjGFI | ||
|
||
build_script: | ||
- msbuild src/NLog.proj /verbosity:minimal /t:rebuild /t:xsd /t:NuGetPackage /p:BuildVersion=4.4.12 /p:AssemblyFileVersion=4.4.%APPVEYOR_BUILD_NUMBER% /p:BuildLastMajorVersion=4.0.0 /p:configuration=release /p:BuildLabelOverride=NONE | ||
- msbuild src/NLog.proj /verbosity:minimal /t:BuildTests /p:BuildNetFX35=true /p:BuildNetFX40=true /p:BuildNetFX45=true | ||
install: | ||
- '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"' | ||
|
||
build_script: | ||
- ps: .\build.ps1 | ||
- ps: .\run-sonar.ps1 | ||
|
||
test_script: | ||
- msbuild /t:rebuild .\tools\CheckSourceCode\src\ /p:Configuration=Release /verbosity:minimal | ||
- tools\CheckSourceCode\NLog.SourceCodeTests.exe no-interactive | ||
- xunit.console.clr4 "build\bin\Debug\.NET Framework 3.5\NLog.UnitTests.dll" /appveyor /noshadow | ||
- xunit.console.clr4 "build\bin\Debug\.NET Framework 4.0\NLog.UnitTests.dll" /appveyor /noshadow | ||
- ps: .\run-tests.ps1 | ||
- nuget.exe install OpenCover -ExcludeVersion | ||
- OpenCover\tools\OpenCover.Console.exe -register:user -target:"%xunit20%\xunit.console.x86.exe" -targetargs:"\"C:\projects\nlog\build\bin\Debug\.NET Framework 4.5\NLog.UnitTests.dll\" -appveyor -noshadow" -returntargetcode -filter:"+[NLog]* +[NLog.Extended]* -[NLog]JetBrains.Annotations.*" -excludebyattribute:*.ExcludeFromCodeCoverage* -hideskipped:All -output:coverage.xml | ||
- OpenCover\tools\OpenCover.Console.exe -register:user -target:"%xunit20%\xunit.console.x86.exe" -targetargs:"\"C:\projects\nlog\tests\NLog.UnitTests\bin\debug\net452\NLog.UnitTests.dll\" -appveyor -noshadow" -returntargetcode -filter:"+[NLog]* +[NLog.Extended]* -[NLog]JetBrains.Annotations.*" -excludebyattribute:*.ExcludeFromCodeCoverage* -hideskipped:All -output:coverage.xml | ||
- "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%" | ||
- pip install codecov | ||
- codecov -f "coverage.xml" | ||
|
||
cache: | ||
- src\packages -> **\packages.config | ||
- c:\projects\nlog\appveyor.sonar\cache | ||
|
||
services: | ||
- mssql2012sp1 | ||
- mssql2016 | ||
|
||
artifacts: | ||
- path: 'build\bin\release\NuGetPackages\*.nupkg' | ||
- path: 'artifacts\*.nupkg' | ||
|
||
deploy: | ||
- provider: NuGet | ||
api_key: | ||
secure: DtVDH1ZfIR8E2oDLeSPxfn0WFXw3MCv4WhLkkQQl9LfEHswb5sdxdCYodNKhrKik | ||
artifact: /.*\.nupkg/ | ||
on: | ||
branch: master | ||
branch: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# restore and builds all projects as release. | ||
# creates NuGet package at \artifacts | ||
dotnet --version | ||
|
||
# dotnet restore .\src\NLog\ | ||
# dotnet pack .\src\NLog\ --configuration release --include-symbols -o ..\..\artifacts | ||
|
||
$versionPrefix = "4.5.0" | ||
$versionSuffix = "beta01" | ||
$versionFile = $versionPrefix + "." + ${env:APPVEYOR_BUILD_NUMBER} | ||
$versionProduct = $versionPrefix; | ||
if (-Not $versionSuffix.Equals("")) | ||
{ $versionProduct = $versionProduct + "-" + $versionSuffix } | ||
|
||
msbuild /t:Restore,Pack .\src\NLog\ /p:targetFrameworks='"net45;net40-client;net35;netstandard2.0;sl4;sl5;wp8;monoandroid44;xamarinios10"' /p:VersionPrefix=$versionPrefix /p:VersionSuffix=$versionSuffix /p:FileVersion=$versionFile /p:ProductVersion=$versionProduct /p:Configuration=Release /p:IncludeSymbols=true /p:PackageOutputPath=..\..\artifacts /verbosity:minimal | ||
if (-Not $LastExitCode -eq 0) | ||
{ exit $LastExitCode } | ||
|
||
msbuild /t:Restore,Pack .\src\NLog.Extended\ /p:targetFrameworks='"net45;net40-client;net35"' /p:VersionPrefix=$versionPrefix /p:VersionSuffix=$versionSuffix /p:FileVersion=$versionFile /p:ProductVersion=$versionProduct /p:Configuration=Release /p:IncludeSymbols=true /p:PackageOutputPath=..\..\artifacts /verbosity:minimal | ||
if (-Not $LastExitCode -eq 0) | ||
{ exit $LastExitCode } | ||
|
||
msbuild /t:xsd /t:NuGetSchemaPackage /t:NuGetConfigPackage .\src\NLog.proj /p:Configuration=Release /p:BuildNetFX45=true /p:BuildVersion=$versionProduct /p:Configuration=Release /p:BuildLabelOverride=NONE /verbosity:minimal | ||
|
||
exit $LastExitCode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
dotnet restore .\src\NLog\ | ||
if (-Not $LastExitCode -eq 0) | ||
{ exit $LastExitCode } | ||
|
||
dotnet restore .\src\NLogAutoLoadExtension\ | ||
if (-Not $LastExitCode -eq 0) | ||
{ exit $LastExitCode } | ||
|
||
dotnet restore .\tests\SampleExtensions\ | ||
if (-Not $LastExitCode -eq 0) | ||
{ exit $LastExitCode } | ||
|
||
msbuild /t:Build /p:Configuration=Release .\src\NLogAutoLoadExtension\ /verbosity:minimal | ||
if (-Not $LastExitCode -eq 0) | ||
{ exit $LastExitCode } | ||
|
||
msbuild /t:Build /p:Configuration=Release .\tests\SampleExtensions\ /verbosity:minimal | ||
if (-Not $LastExitCode -eq 0) | ||
{ exit $LastExitCode } | ||
|
||
msbuild /t:Restore,Build /p:Configuration=Release .\tests\NLog.UnitTests\ /verbosity:minimal | ||
if (-Not $LastExitCode -eq 0) | ||
{ exit $LastExitCode } | ||
|
||
dotnet test .\tests\NLog.UnitTests\ --configuration release --framework netcoreapp2.0 --no-build | ||
if (-Not $LastExitCode -eq 0) | ||
{ exit $LastExitCode } | ||
|
||
msbuild /t:Build /p:targetFramework=net452 .\tests\NLog.UnitTests\ /p:Configuration=Release /p:TestTargetFramework=net35 /p:OutputPath=.\bin\release\net35 /verbosity:minimal | ||
if (-Not $LastExitCode -eq 0) | ||
{ exit $LastExitCode } | ||
|
||
& ${env:xunit20}\xunit.console.x86.exe .\tests\NLog.UnitTests\bin\release\net35\NLog.UnitTests.dll -appveyor -noshadow | ||
if (-Not $LastExitCode -eq 0) | ||
{ exit $LastExitCode } | ||
|
||
msbuild /t:Build /p:targetFramework=net452 .\tests\NLog.UnitTests\ /p:Configuration=Release /p:TestTargetFramework=net40-client /p:OutputPath=.\bin\release\net40 /verbosity:minimal | ||
if (-Not $LastExitCode -eq 0) | ||
{ exit $LastExitCode } | ||
|
||
& ${env:xunit20}\xunit.console.x86.exe .\tests\NLog.UnitTests\bin\release\net40\NLog.UnitTests.dll -appveyor -noshadow | ||
if (-Not $LastExitCode -eq 0) | ||
{ exit $LastExitCode } | ||
|
||
msbuild /t:Build /p:Configuration=Debug .\tests\NLog.UnitTests\ /verbosity:minimal | ||
if (-Not $LastExitCode -eq 0) | ||
{ exit $LastExitCode } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
rem install SHFB first, rebuild Nlog and update BuildVersion in this script | ||
rem @echo off | ||
rem First rebuild Nlog and update BuildVersion in this script | ||
|
||
rem install SHFB | ||
..\..\tools\nuget.exe install EWSoftware.SHFB -excludeversion -OutputDirectory ..\..\tools\ | ||
..\..\tools\nuget.exe install EWSoftware.SHFB.NETFramework -excludeversion -OutputDirectory ..\..\tools\ | ||
|
||
set FRAMEWORK1=.NET Framework 4.5 | ||
set FRAMEWORK="%FRAMEWORK1%" | ||
set BuildVersion=4.4.0 | ||
|
||
set BuildVersion=4.4 | ||
|
||
set Configuration=Release | ||
|
||
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe %~dp0NLog.shfbproj /p:Configuration=Release /p:Framework=%FRAMEWORK% /p:AssemblyName=NLog /p:BuildVersion=%BuildVersion% /p:BuildLabelOverride=NONE | ||
rem copy favicon | ||
copy favicon.ico "..\..\build\bin\%configuration%\%FRAMEWORK1%\doc\icons\favicon.ico" | ||
msbuild.exe %~dp0NLog.shfbproj /p:Configuration=Release /p:Framework=%FRAMEWORK% /p:AssemblyName=NLog /p:BuildVersion=%BuildVersion% /p:BuildLabelOverride=NONE | ||
rem copy favicon | ||
copy favicon.ico ".\Doc\icons\favicon.ico" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.