Skip to content

Commit

Permalink
Merge pull request #193 from snakefoot/master
Browse files Browse the repository at this point in the history
Support for UAP10/UWP, Update NLog dependency
  • Loading branch information
304NotModified authored Jan 15, 2018
2 parents 7cf72a2 + 2844fb0 commit 00a88fe
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 22 deletions.
15 changes: 8 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
version: 1.0.{build}
image: Visual Studio 2017
configuration: Release
build_script:
- ps: >-
dotnet restore src\NLog.Extensions.Logging

.\patchFileVersion.ps1 "NLog.Extensions.Logging.csproj" "$env:appveyor_build_version"
install:
- '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"'

build_script:
- ps: .\build.ps1

dotnet pack src\NLog.Extensions.Logging --configuration Release
artifacts:
- path: 'src\NLog.Extensions.Logging\bin\release\*.nupkg'
- path: 'artifacts\*.nupkg'

test_script:
- ps: .\run-tests.ps1
- ps: .\run-tests.ps1

deploy:
- provider: NuGet
Expand Down
16 changes: 16 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# restore and builds all projects as release.
# creates NuGet package at \artifacts
dotnet --version

$versionPrefix = "1.0.0"
$versionSuffix = "rtm-rc6"
$versionFile = $versionPrefix + "." + ${env:APPVEYOR_BUILD_NUMBER}
$versionProduct = $versionPrefix;
if (-Not $versionSuffix.Equals(""))
{ $versionProduct = $versionProduct + "-" + $versionSuffix }

msbuild /t:Restore,Pack .\src\NLog.Extensions.Logging\ /p:targetFrameworks='"net451;net461;netstandard1.5;netstandard2.0;uap10.0"' /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 }

exit $LastExitCode
44 changes: 29 additions & 15 deletions src/NLog.Extensions.Logging/NLog.Extensions.Logging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,18 @@
<TargetFrameworks>net451;net461;netstandard1.5;netstandard2.0</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>


<Product>NLog.Extensions.Logging v$(ProductVersion)</Product>
<InformationalVersion>$(ProductVersion)</InformationalVersion>
<Authors>Microsoft;Julian Verdurmen</Authors>
<Company>NLog</Company>
<Description>NLog provider for Microsoft.Extensions.Logging for usage in .NET Standard libraries and console applicaties.

For ASP.NET Core, use NLog.Web.AspNetCore: https://www.nuget.org/packages/NLog.Web.AspNetCore
</Description>

<Authors>Microsoft;Julian Verdurmen</Authors>
<Company>NLog</Company>
<AssemblyName>NLog.Extensions.Logging</AssemblyName>
<AssemblyOriginatorKeyFile>NLog.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<PackageId>NLog.Extensions.Logging</PackageId>
<PackageTags>NLog;Microsoft.Extensions.Logging;log;logfiles;netcore;nlog</PackageTags>
<PackageReleaseNotes>

rc6: support UAP10/UWP
rc5: Fix System.Runtime not found in the GAC on .NET 4.5 / 4.6
rc4: Fixed bug with message templates, removed NLog 5 dependency
rc3: Support for .NET 4.6.1, support for message templates .NET standard 1.5+ and .NET 4.5.1+
Expand All @@ -31,25 +27,40 @@ rc3: Support for .NET 4.6.1, support for message templates .NET standard 1.5+ an
<PackageLicenseUrl>https://github.com/NLog/NLog.Extensions.Logging/blob/master/LICENSE</PackageLicenseUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>git://github.com/NLog/NLog.Extensions.Logging</RepositoryUrl>
<Version>1.0.0-rtm-rc5</Version>

<SignAssembly>true</SignAssembly>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<!--AssemblyVersion: keep 1.0.0.0-->
<FileVersion>1.0.0.0</FileVersion>
<!-- FileVersion = AssemblyFileVersionAttribute, patched by AppVeyor -->
<AssemblyOriginatorKeyFile>NLog.snk</AssemblyOriginatorKeyFile>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' ">
<Title>NLog.Extensions.Logging for .NET Framework 4.6.1</Title>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
<Title>NLog.Extensions.Logging for .NET Framework 4.5.1</Title>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<DefineConstants>$(DefineConstants);NETCORE1_0</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.5' ">
<Title>NLog.Extensions.Logging for NetStandard 1.5</Title>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<DefineConstants>$(DefineConstants);NETCORE1_0</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
<Title>NLog.Extensions.Logging for UWP</Title>
<NugetTargetMoniker>UAP,Version=v10.0</NugetTargetMoniker>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<TargetFrameworkIdentifier>.NETCore</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.15083.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<DefineConstants>$(DefineConstants);NETCORE1_0</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NLog" Version="[4.5.0-rc02,5)" />
<PackageReference Include="NLog" Version="[4.5.0-rc04,5)" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="1.0.2" />
Expand All @@ -61,6 +72,9 @@ rc3: Support for .NET 4.6.1, support for message templates .NET standard 1.5+ an
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="1.0.2" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.5' ">
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="1.0.2" />
</ItemGroup>
Expand Down

0 comments on commit 00a88fe

Please sign in to comment.