Skip to content

Commit 032910d

Browse files
committed
# Conflicts: # samples/LoggingReflectInsight/WebApi.ReflectInsightSample/Startup.cs
2 parents 72afc8f + ba2a4e0 commit 032910d

33 files changed

Lines changed: 335 additions & 720 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ node_modules
2828
*.sln.ide
2929
project.lock.json
3030
.vs/
31+
.dotnet/
3132
*.dat
3233
Logs/

AspNet.Plus.Logging.sln

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25123.0
4+
VisualStudioVersion = 14.0.25420.1
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "02. src", "02. src", "{BFA64C32-4422-4AF9-8ECF-D2ECF2E0230B}"
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "01. Solution Items", "01. Solution Items", "{D94023CF-59CC-4D69-B30B-991C7D52F49A}"
99
ProjectSection(SolutionItems) = preProject
10+
appveyor.yml = appveyor.yml
1011
header\AspNet.Plus.licenseheader = header\AspNet.Plus.licenseheader
12+
build.ps1 = build.ps1
1113
global.json = global.json
14+
README.md = README.md
1215
header\VersionInfo.cs = header\VersionInfo.cs
1316
EndProjectSection
1417
EndProject

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
[![Stars](https://img.shields.io/github/stars/aspnet-plus/AspNet.Plus.Logging.svg)](https://github.com/aspnet-plus/AspNet.Plus.Logging/stargazers)
66
[![Join the chat at https://gitter.im/aspnet-plus/AspNet.Plus.Logging](https://badges.gitter.im/aspnet-plus/AspNet.Plus.Logging.svg)](https://gitter.im/aspnet-plus/AspNet.Plus.Logging?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
77

8-
A set of Nuget packages to help ASP.NET 5 developers build simple quality logging related code.
8+
A set of Nuget packages to help NET Core developers build simple quality logging related code.
99

10-
**NOTE**: *The AspNet.Plus.Logging.ReflectInsight does not support DNX Core, as of Yet!*
10+
**NOTE**: *The AspNet.Plus.Logging.ReflectInsight only supports .NET Core Full Framework*
1111

1212
**Available Nuget packages**
1313

appveyor.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
init:
2-
- git config --global core.autocrlf true
3-
build_script:
4-
- ps: .\build.ps1
5-
clone_depth: 1
6-
test: off
7-
deploy: off
1+
version: '{build}'
2+
skip_tags: true
3+
image: Visual Studio 2015
4+
configuration: Release
5+
install:
6+
- ps: mkdir -Force ".\build\" | Out-Null
7+
- ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.ps1" -OutFile ".\build\installcli.ps1"
8+
- ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetcli"
9+
- ps: '& .\build\installcli.ps1 -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath -Version 1.0.0-preview2-003121'
10+
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
11+
build_script:
12+
- ps: ./Build.ps1
13+
test: off
14+
15+

build.ps1

Lines changed: 32 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -1,127 +1,32 @@
1-
########################
2-
# FUNCTIONS
3-
########################
4-
function Install-Dnvm
5-
{
6-
& where.exe dnvm 2>&1 | Out-Null
7-
if(($LASTEXITCODE -ne 0) -Or ((Test-Path Env:\APPVEYOR) -eq $true))
8-
{
9-
Write-Host "DNVM not found"
10-
&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}
11-
12-
# Normally this happens automatically during install but AppVeyor has
13-
# an issue where you may need to manually re-run setup from within this process.
14-
if($env:DNX_HOME -eq $NULL)
15-
{
16-
Write-Host "Initial DNVM environment setup failed; running manual setup"
17-
$tempDnvmPath = Join-Path $env:TEMP "dnvminstall"
18-
$dnvmSetupCmdPath = Join-Path $tempDnvmPath "dnvm.ps1"
19-
& $dnvmSetupCmdPath setup
20-
}
21-
}
22-
}
23-
24-
function Get-DnxVersion
25-
{
26-
$globalJson = join-path $PSScriptRoot "global.json"
27-
$jsonData = Get-Content -Path $globalJson -Raw | ConvertFrom-JSON
28-
return $jsonData.sdk.version
29-
}
30-
31-
function Restore-Packages
32-
{
33-
param([string] $DirectoryName)
34-
& dnu restore ("""" + $DirectoryName + """")
35-
}
36-
37-
function Build-Project
38-
{
39-
param([string] $DirectoryName)
40-
& dnu build ("""" + $DirectoryName + """") --configuration Release; if($LASTEXITCODE -ne 0) { exit 1 }
41-
}
42-
43-
function Package-Project
44-
{
45-
param([string] $DirectoryName)
46-
& dnu pack ("""" + $DirectoryName + """") --configuration Release --out .\artifacts\packages; if($LASTEXITCODE -ne 0) { exit 1 }
47-
}
48-
49-
function Publish-TestProject
50-
{
51-
param([string] $DirectoryName, [int]$Index)
52-
53-
# Publish to a numbered/indexed folder rather than the full test project name
54-
# because the package paths get long and start exceeding OS limitations.
55-
& dnu publish ("""" + $DirectoryName + """") --configuration Release --no-source --out .\artifacts\tests\$Index; if($LASTEXITCODE -ne 0) { exit 2 }
56-
}
57-
58-
function Invoke-Tests
59-
{
60-
Get-ChildItem .\artifacts\tests -Filter test.cmd -Recurse | ForEach-Object { & $_.FullName; if($LASTEXITCODE -ne 0) { exit 3 } }
61-
}
62-
63-
function Remove-PathVariable
64-
{
65-
param([string] $VariableToRemove)
66-
$path = [Environment]::GetEnvironmentVariable("PATH", "User")
67-
$newItems = $path.Split(';') | Where-Object { $_.ToString() -inotlike $VariableToRemove }
68-
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join(';', $newItems), "User")
69-
$path = [Environment]::GetEnvironmentVariable("PATH", "Process")
70-
$newItems = $path.Split(';') | Where-Object { $_.ToString() -inotlike $VariableToRemove }
71-
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join(';', $newItems), "Process")
72-
}
73-
74-
########################
75-
# THE BUILD!
76-
########################
77-
78-
Push-Location $PSScriptRoot
79-
80-
$dnxVersion = Get-DnxVersion
81-
82-
# Clean
83-
if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse }
84-
85-
# Remove the installed DNVM from the path and force use of
86-
# per-user DNVM (which we can upgrade as needed without admin permissions)
87-
Remove-PathVariable "*Program Files\Microsoft DNX\DNVM*"
88-
Install-Dnvm
89-
90-
# Install DNX
91-
dnvm update-self
92-
dnvm upgrade
93-
94-
# Make sure these versions of DNX (for now) are installed
95-
dnvm install $dnxVersion -r clr -a x86 -NoNative
96-
dnvm install $dnxVersion -r clr -a x64 -NoNative
97-
dnvm install $dnxVersion -r coreclr -a x86 -NoNative
98-
dnvm install $dnxVersion -r coreclr -a x64 -NoNative
99-
dnvm use $dnxVersion -r clr
100-
dnvm list
101-
npm cache clean
102-
dnu restore
103-
104-
# Package restore
105-
Get-ChildItem -Path . -Filter *.xproj -Recurse | ForEach-Object { dnu restore ("""" + $_.DirectoryName + """") }
106-
107-
# Set build number
108-
$env:DNX_BUILD_VERSION = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1}[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
109-
Write-Host "Build number:" $env:DNX_BUILD_VERSION
110-
111-
# Build/package
112-
Get-ChildItem -Path .\src -Filter *.xproj -Recurse | ForEach-Object { Package-Project $_.DirectoryName }
113-
# Get-ChildItem -Path .\samples -Filter *.xproj -Recurse | ForEach-Object { Build-Project $_.DirectoryName }
114-
115-
# Publish tests so we can test without recompiling
116-
Get-ChildItem -Path .\test -Filter *.xproj -Recurse | ForEach-Object -Begin { $TestIndex = 0 } -Process { Publish-TestProject -DirectoryName $_.DirectoryName -Index $TestIndex; $TestIndex++; }
117-
118-
# Test under CLR
119-
# Invoke-Tests
120-
121-
# Switch to Core CLR
122-
#dnvm use $dnxVersion -r CoreCLR
123-
124-
# Test under Core CLR
125-
#Invoke-Tests
126-
127-
Pop-Location
1+
echo "build: Build started"
2+
3+
Push-Location $PSScriptRoot
4+
5+
if(Test-Path .\artifacts) {
6+
echo "build: Cleaning .\artifacts"
7+
Remove-Item .\artifacts -Force -Recurse
8+
}
9+
10+
& dotnet restore --no-cache
11+
12+
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL];
13+
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
14+
$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "master" -and $revision -ne "local"]
15+
16+
echo "build: Version suffix is $suffix"
17+
18+
foreach ($src in ls src/*) {
19+
Push-Location $src
20+
21+
echo "build: Packaging project in $src"
22+
23+
& dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix
24+
if($LASTEXITCODE -ne 0) { exit 1 }
25+
26+
Pop-Location
27+
}
28+
29+
30+
Pop-Location
31+
32+

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"projects": [ "src", "test" ],
2+
"projects": [ "src", "samples" ],
33
"sdk": {
4-
"version": "1.0.0-rc1-final"
4+
"version": "1.0.0-preview2-003121"
55
}
66
}

header/AspNet.Plus.licenseheader

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# https://github.com/rubicon-oss/LicenseHeaderManager/wiki/Expendable-Properties
2-
extensions: designer.cs generated.cs
3-
extensions: .cs .cpp .h
4-
// ASP.NET.Plus
5-
// Copyright (c) %CurrentYear% ZoneMatrix Inc.
6-
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
7-
8-
extensions: .aspx .ascx
9-
<%--
10-
ASP.NET.Plus
11-
Copyright (c) %CurrentYear% ZoneMatrix Inc.
12-
Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
13-
--%>
14-
extensions: .xml .config .xsd
15-
<!--
16-
ASP.NET.Plus
17-
Copyright (c) %CurrentYear% ZoneMatrix Inc.
18-
Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
1+
# https://github.com/rubicon-oss/LicenseHeaderManager/wiki/Expendable-Properties
2+
extensions: designer.cs generated.cs
3+
extensions: .cs .cpp .h
4+
// ASP.NET.Plus
5+
// Copyright (c) %CurrentYear% ASP.NET Plus.
6+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
7+
8+
extensions: .aspx .ascx
9+
<%--
10+
ASP.NET.Plus
11+
Copyright (c) %CurrentYear% ASP.NET Plus.
12+
Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
13+
--%>
14+
extensions: .xml .config .xsd
15+
<!--
16+
ASP.NET.Plus
17+
Copyright (c) %CurrentYear% ASP.NET Plus.
18+
Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
1919
-->

header/VersionInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System.Reflection;
22
using System.Runtime.InteropServices;
33

4-
[assembly: AssemblyCompany("ZoneMatrix")]
5-
[assembly: AssemblyProduct("ZoneMatrix reusable common libraries.")]
6-
[assembly: AssemblyCopyright("Copyright (C) 2016 ZoneMatrix Inc.")]
4+
[assembly: AssemblyCompany("ASP.NET Plus")]
5+
[assembly: AssemblyProduct("ASP.NET Plus reusable common libraries.")]
6+
[assembly: AssemblyCopyright("Copyright (C) 2016 ASP.NET Plus.")]
77
[assembly: AssemblyVersion("1.0.0.*")]
88
[assembly: AssemblyFileVersion("1.0.0.*")]
99
[assembly: AssemblyInformationalVersion("1.0.0 (rev 0)")]

makefile.shade

Lines changed: 0 additions & 9 deletions
This file was deleted.

samples/LoggingReflectInsight/Console.ReflectInsightSample/Console.ReflectInsightSample.xproj

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,21 @@
44
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
55
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
66
</PropertyGroup>
7-
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
7+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
88
<PropertyGroup Label="Globals">
99
<ProjectGuid>77b97056-6afc-4450-93ae-9da1664c5ffb</ProjectGuid>
1010
<RootNamespace>Console.ReflectInsightSample</RootNamespace>
11-
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
12-
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
11+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
12+
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
13+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1314
</PropertyGroup>
14-
<PropertyGroup>
15-
<SchemaVersion>2.0</SchemaVersion>
16-
<TypeScriptCompileBlocked>True</TypeScriptCompileBlocked>
17-
</PropertyGroup>
18-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'" />
1915
<ItemGroup>
2016
<Content Include="..\..\..\header\AspNet.Plus.licenseheader">
2117
<Link>AspNet.Plus.licenseheader</Link>
2218
</Content>
2319
</ItemGroup>
24-
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
20+
<PropertyGroup>
21+
<SchemaVersion>2.0</SchemaVersion>
22+
</PropertyGroup>
23+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
2524
</Project>

0 commit comments

Comments
 (0)