Skip to content

Commit a0664ae

Browse files
committed
WIP Update to csproj
1 parent 106ddd1 commit a0664ae

File tree

28 files changed

+830
-179
lines changed

28 files changed

+830
-179
lines changed

build/Build.ps1

Lines changed: 48 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -4,58 +4,60 @@
44
$anyError = $False
55

66
ForEach ($p in $client_projects) {
7-
If (Test-Path "$($p.SourceDir)\project.json") {
7+
If ($($p.UseMSBuild) -ne $True) {
88
Write-Host "Building $($p.Name)" -ForegroundColor Yellow
9-
dotnet build "$($p.SourceDir)" -c Release
10-
Write-Host "Finished building $($p.Name)" -ForegroundColor Yellow
11-
12-
If ($LASTEXITCODE -ne 0) {
13-
$anyError = $True
14-
}
15-
16-
Continue;
17-
}
18-
19-
ForEach ($b in $client_build_configurations) {
20-
$outputDirectory = "$build_dir\$configuration\$($p.Name)\lib\$($b.NuGetDir)"
21-
Write-Host "Building $($p.Name) ($($b.TargetFrameworkVersionProperty))" -ForegroundColor Yellow
22-
239
If ($($p.Name).EndsWith(".Signed")) {
24-
$name = $($p.Name).Replace(".Signed", "");
25-
msbuild "$($p.SourceDir)\$name.csproj" `
26-
/p:AssemblyName="$($p.Name)" `
27-
/p:DocumentationFile="bin\$($configuration)\$($b.TargetFrameworkVersionProperty)\$($p.Name).Signed.xml" `
28-
/p:SignAssembly=true `
29-
/p:AssemblyOriginatorKeyFile="$sign_file" `
30-
/p:Configuration="$configuration" `
31-
/p:Platform="AnyCPU" `
32-
/p:NoWarn="1591" `
33-
/verbosity:minimal `
34-
/p:DefineConstants="`"TRACE;SIGNED;$($b.Constants)`"" `
35-
/p:OutputPath="$outputDirectory" `
36-
/p:TargetPortable="$targetPortable" `
37-
/p:TargetFrameworkVersionProperty="$($b.TargetFrameworkVersionProperty)" `
38-
/t:"Rebuild"
39-
} else {
40-
msbuild "$($p.SourceDir)\$($p.Name).csproj" `
41-
/p:AssemblyName="$($p.Name)" `
42-
/p:DocumentationFile="bin\$($configuration)\$($b.TargetFrameworkVersionProperty)\$($p.Name).xml" `
43-
/p:SignAssembly=false `
44-
/p:Configuration="$configuration" `
45-
/p:Platform="AnyCPU" `
46-
/p:NoWarn="1591" `
47-
/verbosity:minimal `
48-
/p:DefineConstants="`"TRACE;$($b.Constants)`"" `
49-
/p:OutputPath="$outputDirectory" `
50-
/p:TargetPortable="$targetPortable" `
51-
/p:TargetFrameworkVersionProperty="$($b.TargetFrameworkVersionProperty)" `
52-
/t:"Rebuild"
10+
dotnet pack $($p.SourceDir) -c Release -o $artifacts_dir /p:SignAssembly=true
11+
} Else {
12+
dotnet pack $($p.SourceDir) -c Release -o $artifacts_dir
5313
}
54-
If ($LASTEXITCODE -ne 0) {
14+
Write-Host "Finished building $($p.Name)" -ForegroundColor Yellow
15+
16+
If ($LASTEXITCODE -ne 0) {
5517
$anyError = $True
5618
}
19+
} Else {
20+
ForEach ($b in $client_build_configurations) {
21+
$outputDirectory = "$build_dir\$configuration\$($p.Name)\lib\$($b.NuGetDir)"
22+
Write-Host "Building $($p.Name) ($($b.TargetFrameworkVersionProperty))" -ForegroundColor Yellow
5723

58-
Write-Host "Finished building $($p.Name) ($($b.TargetFrameworkVersionProperty))" -ForegroundColor Yellow
24+
If ($($p.Name).EndsWith(".Signed")) {
25+
$name = $($p.Name).Replace(".Signed", "");
26+
msbuild "$($p.SourceDir)\$name.csproj" `
27+
/p:AssemblyName="$($p.Name)" `
28+
/p:DocumentationFile="bin\$($configuration)\$($b.TargetFrameworkVersionProperty)\$($p.Name).xml" `
29+
/p:SignAssembly=true `
30+
/p:AssemblyOriginatorKeyFile="$sign_file" `
31+
/p:Configuration="$configuration" `
32+
/p:Platform="AnyCPU" `
33+
/p:NoWarn="1591" `
34+
/verbosity:minimal `
35+
/p:DefineConstants="`"TRACE;SIGNED;$($b.Constants)`"" `
36+
/p:OutputPath="$outputDirectory" `
37+
/p:TargetPortable="$targetPortable" `
38+
/p:TargetFrameworkVersionProperty="$($b.TargetFrameworkVersionProperty)" `
39+
/t:"Rebuild"
40+
} Else {
41+
msbuild "$($p.SourceDir)\$($p.Name).csproj" `
42+
/p:AssemblyName="$($p.Name)" `
43+
/p:DocumentationFile="bin\$($configuration)\$($b.TargetFrameworkVersionProperty)\$($p.Name).xml" `
44+
/p:SignAssembly=false `
45+
/p:Configuration="$configuration" `
46+
/p:Platform="AnyCPU" `
47+
/p:NoWarn="1591" `
48+
/verbosity:minimal `
49+
/p:DefineConstants="`"TRACE;$($b.Constants)`"" `
50+
/p:OutputPath="$outputDirectory" `
51+
/p:TargetPortable="$targetPortable" `
52+
/p:TargetFrameworkVersionProperty="$($b.TargetFrameworkVersionProperty)" `
53+
/t:"Rebuild"
54+
}
55+
If ($LASTEXITCODE -ne 0) {
56+
$anyError = $True
57+
}
58+
59+
Write-Host "Finished building $($p.Name) ($($b.TargetFrameworkVersionProperty))" -ForegroundColor Yellow
60+
}
5961
}
6062
}
6163

build/Package.ps1

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,10 @@ Function Create-Directory([string] $directory_name) {
1414
Create-Directory $artifacts_dir
1515

1616
ForEach ($p in $client_projects) {
17-
If (Test-Path "$($p.SourceDir)\project.json") {
18-
Write-Host "Building Client NuGet Package: $($p.Name)" -ForegroundColor Yellow
19-
dotnet pack "$($p.SourceDir)" -c Release -o $artifacts_dir
20-
Write-Host "Building Client NuGet Package: $($p.Name)" -ForegroundColor Yellow
21-
22-
If (-not $?) {
23-
$anyError = $True
24-
}
25-
17+
If ($($p.UseMSBuild) -ne $True) {
2618
Continue;
2719
}
28-
20+
2921
$isSignedProject = $($p.Name).EndsWith(".Signed")
3022
$workingDirectory = "$working_dir\$($p.Name)"
3123
Create-Directory $workingDirectory
@@ -90,7 +82,7 @@ ForEach ($p in $client_projects) {
9082

9183
$nuspec.Save($nuspecFile);
9284

93-
$nuget_version = $env:APPVEYOR_BUILD_VERSION + $env:VERSION_SUFFIX
85+
$nuget_version = $env:APPVEYOR_BUILD_VERSION + $env:VERSION_SUFFIX
9486
nuget pack $nuspecFile -OutputDirectory $artifacts_dir -Version $nuget_version -Symbols
9587
}
9688

build/Settings.ps1

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,30 @@ $working_dir = "$build_dir\working"
77
$sign_file = "$source_dir\Exceptionless.snk"
88

99
$client_projects = @(
10-
@{ Name = "Exceptionless"; SourceDir = "$source_dir\Exceptionless"; ExternalNuGetDependencies = $null; UseMSBuild = $false; },
11-
@{ Name = "Exceptionless.Signed"; SourceDir = "$source_dir\Exceptionless"; ExternalNuGetDependencies = $null; UseMSBuild = $false; },
12-
@{ Name = "Exceptionless.Portable"; SourceDir = "$source_dir\Exceptionless.Portable"; ExternalNuGetDependencies = $null; UseMSBuild = $false; },
13-
@{ Name = "Exceptionless.Portable.Signed"; SourceDir = "$source_dir\Exceptionless.Portable"; ExternalNuGetDependencies = $null; UseMSBuild = $false; },
14-
@{ Name = "Exceptionless.AspNetCore"; SourceDir = "$source_dir\Platforms\Exceptionless.AspNetCore"; ExternalNuGetDependencies = $null; UseMSBuild = $false; },
15-
@{ Name = "Exceptionless.AspNetCore.Signed"; SourceDir = "$source_dir\Platforms\Exceptionless.AspNetCore"; ExternalNuGetDependencies = $null; UseMSBuild = $false; },
16-
@{ Name = "Exceptionless.Mvc"; SourceDir = "$source_dir\Platforms\Exceptionless.Mvc"; ExternalNuGetDependencies = $null; UseMSBuild = $false; },
17-
@{ Name = "Exceptionless.Mvc.Signed"; SourceDir = "$source_dir\Platforms\Exceptionless.Mvc"; ExternalNuGetDependencies = $null; UseMSBuild = $false; },
18-
@{ Name = "Exceptionless.Nancy"; SourceDir = "$source_dir\Platforms\Exceptionless.Nancy"; ExternalNuGetDependencies = $null; UseMSBuild = $false; },
19-
@{ Name = "Exceptionless.WebApi"; SourceDir = "$source_dir\Platforms\Exceptionless.WebApi"; ExternalNuGetDependencies = $null; UseMSBuild = $false; },
20-
@{ Name = "Exceptionless.WebApi.Signed"; SourceDir = "$source_dir\Platforms\Exceptionless.WebApi"; ExternalNuGetDependencies = $null; UseMSBuild = $false; },
21-
@{ Name = "Exceptionless.Web"; SourceDir = "$source_dir\Platforms\Exceptionless.Web"; ExternalNuGetDependencies = $null; UseMSBuild = $false; },
22-
@{ Name = "Exceptionless.Web.Signed"; SourceDir = "$source_dir\Platforms\Exceptionless.Web"; ExternalNuGetDependencies = $null; UseMSBuild = $false; },
23-
@{ Name = "Exceptionless.Windows"; SourceDir = "$source_dir\Platforms\Exceptionless.Windows"; ExternalNuGetDependencies = $null; UseMSBuild = $false; },
24-
@{ Name = "Exceptionless.Windows.Signed"; SourceDir = "$source_dir\Platforms\Exceptionless.Windows"; ExternalNuGetDependencies = $null; UseMSBuild = $false; },
25-
@{ Name = "Exceptionless.Wpf"; SourceDir = "$source_dir\Platforms\Exceptionless.Wpf"; ExternalNuGetDependencies = $null; UseMSBuild = $false; },
26-
@{ Name = "Exceptionless.Wpf.Signed"; SourceDir = "$source_dir\Platforms\Exceptionless.Wpf"; ExternalNuGetDependencies = $null; UseMSBuild = $false; },
27-
@{ Name = "Exceptionless.NLog"; SourceDir = "$source_dir\Platforms\Exceptionless.NLog"; ExternalNuGetDependencies = "NLog"; UseMSBuild = $false; }
28-
@{ Name = "Exceptionless.NLog.Signed"; SourceDir = "$source_dir\Platforms\Exceptionless.NLog"; ExternalNuGetDependencies = "NLog"; UseMSBuild = $false; }
29-
@{ Name = "Exceptionless.Log4net"; SourceDir = "$source_dir\Platforms\Exceptionless.Log4net"; ExternalNuGetDependencies = "log4net"; UseMSBuild = $false; }
30-
@{ Name = "Exceptionless.Log4net.Signed"; SourceDir = "$source_dir\Platforms\Exceptionless.Log4net"; ExternalNuGetDependencies = "log4net"; UseMSBuild = $false; }
10+
@{ Name = "Exceptionless"; SourceDir = "$source_dir\Exceptionless"; ExternalNuGetDependencies = $null; UseMSBuild = $False; },
11+
@{ Name = "Exceptionless.Signed"; SourceDir = "$source_dir\Exceptionless.Signed"; ExternalNuGetDependencies = $null; UseMSBuild = $False; },
12+
@{ Name = "Exceptionless.Portable"; SourceDir = "$source_dir\Exceptionless.Portable"; ExternalNuGetDependencies = $null; UseMSBuild = $False; },
13+
@{ Name = "Exceptionless.Portable.Signed"; SourceDir = "$source_dir\Exceptionless.Portable.Signed"; ExternalNuGetDependencies = $null; UseMSBuild = $False; },
14+
@{ Name = "Exceptionless.AspNetCore"; SourceDir = "$source_dir\Platforms\Exceptionless.AspNetCore"; ExternalNuGetDependencies = $null; UseMSBuild = $False; },
15+
@{ Name = "Exceptionless.AspNetCore.Signed"; SourceDir = "$source_dir\Platforms\Exceptionless.AspNetCore.Signed"; ExternalNuGetDependencies = $null; UseMSBuild = $False; },
16+
@{ Name = "Exceptionless.Mvc"; SourceDir = "$source_dir\Platforms\Exceptionless.Mvc"; ExternalNuGetDependencies = $null; UseMSBuild = $False; },
17+
@{ Name = "Exceptionless.Mvc.Signed"; SourceDir = "$source_dir\Platforms\Exceptionless.Mvc.Signed"; ExternalNuGetDependencies = $null; UseMSBuild = $False; },
18+
@{ Name = "Exceptionless.Nancy"; SourceDir = "$source_dir\Platforms\Exceptionless.Nancy"; ExternalNuGetDependencies = $null; UseMSBuild = $False; },
19+
@{ Name = "Exceptionless.WebApi"; SourceDir = "$source_dir\Platforms\Exceptionless.WebApi"; ExternalNuGetDependencies = $null; UseMSBuild = $False; },
20+
@{ Name = "Exceptionless.WebApi.Signed"; SourceDir = "$source_dir\Platforms\Exceptionless.WebApi.Signed"; ExternalNuGetDependencies = $null; UseMSBuild = $False; },
21+
@{ Name = "Exceptionless.Web"; SourceDir = "$source_dir\Platforms\Exceptionless.Web"; ExternalNuGetDependencies = $null; UseMSBuild = $False; },
22+
@{ Name = "Exceptionless.Web.Signed"; SourceDir = "$source_dir\Platforms\Exceptionless.Web.Signed"; ExternalNuGetDependencies = $null; UseMSBuild = $False; },
23+
@{ Name = "Exceptionless.NLog"; SourceDir = "$source_dir\Platforms\Exceptionless.NLog"; ExternalNuGetDependencies = "NLog"; UseMSBuild = $False; },
24+
@{ Name = "Exceptionless.NLog.Signed"; SourceDir = "$source_dir\Platforms\Exceptionless.NLog.Signed"; ExternalNuGetDependencies = "NLog"; UseMSBuild = $False; },
25+
@{ Name = "Exceptionless.Log4net"; SourceDir = "$source_dir\Platforms\Exceptionless.Log4net"; ExternalNuGetDependencies = "log4net"; UseMSBuild = $False; },
26+
@{ Name = "Exceptionless.Log4net.Signed"; SourceDir = "$source_dir\Platforms\Exceptionless.Log4net.Signed"; ExternalNuGetDependencies = "log4net"; UseMSBuild = $False; },
3127

32-
@{ Name = "Exceptionless.Windows"; SourceDir = "$source_dir\Platforms\Exceptionless.Windows"; ExternalNuGetDependencies = $null; UseMSBuild = $true; },
33-
@{ Name = "Exceptionless.Windows.Signed"; SourceDir = "$source_dir\Platforms\Exceptionless.Windows"; ExternalNuGetDependencies = $null; UseMSBuild = $true; },
34-
@{ Name = "Exceptionless.Wpf"; SourceDir = "$source_dir\Platforms\Exceptionless.Wpf"; ExternalNuGetDependencies = $null; UseMSBuild = $true; },
35-
@{ Name = "Exceptionless.Wpf.Signed"; SourceDir = "$source_dir\Platforms\Exceptionless.Wpf"; ExternalNuGetDependencies = $null; UseMSBuild = $true; },
28+
@{ Name = "Exceptionless.Windows"; SourceDir = "$source_dir\Platforms\Exceptionless.Windows"; ExternalNuGetDependencies = $null; UseMSBuild = $True; },
29+
@{ Name = "Exceptionless.Windows.Signed"; SourceDir = "$source_dir\Platforms\Exceptionless.Windows"; ExternalNuGetDependencies = $null; UseMSBuild = $True; },
30+
@{ Name = "Exceptionless.Wpf"; SourceDir = "$source_dir\Platforms\Exceptionless.Wpf"; ExternalNuGetDependencies = $null; UseMSBuild = $True; },
31+
@{ Name = "Exceptionless.Wpf.Signed"; SourceDir = "$source_dir\Platforms\Exceptionless.Wpf"; ExternalNuGetDependencies = $null; UseMSBuild = $True; }
3632
)
3733

3834
$client_build_configurations = @(
39-
@{ Constants = "NET45"; TargetFrameworkVersionProperty="NET45"; NuGetDir = "net45"; }
35+
@{ Constants = "NET45"; TargetFrameworkVersionProperty="NET45"; NuGetDir = "net45"; }
4036
)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"version": "99.99.99-dev",
3+
"title": "[DEPRECATED] Exceptionless Portable Class Library",
4+
"authors": [ "Exceptionless" ],
5+
"copyright": "Copyright (c) 2016 Exceptionless. All rights reserved.",
6+
"description": "[DEPRECATED] Please install the Exceptionless package instead.",
7+
"packOptions": {
8+
"tags": [ "Exceptionless", "Error", "Report", "Reporting", "Exception", "Logging", "Log", "ELMAH", "pcl" ],
9+
"owners": [ "Exceptionless" ],
10+
"projectUrl": "http://exceptionless.io",
11+
"releaseNotes": "https://github.com/exceptionless/Exceptionless.Net/releases",
12+
"iconUrl": "https://be.exceptionless.io/img/exceptionless-32.png",
13+
"licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0",
14+
"repository": {
15+
"type": "git",
16+
"url": "https://github.com/exceptionless/Exceptionless.Net"
17+
},
18+
"files": {
19+
"include": [ "readme.txt" ]
20+
}
21+
},
22+
"buildOptions": {
23+
"compile": {
24+
"include": [
25+
"../GlobalAssemblyInfo.cs"
26+
]
27+
}
28+
},
29+
"dependencies": {
30+
"Exceptionless":{
31+
"target": "project"
32+
}
33+
},
34+
"frameworks": {
35+
"netstandard1.2": {},
36+
"netstandard1.3": {},
37+
"netstandard1.4": {},
38+
"netstandard1.5": {},
39+
".NETPortable,Version=v4.6,Profile=Profile151": {},
40+
"net45": {}
41+
}
42+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The Exceptionless.Portable.Signed package has been deprecated. Please install the Exceptionless.Signed package.

0 commit comments

Comments
 (0)