diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..6a7cb7fe3fff6bd9add4f7942200b2d1f24d82d5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,270 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +project.fragment.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user +Resharper + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +#*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +#cake +tools/* +!tools/packages.config +dist/ + +#linq2db +src/.tools/* \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..b339a45c43a1dcb4b80ab99e6224bc7232abd723 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,55 @@ +stages: + - test + - release + - releasetrigger + +cake:Test: + stage: test + script: + - PowerShell .\build.ps1 -Target Test -Configuration Debug + variables: + GIT_STRATEGY: clone + artifacts: + reports: + junit: "./Artifacts/TestResults.xml" + paths: + - "./Artifacts/*" + except: + - master + - tags + +cake:Release: + stage: release + script: + - PowerShell .\build.ps1 -Target Release -Configuration Release --nugetApiKey="${NUGET_API_KEY}" + variables: + GIT_STRATEGY: clone + dependencies: + - cake:Test + artifacts: + paths: + - "./Artifacts/*" + only: + - tags + +cake:Prerelease: + stage: release + script: + - PowerShell .\build.ps1 -Target Prerelease -Configuration Release + variables: + GIT_STRATEGY: clone + dependencies: + - cake:Test + artifacts: + paths: + - "./Artifacts/*" + except: + - tags + - master + +cake:GitlabRelease: + stage: releasetrigger + script: + - PowerShell .\build.ps1 -Target GitlabRelease --GitlabProjectPath="${CI_PROJECT_PATH}" --gitlabProjectId="${CI_PROJECT_ID}" --gitlabToken="${GITLAB_TOKEN}" + only: + - master \ No newline at end of file diff --git a/GitVersion.yml b/GitVersion.yml new file mode 100644 index 0000000000000000000000000000000000000000..1bdc0fe219f5f35d8a024a66d9fd715f44539640 --- /dev/null +++ b/GitVersion.yml @@ -0,0 +1,7 @@ +mode: ContinuousDeployment +next-version: 1.0.0 +major-version-bump-message: 'Breaking:' +minor-version-bump-message: '(Update|New):' +patch-version-bump-message: 'Fix:' +no-bump-message: '.*' +commit-message-incrementing: Enabled \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..1cacbda86167c5f5629e9d3f8605295ad009460f --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 RWTH Aachen University + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/build.cake b/build.cake new file mode 100644 index 0000000000000000000000000000000000000000..81648ff61bbee492e1bc7b4390eb8e0cc33d3056 --- /dev/null +++ b/build.cake @@ -0,0 +1,351 @@ +#tool nuget:?package=NUnit.ConsoleRunner&version=3.10.0 +#tool nuget:?package=vswhere&version=2.8.4 +#tool nuget:?package=GitVersion.CommandLine&version=5.1.3 + +#addin nuget:https://api.nuget.org/v3/index.json?package=Cake.Json&version=4.0.0 +#addin nuget:https://api.nuget.org/v3/index.json?package=Newtonsoft.Json&version=11.0.2 +#addin nuget:https://api.nuget.org/v3/index.json?package=Cake.FileHelpers&version=3.2.1 + +using System.Net; +using System.Net.Http; + +// Commandline arguments +var target = Argument("target", "Default"); +var configuration = Argument("configuration", "Release"); +var nugetApiKey = Argument<string>("nugetApiKey", null); +var version = Argument("nugetVersion", ""); +var gitlabProjectPath = Argument("gitlabProjectPath", ""); +var gitlabProjectId = Argument("gitlabProjectId", ""); +var gitlabToken = Argument("gitlabToken", ""); + +// Define directories +var projects = GetFiles("./**/*.csproj"); +var artifactsDir = Directory("./Artifacts"); +string nupkgDir; +var solutionFile = GetFiles("./**/*.sln").First(); +var projectName = solutionFile.GetFilenameWithoutExtension().ToString(); +var nugetSource = "https://api.nuget.org/v3/index.json"; +var assemblyInfoSubPath = "Properties/AssemblyInfo.cs"; +var semanticVersion = ""; +string localNugetFeed; + +// get latest MSBuild version +var vsLatest = VSWhereLatest(); +var msBuildPathX64 = (vsLatest == null) ? null : vsLatest.CombineWithFilePath("./MSBuild/Current/Bin/MSBuild.exe"); + +Setup(context =>{ + nupkgDir = $"{artifactsDir.ToString()}/nupkg"; + var branch = GitVersion(new GitVersionSettings { + UpdateAssemblyInfo = false + }).BranchName.Replace("/", "-"); + + localNugetFeed = $"C:\\coscine\\LocalNugetFeeds\\{branch}"; + Information("{0}", branch); + Information("Started at {0}", DateTime.Now); +}); + +Teardown(context =>{ + Information("Finished at {0}", DateTime.Now); +}); + +Task("Clean") +.Description("Cleans all build and artifacts directories") +.Does(() =>{ + var settings = new DeleteDirectorySettings { + Recursive = true, + Force = true + }; + + var directoriesToClean = new List<DirectoryPath>(); + + foreach(var project in projects) { + directoriesToClean.Add(Directory($"{project.GetDirectory()}/obj")); + directoriesToClean.Add(Directory($"{project.GetDirectory()}/bin")); + } + + directoriesToClean.Add(artifactsDir); + + foreach(var dir in directoriesToClean) { + Information("Cleaning {0}", dir.ToString()); + if (DirectoryExists(dir)) { + DeleteDirectory(dir, settings); + CreateDirectory(dir); + } else { + CreateDirectory(dir); + } + } +}); + +Task("Restore") +.Does(() =>{ + NuGetRestore(solutionFile, new NuGetRestoreSettings { + NoCache = true, + FallbackSource = new List<string>{ localNugetFeed }, + }); +}); + +Task("Test") +.IsDependentOn("Build") +.Does(() =>{ + NUnit3($"./src/**/bin/{configuration}/*.Tests.dll", new NUnit3Settings { + // generate the xml file + NoResults = false, + Results = new NUnit3Result[] { + new NUnit3Result() { + FileName = $"{artifactsDir}/TestResults.xml", + Transform = $"{Context.Environment.WorkingDirectory}/nunit3-junit.xslt" + } + } + }); +}); + +Task("GitVersion") +.Does(() => { + if(string.IsNullOrWhiteSpace(version)) { + version = GitVersion(new GitVersionSettings { + UpdateAssemblyInfo = false + }).NuGetVersionV2; + } + var index = version.IndexOf("-"); + semanticVersion = index > 0 ? version.Substring(0, index) : version; + Information("Version: {0}, SemanticVersion: {1}", version, semanticVersion); +}); + +Task("UpdateAssemblyInfo") +.Does(() =>{ + var index = version.IndexOf("-"); + var semanticVersion = index > 0 ? version.Substring(0, index) : version; + + foreach(var project in projects) { + CreateAssemblyInfo($"{project.GetDirectory()}/{assemblyInfoSubPath}", new AssemblyInfoSettings { + Product = project.GetFilenameWithoutExtension().ToString(), + Title = project.GetFilenameWithoutExtension().ToString(), + Company = "IT Center, RWTH Aachen University", + Version = semanticVersion, + FileVersion = semanticVersion, + InformationalVersion = version, + Copyright = $"{DateTime.Now.Year} IT Center, RWTH Aachen University", + Description = $"{project.GetFilenameWithoutExtension().ToString()} is a part of the CoScInE group." + }); + } +}); + +Task("GitlabRelease") +.IsDependentOn("GitVersion") +.Does(() => { + var client = new HttpClient(); + client.DefaultRequestHeaders.Add("PRIVATE-TOKEN", gitlabToken); + + // get the latest tag + var result = client.GetAsync($"https://git.rwth-aachen.de/api/v4/projects/{gitlabProjectId}/repository/tags").Result; + if(!result.IsSuccessStatusCode) { + throw new Exception("Tag query failed."); + } + + var tagList = result.Content.ReadAsStringAsync().Result; + var jArray = JArray.Parse(tagList); + // null if not tags exists yet + var lastTag = jArray.Select(x => x["name"]).FirstOrDefault(); + + var url = $"https://git.rwth-aachen.de/{gitlabProjectPath}"; + + if(url.EndsWith(".git")) { + url = url.Substring(0, url.Length - ".git".Length); + } + + if(url.EndsWith("/")) { + url = url.Substring(0, url.Length - 1); + } + + var description = ""; + // First line of description + // Gitlab compare url, if something can be compared + if(lastTag == null) { + description = $"# {semanticVersion} ({DateTime.Now.Year}-{DateTime.Now.Month}-{DateTime.Now.Day})\n\n\n"; + } else { + description = $"# [{semanticVersion}]({url}/compare/{lastTag}...v{semanticVersion}) ({DateTime.Now.Year}-{DateTime.Now.Month}-{DateTime.Now.Day})\n\n\n"; + } + + // From when will messages be parsed, null results in all messages + var logParam = ""; + if(lastTag != null) { + logParam = $"{lastTag}..Head"; + } + + Information(lastTag); + + IEnumerable<string> redirectedStandardOutput; + var exitCodeWithArgument = + StartProcess( + "git", + new ProcessSettings { + Arguments = $"log {logParam} --pretty=format:HASH%h:%B", + RedirectStandardOutput = true + }, + out redirectedStandardOutput + ); + + var prefixList = new Dictionary<string, List<string>>{ + {"Fix", new List<string>()}, + {"Update", new List<string>()}, + {"New", new List<string>()}, + {"Breaking", new List<string>()}, + {"Docs", new List<string>()}, + {"Build", new List<string>()}, + {"Upgrade", new List<string>()}, + {"Chore", new List<string>()}, + }; + + var currentHash = ""; + // Output last line of process output. + foreach(var line in redirectedStandardOutput) { + var commitMessage = ""; + if(line.StartsWith("HASH")) { + currentHash = line.Substring("HASH".Length); + currentHash = currentHash.Substring(0, currentHash.IndexOf(":")); + commitMessage = line.Substring(currentHash.Length + line.IndexOf(currentHash) + 1); + } else { + commitMessage = line; + } + + foreach(var kv in prefixList) { + if(commitMessage.StartsWith($"{kv.Key}:")) { + kv.Value.Add($"* {commitMessage.Substring(kv.Key.Length + 1).Trim()} {currentHash}"); + break; + } + }; + } + + foreach(var kv in prefixList) { + if(kv.Value.Any()) { + description += $" ### {kv.Key}\n\n"; + foreach(var line in kv.Value) { + description += $"{line}\n"; + } + description += "\n"; + } + } + // correctly escape the json newlines + description = description.Replace("\n", "\\n"); + Information("Description: {0}", description); + + // create tag + result = client.PostAsync($"https://git.rwth-aachen.de/api/v4/projects/{gitlabProjectId}/repository/tags?tag_name=v{semanticVersion}&ref=master", null).Result; + Information("Create tag: {0}", result.Content.ReadAsStringAsync().Result); + if(!result.IsSuccessStatusCode) { + throw new Exception("Tag creation failed."); + } + + // create release + var json = $"{{\"name\": \"v{semanticVersion}\", \"tag_name\": \"v{semanticVersion}\", \"description\": \"{description}\"}}"; + var content = new StringContent(json, Encoding.UTF8, "application/json"); + result = client.PostAsync($"https://git.rwth-aachen.de/api/v4/projects/{gitlabProjectId}/releases", content).Result; + Information("Create release: {0}", result.Content.ReadAsStringAsync().Result); + if(!result.IsSuccessStatusCode) { + throw new Exception("Release creation failed."); + } +}); + +Task("Build") +.IsDependentOn("Clean") +.IsDependentOn("GitVersion") +.IsDependentOn("UpdateAssemblyInfo") +.IsDependentOn("Restore") +.Does(() =>{ + var frameworkSettingsWindows = new MSBuildSettings { + Configuration = configuration + }; + + frameworkSettingsWindows.ToolPath = msBuildPathX64; + frameworkSettingsWindows.WorkingDirectory = Context.Environment.WorkingDirectory; + + if (configuration.Equals("Release")) { + frameworkSettingsWindows.WithProperty("DebugSymbols", "false"); + frameworkSettingsWindows.WithProperty("DebugType", "None"); + } + + // Use MSBuild + Information("Building {0}", solutionFile); + MSBuild(solutionFile, frameworkSettingsWindows); +}); + +Task("NugetPack") +.IsDependentOn("Build") +.Does(() =>{ + foreach(var project in projects) { + var nuspec = $"{project.GetDirectory()}/{project.GetFilenameWithoutExtension()}.nuspec"; + if(!project.ToString().EndsWith(".Tests") && FileExists(nuspec)) + { + var settings = new NuGetPackSettings + { + OutputDirectory = nupkgDir, + Version = version, + Properties = new Dictionary<string, string> + { + { "Configuration", configuration} + } + }; + NuGetPack(project.ToString(), settings); + } + } +}); + +Task("NugetPush") +.IsDependentOn("NugetPack") +.Does(() =>{ + var nupkgs = GetFiles($"{nupkgDir}/*.nupkg"); + Information("Need to push {0} packages", nupkgs.Count); + if(!String.IsNullOrWhiteSpace(nugetApiKey)) { + foreach(var nupkg in nupkgs) { + Information("Pushing {0}", nupkg); + NuGetPush(nupkg, new NuGetPushSettings { + Source = nugetSource, + ApiKey = nugetApiKey + }); + } + } else { + Information("NugetApiKey is not set. Can't push."); + throw new Exception("NugetApiKey is not set. Can't push."); + } +}); + +Task("CopyToArtifacts") +.Does(() =>{ + foreach(var project in projects) { + if(!project.GetDirectory().ToString().EndsWith(".Tests") + && !FileExists($"{project.GetDirectory()}/{project.GetFilenameWithoutExtension()}.nuspec") + && DirectoryExists(project.GetDirectory())) + { + Information("Copying {0}/* to {1}", $"{project.GetDirectory()}/bin/{configuration}", artifactsDir); + CopyDirectory($"{project.GetDirectory()}/bin/{configuration}/", artifactsDir); + } + } +}); + +Task("NugetPushLocal") +.IsDependentOn("NugetPack") +.Does(() =>{ + var nupkgs = GetFiles($"{nupkgDir}/*.nupkg"); + foreach(var nupkg in nupkgs) { + if(!DirectoryExists(localNugetFeed)) { + CreateDirectory(localNugetFeed); + } + CopyFile(nupkg.ToString(), $"{localNugetFeed}\\{nupkg.GetFilename()}"); + } +}); + +Task("Prerelease") +.IsDependentOn("Build") +.IsDependentOn("CopyToArtifacts") +.IsDependentOn("NugetPushLocal"); + +Task("Release") +.IsDependentOn("NugetPack") +.IsDependentOn("CopyToArtifacts") +.IsDependentOn("NugetPushLocal") +.IsDependentOn("NugetPush"); + +Task("Default") +.IsDependentOn("Test"); + +RunTarget(target); diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..7f1f813d74cf6c0826517482757c38b86e0467b3 --- /dev/null +++ b/build.ps1 @@ -0,0 +1,256 @@ +########################################################################## +# This is the Cake bootstrapper script for PowerShell. +# This file was downloaded from https://github.com/cake-build/resources +# Feel free to change this file to fit your needs. +########################################################################## + +<# + +.SYNOPSIS +This is a Powershell script to bootstrap a Cake build. + +.DESCRIPTION +This Powershell script will download NuGet if missing, restore NuGet tools (including Cake) +and execute your Cake build script with the parameters you provide. + +.PARAMETER Script +The build script to execute. +.PARAMETER Target +The build script target to run. +.PARAMETER Configuration +The build configuration to use. +.PARAMETER Verbosity +Specifies the amount of information to be displayed. +.PARAMETER ShowDescription +Shows description about tasks. +.PARAMETER DryRun +Performs a dry run. +.PARAMETER SkipToolPackageRestore +Skips restoring of packages. +.PARAMETER ScriptArgs +Remaining arguments are added here. + +.LINK +https://cakebuild.net + +#> + +[CmdletBinding()] +Param( + [string]$Script = "build.cake", + [string]$Target, + [string]$Configuration, + [ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")] + [string]$Verbosity, + [switch]$ShowDescription, + [Alias("WhatIf", "Noop")] + [switch]$DryRun, + [switch]$SkipToolPackageRestore, + [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)] + [string[]]$ScriptArgs +) + +# Attempt to set highest encryption available for SecurityProtocol. +# PowerShell will not set this by default (until maybe .NET 4.6.x). This +# will typically produce a message for PowerShell v2 (just an info +# message though) +try { + # Set TLS 1.2 (3072), then TLS 1.1 (768), then TLS 1.0 (192), finally SSL 3.0 (48) + # Use integers because the enumeration values for TLS 1.2 and TLS 1.1 won't + # exist in .NET 4.0, even though they are addressable if .NET 4.5+ is + # installed (.NET 4.5 is an in-place upgrade). + # PowerShell Core already has support for TLS 1.2 so we can skip this if running in that. + if (-not $IsCoreCLR) { + [System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48 + } + } catch { + Write-Output 'Unable to set PowerShell to use TLS 1.2 and TLS 1.1 due to old .NET Framework installed. If you see underlying connection closed or trust errors, you may need to upgrade to .NET Framework 4.5+ and PowerShell v3' + } + +[Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null +function MD5HashFile([string] $filePath) +{ + if ([string]::IsNullOrEmpty($filePath) -or !(Test-Path $filePath -PathType Leaf)) + { + return $null + } + + [System.IO.Stream] $file = $null; + [System.Security.Cryptography.MD5] $md5 = $null; + try + { + $md5 = [System.Security.Cryptography.MD5]::Create() + $file = [System.IO.File]::OpenRead($filePath) + return [System.BitConverter]::ToString($md5.ComputeHash($file)) + } + finally + { + if ($file -ne $null) + { + $file.Dispose() + } + } +} + +function GetProxyEnabledWebClient +{ + $wc = New-Object System.Net.WebClient + $proxy = [System.Net.WebRequest]::GetSystemWebProxy() + $proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials + $wc.Proxy = $proxy + return $wc +} + +Write-Host "Preparing to run build script..." + +if(!$PSScriptRoot){ + $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent +} + +$TOOLS_DIR = Join-Path $PSScriptRoot "tools" +$ADDINS_DIR = Join-Path $TOOLS_DIR "Addins" +$MODULES_DIR = Join-Path $TOOLS_DIR "Modules" +$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe" +$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe" +$NUGET_URL = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" +$PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config" +$PACKAGES_CONFIG_MD5 = Join-Path $TOOLS_DIR "packages.config.md5sum" +$ADDINS_PACKAGES_CONFIG = Join-Path $ADDINS_DIR "packages.config" +$MODULES_PACKAGES_CONFIG = Join-Path $MODULES_DIR "packages.config" + +# Make sure tools folder exists +if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) { + Write-Verbose -Message "Creating tools directory..." + New-Item -Path $TOOLS_DIR -Type Directory | Out-Null +} + +# Make sure that packages.config exist. +if (!(Test-Path $PACKAGES_CONFIG)) { + Write-Verbose -Message "Downloading packages.config..." + try { + $wc = GetProxyEnabledWebClient + $wc.DownloadFile("https://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG) + } catch { + Throw "Could not download packages.config." + } +} + +# Try find NuGet.exe in path if not exists +if (!(Test-Path $NUGET_EXE)) { + Write-Verbose -Message "Trying to find nuget.exe in PATH..." + $existingPaths = $Env:Path -Split ';' | Where-Object { (![string]::IsNullOrEmpty($_)) -and (Test-Path $_ -PathType Container) } + $NUGET_EXE_IN_PATH = Get-ChildItem -Path $existingPaths -Filter "nuget.exe" | Select -First 1 + if ($NUGET_EXE_IN_PATH -ne $null -and (Test-Path $NUGET_EXE_IN_PATH.FullName)) { + Write-Verbose -Message "Found in PATH at $($NUGET_EXE_IN_PATH.FullName)." + $NUGET_EXE = $NUGET_EXE_IN_PATH.FullName + } +} + +# Try download NuGet.exe if not exists +if (!(Test-Path $NUGET_EXE)) { + Write-Verbose -Message "Downloading NuGet.exe..." + try { + $wc = GetProxyEnabledWebClient + $wc.DownloadFile($NUGET_URL, $NUGET_EXE) + } catch { + Throw "Could not download NuGet.exe." + } +} + +# Save nuget.exe path to environment to be available to child processed +$env:NUGET_EXE = $NUGET_EXE +$env:NUGET_EXE_INVOCATION = if ($IsLinux -or $IsMacOS) { + "mono `"$NUGET_EXE`"" +} else { + "`"$NUGET_EXE`"" +} + +# Restore tools from NuGet? +if(-Not $SkipToolPackageRestore.IsPresent) { + Push-Location + Set-Location $TOOLS_DIR + + # Check for changes in packages.config and remove installed tools if true. + [string] $md5Hash = MD5HashFile $PACKAGES_CONFIG + if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or + ($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) { + Write-Verbose -Message "Missing or changed package.config hash..." + Get-ChildItem -Exclude packages.config,nuget.exe,Cake.Bakery | + Remove-Item -Recurse + } + + Write-Verbose -Message "Restoring tools from NuGet..." + + $NuGetOutput = Invoke-Expression "& $env:NUGET_EXE_INVOCATION install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`"" + + if ($LASTEXITCODE -ne 0) { + Throw "An error occurred while restoring NuGet tools." + } + else + { + $md5Hash | Out-File $PACKAGES_CONFIG_MD5 -Encoding "ASCII" + } + Write-Verbose -Message ($NuGetOutput | Out-String) + + Pop-Location +} + +# Restore addins from NuGet +if (Test-Path $ADDINS_PACKAGES_CONFIG) { + Push-Location + Set-Location $ADDINS_DIR + + Write-Verbose -Message "Restoring addins from NuGet..." + $NuGetOutput = Invoke-Expression "& $env:NUGET_EXE_INVOCATION install -ExcludeVersion -OutputDirectory `"$ADDINS_DIR`"" + + if ($LASTEXITCODE -ne 0) { + Throw "An error occurred while restoring NuGet addins." + } + + Write-Verbose -Message ($NuGetOutput | Out-String) + + Pop-Location +} + +# Restore modules from NuGet +if (Test-Path $MODULES_PACKAGES_CONFIG) { + Push-Location + Set-Location $MODULES_DIR + + Write-Verbose -Message "Restoring modules from NuGet..." + $NuGetOutput = Invoke-Expression "& $env:NUGET_EXE_INVOCATION install -ExcludeVersion -OutputDirectory `"$MODULES_DIR`"" + + if ($LASTEXITCODE -ne 0) { + Throw "An error occurred while restoring NuGet modules." + } + + Write-Verbose -Message ($NuGetOutput | Out-String) + + Pop-Location +} + +# Make sure that Cake has been installed. +if (!(Test-Path $CAKE_EXE)) { + Throw "Could not find Cake.exe at $CAKE_EXE" +} + +$CAKE_EXE_INVOCATION = if ($IsLinux -or $IsMacOS) { + "mono `"$CAKE_EXE`"" +} else { + "`"$CAKE_EXE`"" +} + + +# Build Cake arguments +$cakeArguments = @("$Script"); +if ($Target) { $cakeArguments += "-target=$Target" } +if ($Configuration) { $cakeArguments += "-configuration=$Configuration" } +if ($Verbosity) { $cakeArguments += "-verbosity=$Verbosity" } +if ($ShowDescription) { $cakeArguments += "-showdescription" } +if ($DryRun) { $cakeArguments += "-dryrun" } +$cakeArguments += $ScriptArgs + +# Start Cake +Write-Host "Running build script..." +Invoke-Expression "& $CAKE_EXE_INVOCATION $($cakeArguments -join " ")" +exit $LASTEXITCODE diff --git a/build.sh b/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..d088917ed78538ff57cf654cf71aad6bf045d655 --- /dev/null +++ b/build.sh @@ -0,0 +1,122 @@ +#!/usr/bin/env bash + +#The MIT License (MIT) +# +#Copyright (c) 2014 - 2016 Patrik Svensson, Mattias Karlsson, Gary Ewan Park and contributors +# +#Permission is hereby granted, free of charge, to any person obtaining a copy of +#this software and associated documentation files (the "Software"), to deal in +#the Software without restriction, including without limitation the rights to +#use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +#the Software, and to permit persons to whom the Software is furnished to do so, +#subject to the following conditions: +# +#The above copyright notice and this permission notice shall be included in all +#copies or substantial portions of the Software. +# +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +#FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +#COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +#IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +#CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +########################################################################## +# This is the Cake bootstrapper script for Linux and OS X. +# This file was downloaded from https://github.com/cake-build/resources +# Feel free to change this file to fit your needs. +########################################################################## + +# Define directories. +SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +TOOLS_DIR=$SCRIPT_DIR/tools +NUGET_EXE=$TOOLS_DIR/nuget.exe +CAKE_EXE=$TOOLS_DIR/Cake/Cake.exe +PACKAGES_CONFIG=$TOOLS_DIR/packages.config +PACKAGES_CONFIG_MD5=$TOOLS_DIR/packages.config.md5sum + +# Define md5sum or md5 depending on Linux/OSX +MD5_EXE= +if [[ "$(uname -s)" == "Darwin" ]]; then + MD5_EXE="md5 -r" +else + MD5_EXE="md5sum" +fi + +# Define default arguments. +SCRIPT="build.cake" +TARGET="Default" +CONFIGURATION="Release" +VERBOSITY="verbose" +DRYRUN= +SHOW_VERSION=false +SCRIPT_ARGUMENTS=() + +# Parse arguments. +for i in "$@"; do + case $1 in + -s|--script) SCRIPT="$2"; shift ;; + -t|--target) TARGET="$2"; shift ;; + -c|--configuration) CONFIGURATION="$2"; shift ;; + -v|--verbosity) VERBOSITY="$2"; shift ;; + -d|--dryrun) DRYRUN="-dryrun" ;; + --version) SHOW_VERSION=true ;; + --) shift; SCRIPT_ARGUMENTS+=("$@"); break ;; + *) SCRIPT_ARGUMENTS+=("$1") ;; + esac + shift +done + +# Make sure the tools folder exist. +if [ ! -d "$TOOLS_DIR" ]; then + mkdir "$TOOLS_DIR" +fi + +# Make sure that packages.config exist. +if [ ! -f "$TOOLS_DIR/packages.config" ]; then + echo "Downloading packages.config..." + curl -Lsfo "$TOOLS_DIR/packages.config" https://cakebuild.net/download/bootstrapper/packages + if [ $? -ne 0 ]; then + echo "An error occurred while downloading packages.config." + exit 1 + fi +fi + +# Download NuGet if it does not exist. +if [ ! -f "$NUGET_EXE" ]; then + echo "Downloading NuGet..." + curl -Lsfo "$NUGET_EXE" https://dist.nuget.org/win-x86-commandline/latest/nuget.exe + if [ $? -ne 0 ]; then + echo "An error occurred while downloading nuget.exe." + exit 1 + fi +fi + +# Restore tools from NuGet. +pushd "$TOOLS_DIR" >/dev/null +if [ ! -f $PACKAGES_CONFIG_MD5 ] || [ "$( cat $PACKAGES_CONFIG_MD5 | sed 's/\r$//' )" != "$( $MD5_EXE $PACKAGES_CONFIG | awk '{ print $1 }' )" ]; then + find . -type d ! -name . | xargs rm -rf +fi + +mono "$NUGET_EXE" install -ExcludeVersion +if [ $? -ne 0 ]; then + echo "Could not restore NuGet packages." + exit 1 +fi + +$MD5_EXE $PACKAGES_CONFIG | awk '{ print $1 }' >| $PACKAGES_CONFIG_MD5 + +popd >/dev/null + +# Make sure that Cake has been installed. +if [ ! -f "$CAKE_EXE" ]; then + echo "Could not find Cake.exe at '$CAKE_EXE'." + exit 1 +fi + +# Start Cake +if $SHOW_VERSION; then + exec mono "$CAKE_EXE" -version +else + exec mono "$CAKE_EXE" $SCRIPT -verbosity=$VERBOSITY -configuration=$CONFIGURATION -target=$TARGET $DRYRUN "${SCRIPT_ARGUMENTS[@]}" +fi \ No newline at end of file diff --git a/nunit3-junit.xslt b/nunit3-junit.xslt new file mode 100644 index 0000000000000000000000000000000000000000..bf69bdb1d2cd6fc2fdbeb915b4eb6732f720848e --- /dev/null +++ b/nunit3-junit.xslt @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Taken from: https://github.com/nunit/nunit-transforms/tree/master/nunit3-junit +--> +<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + <xsl:output method="xml" indent="yes"/> + + <xsl:template match="/test-run"> + <testsuites tests="{@testcasecount}" failures="{@failed}" disabled="{@skipped}" time="{@duration}"> + <xsl:apply-templates/> + </testsuites> + </xsl:template> + + <xsl:template match="test-suite"> + <xsl:if test="test-case"> + <testsuite tests="{@testcasecount}" time="{@duration}" errors="{@testcasecount - @passed - @skipped - @failed}" failures="{@failed}" skipped="{@skipped}" timestamp="{@start-time}"> + <xsl:attribute name="name"> + <xsl:for-each select="ancestor-or-self::test-suite/@name"> + <xsl:value-of select="concat(., '.')"/> + </xsl:for-each> + </xsl:attribute> + <xsl:apply-templates select="test-case"/> + </testsuite> + <xsl:apply-templates select="test-suite"/> + </xsl:if> + <xsl:if test="not(test-case)"> + <xsl:apply-templates/> + </xsl:if> + </xsl:template> + + <xsl:template match="test-case"> + <testcase name="{@name}" assertions="{@asserts}" time="{@duration}" status="{@result}" classname="{@classname}"> + <xsl:if test="@runstate = 'Skipped' or @runstate = 'Ignored'"> + <skipped/> + </xsl:if> + + <xsl:apply-templates/> + </testcase> + </xsl:template> + + <xsl:template match="command-line"/> + <xsl:template match="settings"/> + + <xsl:template match="output"> + <system-out> + <xsl:value-of select="."/> + </system-out> + </xsl:template> + + <xsl:template match="stack-trace"> + </xsl:template> + + <xsl:template match="test-case/failure"> + <failure message="{./message}"> + <xsl:value-of select="./stack-trace"/> + </failure> + </xsl:template> + + <xsl:template match="test-suite/failure"/> + + <xsl:template match="test-case/reason"> + <skipped message="{./message}"/> + </xsl:template> + + <xsl:template match="test-case/assertions"> + </xsl:template> + + <xsl:template match="test-suite/reason"/> + + <xsl:template match="properties"/> +</xsl:stylesheet> \ No newline at end of file diff --git a/src/Blob.sln b/src/Blob.sln new file mode 100644 index 0000000000000000000000000000000000000000..296bd2162ccc065f184ead54a71b89da7a4d7b00 --- /dev/null +++ b/src/Blob.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28803.156 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blob", "Blob\Blob.csproj", "{4F76105D-8FC5-403A-A822-9F306A028A76}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4F76105D-8FC5-403A-A822-9F306A028A76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F76105D-8FC5-403A-A822-9F306A028A76}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F76105D-8FC5-403A-A822-9F306A028A76}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F76105D-8FC5-403A-A822-9F306A028A76}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8E2298E1-85A2-4828-B018-60B841B9FE08} + EndGlobalSection +EndGlobal diff --git a/src/Blob/App.config b/src/Blob/App.config new file mode 100644 index 0000000000000000000000000000000000000000..98bfc1d9b102387141dd167913da87f9a82f0fd3 --- /dev/null +++ b/src/Blob/App.config @@ -0,0 +1,168 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <configSections> + <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> + <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> + </configSections> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> + </startup> + <entityFramework> + <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> + <parameters> + <parameter value="mssqllocaldb" /> + </parameters> + </defaultConnectionFactory> + <providers> + <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> + </providers> + </entityFramework> + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <dependentAssembly> + <assemblyIdentity name="Coscine.Configuration" publicKeyToken="ce3d7a32d7dc1e5a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-1.5.0.0" newVersion="1.5.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.IdentityModel.Logging" publicKeyToken="31bf3856ad364e35" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-6.6.0.0" newVersion="6.6.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.IdentityModel.Tokens" publicKeyToken="31bf3856ad364e35" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-6.6.0.0" newVersion="6.6.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-6.6.0.0" newVersion="6.6.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.Extensions.Configuration.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-3.1.5.0" newVersion="3.1.5.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-3.1.5.0" newVersion="3.1.5.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.Extensions.Logging" publicKeyToken="adb9793829ddae60" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-3.1.5.0" newVersion="3.1.5.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-3.1.5.0" newVersion="3.1.5.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.Extensions.Primitives" publicKeyToken="adb9793829ddae60" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-3.1.5.0" newVersion="3.1.5.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Security.Principal.Windows" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.1.1.1" newVersion="4.1.1.1" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.3.1" newVersion="4.0.3.1" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.AspNetCore.Http" publicKeyToken="adb9793829ddae60" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-2.2.2.0" newVersion="2.2.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.AspNetCore.Http.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.AspNetCore.Hosting.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.Extensions.Hosting.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.AspNetCore.Http.Features" publicKeyToken="adb9793829ddae60" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.AspNetCore.Routing.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.AspNetCore.Routing" publicKeyToken="adb9793829ddae60" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-2.2.2.0" newVersion="2.2.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.AspNetCore.Mvc.Core" publicKeyToken="adb9793829ddae60" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-2.2.2.0" newVersion="2.2.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.ComponentModel.Annotations" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-1.2.3.0" newVersion="1.2.3.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-1.4.3.0" newVersion="1.4.3.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Security.Cryptography.Cng" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.3.1.0" newVersion="4.3.1.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets" publicKeyToken="adb9793829ddae60" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-2.2.1.0" newVersion="2.2.1.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.Extensions.Configuration" publicKeyToken="adb9793829ddae60" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-3.1.5.0" newVersion="3.1.5.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.Extensions.Options" publicKeyToken="adb9793829ddae60" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-3.1.5.0" newVersion="3.1.5.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-3.1.5.0" newVersion="3.1.5.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.Extensions.Configuration.Binder" publicKeyToken="adb9793829ddae60" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-3.1.5.0" newVersion="3.1.5.0" /> + </dependentAssembly> + </assemblyBinding> + </runtime> +</configuration> \ No newline at end of file diff --git a/src/Blob/Blob.csproj b/src/Blob/Blob.csproj new file mode 100644 index 0000000000000000000000000000000000000000..400042f61695ba3ac1288f1efbddbb78ae4ca3e7 --- /dev/null +++ b/src/Blob/Blob.csproj @@ -0,0 +1,528 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="..\packages\Microsoft.AspNetCore.Mvc.Razor.Extensions.2.2.0\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.props" Condition="Exists('..\packages\Microsoft.AspNetCore.Mvc.Razor.Extensions.2.2.0\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.props')" /> + <Import Project="..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" /> + <Import Project="..\packages\Microsoft.DiaSymReader.Native.1.7.0\build\Microsoft.DiaSymReader.Native.props" Condition="Exists('..\packages\Microsoft.DiaSymReader.Native.1.7.0\build\Microsoft.DiaSymReader.Native.props')" /> + <Import Project="..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.2\build\Microsoft.CodeAnalysis.Analyzers.props" Condition="Exists('..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.2\build\Microsoft.CodeAnalysis.Analyzers.props')" /> + <Import Project="..\packages\Microsoft.AspNetCore.Razor.Design.2.2.0\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.props" Condition="Exists('..\packages\Microsoft.AspNetCore.Razor.Design.2.2.0\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.props')" /> + <Import Project="..\packages\linq2db.t4models.2.6.4\build\linq2db.t4models.props" Condition="Exists('..\packages\linq2db.t4models.2.6.4\build\linq2db.t4models.props')" /> + <Import Project="..\packages\linq2db.SqlServer.2.6.4\build\linq2db.SqlServer.props" Condition="Exists('..\packages\linq2db.SqlServer.2.6.4\build\linq2db.SqlServer.props')" /> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{4F76105D-8FC5-403A-A822-9F306A028A76}</ProjectGuid> + <OutputType>Exe</OutputType> + <RootNamespace>Coscine.Api.Blob</RootNamespace> + <AssemblyName>Coscine.Api.Blob</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> + <Deterministic>true</Deterministic> + <NuGetPackageImportStamp> + </NuGetPackageImportStamp> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="AWSSDK.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604, processorArchitecture=MSIL"> + <HintPath>..\packages\AWSSDK.Core.3.3.107.8\lib\net45\AWSSDK.Core.dll</HintPath> + </Reference> + <Reference Include="AWSSDK.S3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604, processorArchitecture=MSIL"> + <HintPath>..\packages\AWSSDK.S3.3.3.111.9\lib\net45\AWSSDK.S3.dll</HintPath> + </Reference> + <Reference Include="Consul, Version=0.7.2.6, Culture=neutral, PublicKeyToken=20a6ad9a81df1d95, processorArchitecture=MSIL"> + <HintPath>..\packages\Consul.0.7.2.6\lib\net45\Consul.dll</HintPath> + </Reference> + <Reference Include="Coscine.Api.WaterbutlerHelper, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\packages\Coscine.Api.WaterbutlerHelper.1.0.0-topic-802-refact0008\lib\net461\Coscine.Api.WaterbutlerHelper.dll</HintPath> + </Reference> + <Reference Include="Coscine.ApiCommons, Version=1.8.0.0, Culture=neutral, PublicKeyToken=af4c1345df96546b, processorArchitecture=MSIL"> + <HintPath>..\packages\Coscine.ApiCommons.1.8.0\lib\net461\Coscine.ApiCommons.dll</HintPath> + </Reference> + <Reference Include="Coscine.Configuration, Version=1.5.0.0, Culture=neutral, PublicKeyToken=ce3d7a32d7dc1e5a, processorArchitecture=MSIL"> + <HintPath>..\packages\Coscine.Configuration.1.5.0\lib\net461\Coscine.Configuration.dll</HintPath> + </Reference> + <Reference Include="Coscine.Database, Version=1.21.0.0, Culture=neutral, PublicKeyToken=767d77427707b70a, processorArchitecture=MSIL"> + <HintPath>..\packages\Coscine.Database.1.21.0\lib\net461\Coscine.Database.dll</HintPath> + </Reference> + <Reference Include="Coscine.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=e1ed402bc3f6525e, processorArchitecture=MSIL"> + <HintPath>..\packages\Coscine.Logging.1.2.0\lib\net461\Coscine.Logging.dll</HintPath> + </Reference> + <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath> + </Reference> + <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath> + </Reference> + <Reference Include="linq2db, Version=2.6.4.0, Culture=neutral, PublicKeyToken=e41013125f9e410a, processorArchitecture=MSIL"> + <HintPath>..\packages\linq2db.2.6.4\lib\net46\linq2db.dll</HintPath> + </Reference> + <Reference Include="LinqKit, Version=1.1.17.0, Culture=neutral, PublicKeyToken=bc217f8844052a91, processorArchitecture=MSIL"> + <HintPath>..\packages\LinqKit.1.1.17\lib\net45\LinqKit.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Antiforgery, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Antiforgery.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Antiforgery.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Authentication, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Authentication.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Authentication.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Authentication.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Authentication.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Authentication.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Authentication.Core, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Authentication.Core.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Authentication.Core.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Authentication.JwtBearer, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Authentication.JwtBearer.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Authentication.JwtBearer.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Authorization, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Authorization.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Authorization.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Authorization.Policy, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Authorization.Policy.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Authorization.Policy.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Connections.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Connections.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Connections.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Cors, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Cors.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Cors.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Cryptography.Internal, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Cryptography.Internal.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Cryptography.Internal.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.DataProtection, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.DataProtection.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.DataProtection.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.DataProtection.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.DataProtection.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.DataProtection.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Diagnostics, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Diagnostics.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Diagnostics.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Diagnostics.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Diagnostics.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Diagnostics.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Hosting, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Hosting.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Hosting.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Hosting.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Hosting.Server.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Hosting.Server.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Server.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Html.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Html.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Html.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Http, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Http.2.2.2\lib\netstandard2.0\Microsoft.AspNetCore.Http.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Http.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Http.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Http.Extensions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Http.Extensions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Extensions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Http.Features, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Http.Features.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.HttpOverrides, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.HttpOverrides.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.HttpOverrides.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.JsonPatch, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.JsonPatch.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.JsonPatch.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Localization, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Localization.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Localization.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Mvc, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Mvc.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Mvc.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Mvc.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Mvc.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Mvc.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Mvc.ApiExplorer, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Mvc.ApiExplorer.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Mvc.ApiExplorer.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Mvc.Core.2.2.2\lib\netstandard2.0\Microsoft.AspNetCore.Mvc.Core.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Mvc.Cors, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Mvc.Cors.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Mvc.Cors.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Mvc.DataAnnotations, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Mvc.DataAnnotations.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Mvc.DataAnnotations.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Mvc.Formatters.Json, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Mvc.Formatters.Json.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Mvc.Formatters.Json.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Mvc.Localization, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Mvc.Localization.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Mvc.Localization.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Mvc.Razor, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Mvc.Razor.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Mvc.Razor.Extensions.2.2.0\lib\net46\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Mvc.RazorPages, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Mvc.RazorPages.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Mvc.RazorPages.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Mvc.TagHelpers, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Mvc.TagHelpers.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Mvc.TagHelpers.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Mvc.ViewFeatures, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Mvc.ViewFeatures.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Mvc.ViewFeatures.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Razor, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Razor.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Razor.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Razor.Language, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Razor.Language.2.2.0\lib\net46\Microsoft.AspNetCore.Razor.Language.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Razor.Runtime, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Razor.Runtime.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Razor.Runtime.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.ResponseCaching.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.ResponseCaching.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.ResponseCaching.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Routing, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Routing.2.2.2\lib\netstandard2.0\Microsoft.AspNetCore.Routing.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Routing.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Routing.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Routing.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Server.Kestrel, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Server.Kestrel.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Server.Kestrel.Core, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Server.Kestrel.Core.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Core.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Server.Kestrel.Https, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Server.Kestrel.Https.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Https.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets, Version=2.2.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.2.2.1\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNetCore.WebUtilities, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.AspNetCore.WebUtilities.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.WebUtilities.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.1\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath> + </Reference> + <Reference Include="Microsoft.CodeAnalysis, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.CodeAnalysis.Common.3.0.0\lib\netstandard2.0\Microsoft.CodeAnalysis.dll</HintPath> + </Reference> + <Reference Include="Microsoft.CodeAnalysis.CSharp, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.3.0.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll</HintPath> + </Reference> + <Reference Include="Microsoft.CodeAnalysis.Razor, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.CodeAnalysis.Razor.2.2.0\lib\net46\Microsoft.CodeAnalysis.Razor.dll</HintPath> + </Reference> + <Reference Include="Microsoft.DotNet.PlatformAbstractions, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.DotNet.PlatformAbstractions.2.1.0\lib\net45\Microsoft.DotNet.PlatformAbstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.Caching.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.Caching.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Caching.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.Caching.Memory, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.Caching.Memory.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Caching.Memory.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.Configuration, Version=3.1.5.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.Configuration.3.1.5\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=3.1.5.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.Configuration.Abstractions.3.1.5\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.Configuration.Binder, Version=3.1.5.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.Configuration.Binder.3.1.5\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.EnvironmentVariables.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.Configuration.FileExtensions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.Configuration.FileExtensions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.FileExtensions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.DependencyInjection, Version=3.1.5.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.DependencyInjection.3.1.5\lib\net461\Microsoft.Extensions.DependencyInjection.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=3.1.5.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.3.1.5\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.DependencyModel, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.DependencyModel.2.1.0\lib\net451\Microsoft.Extensions.DependencyModel.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.FileProviders.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.FileProviders.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.FileProviders.Composite, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.FileProviders.Composite.2.2.0\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Composite.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.FileProviders.Physical, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.FileProviders.Physical.2.2.0\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Physical.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.FileSystemGlobbing, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.FileSystemGlobbing.2.2.0\lib\netstandard2.0\Microsoft.Extensions.FileSystemGlobbing.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.Hosting.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.Hosting.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Hosting.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.Http, Version=3.1.5.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.Http.3.1.5\lib\netstandard2.0\Microsoft.Extensions.Http.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.Localization, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.Localization.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Localization.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.Localization.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.Localization.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Localization.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.Logging, Version=3.1.5.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.Logging.3.1.5\lib\netstandard2.0\Microsoft.Extensions.Logging.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=3.1.5.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.3.1.5\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.ObjectPool, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.ObjectPool.2.2.0\lib\netstandard2.0\Microsoft.Extensions.ObjectPool.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.Options, Version=3.1.5.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.Options.3.1.5\lib\netstandard2.0\Microsoft.Extensions.Options.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.Primitives, Version=3.1.5.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.Primitives.3.1.5\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.WebEncoders, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Extensions.WebEncoders.2.2.0\lib\netstandard2.0\Microsoft.Extensions.WebEncoders.dll</HintPath> + </Reference> + <Reference Include="Microsoft.IdentityModel.JsonWebTokens, Version=6.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.IdentityModel.JsonWebTokens.6.6.0\lib\net461\Microsoft.IdentityModel.JsonWebTokens.dll</HintPath> + </Reference> + <Reference Include="Microsoft.IdentityModel.Logging, Version=6.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.IdentityModel.Logging.6.6.0\lib\net461\Microsoft.IdentityModel.Logging.dll</HintPath> + </Reference> + <Reference Include="Microsoft.IdentityModel.Protocols, Version=5.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.IdentityModel.Protocols.5.3.0\lib\net461\Microsoft.IdentityModel.Protocols.dll</HintPath> + </Reference> + <Reference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect, Version=5.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.IdentityModel.Protocols.OpenIdConnect.5.3.0\lib\net461\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll</HintPath> + </Reference> + <Reference Include="Microsoft.IdentityModel.Tokens, Version=6.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.IdentityModel.Tokens.6.6.0\lib\net461\Microsoft.IdentityModel.Tokens.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Net.Http.Headers, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Net.Http.Headers.2.2.0\lib\netstandard2.0\Microsoft.Net.Http.Headers.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Win32.Registry, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\Microsoft.Win32.Registry.4.5.0\lib\net461\Microsoft.Win32.Registry.dll</HintPath> + </Reference> + <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> + <HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> + </Reference> + <Reference Include="Newtonsoft.Json.Bson, Version=1.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> + <HintPath>..\packages\Newtonsoft.Json.Bson.1.0.2\lib\net45\Newtonsoft.Json.Bson.dll</HintPath> + </Reference> + <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> + <HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> + </Reference> + <Reference Include="NLog.Extensions.Logging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> + <HintPath>..\packages\NLog.Extensions.Logging.1.6.1\lib\net461\NLog.Extensions.Logging.dll</HintPath> + </Reference> + <Reference Include="NLog.Web.AspNetCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> + <HintPath>..\packages\NLog.Web.AspNetCore.4.9.0\lib\net461\NLog.Web.AspNetCore.dll</HintPath> + </Reference> + <Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL"> + <HintPath>..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll</HintPath> + </Reference> + <Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll</HintPath> + </Reference> + <Reference Include="System.ComponentModel.Annotations, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.ComponentModel.Annotations.4.7.0\lib\net461\System.ComponentModel.Annotations.dll</HintPath> + </Reference> + <Reference Include="System.ComponentModel.Composition" /> + <Reference Include="System.ComponentModel.DataAnnotations" /> + <Reference Include="System.Configuration" /> + <Reference Include="System.Core" /> + <Reference Include="System.Data.OracleClient" /> + <Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.3.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Diagnostics.DiagnosticSource.4.5.1\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath> + </Reference> + <Reference Include="System.Diagnostics.StackTrace, Version=4.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Diagnostics.StackTrace.4.3.0\lib\net46\System.Diagnostics.StackTrace.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.Drawing" /> + <Reference Include="System.IdentityModel.Tokens.Jwt, Version=6.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\packages\System.IdentityModel.Tokens.Jwt.6.6.0\lib\net461\System.IdentityModel.Tokens.Jwt.dll</HintPath> + </Reference> + <Reference Include="System.IO.Compression, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" /> + <Reference Include="System.IO.FileSystem, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.IO.FileSystem.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.IO.Pipelines, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> + <HintPath>..\packages\System.IO.Pipelines.4.5.3\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath> + </Reference> + <Reference Include="System.Memory, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Memory.4.5.2\lib\netstandard2.0\System.Memory.dll</HintPath> + </Reference> + <Reference Include="System.Net" /> + <Reference Include="System.Net.Http.WebRequest" /> + <Reference Include="System.Numerics" /> + <Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath> + </Reference> + <Reference Include="System.Reflection.Metadata, Version=1.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Reflection.Metadata.1.6.0\lib\netstandard2.0\System.Reflection.Metadata.dll</HintPath> + </Reference> + <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.7.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath> + </Reference> + <Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.Runtime.Serialization" /> + <Reference Include="System.Security" /> + <Reference Include="System.Security.AccessControl, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Security.AccessControl.4.5.0\lib\net461\System.Security.AccessControl.dll</HintPath> + </Reference> + <Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.Security.Cryptography.Cng, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Security.Cryptography.Cng.4.5.0\lib\net461\System.Security.Cryptography.Cng.dll</HintPath> + </Reference> + <Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.Security.Cryptography.Xml, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Security.Cryptography.Xml.4.5.0\lib\net461\System.Security.Cryptography.Xml.dll</HintPath> + </Reference> + <Reference Include="System.Security.Permissions, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Security.Permissions.4.5.0\lib\net461\System.Security.Permissions.dll</HintPath> + </Reference> + <Reference Include="System.Security.Principal.Windows, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Security.Principal.Windows.4.5.1\lib\net461\System.Security.Principal.Windows.dll</HintPath> + </Reference> + <Reference Include="System.ServiceModel" /> + <Reference Include="System.ServiceProcess" /> + <Reference Include="System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Text.Encoding.CodePages.4.5.1\lib\net461\System.Text.Encoding.CodePages.dll</HintPath> + </Reference> + <Reference Include="System.Text.Encodings.Web, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Text.Encodings.Web.4.5.0\lib\netstandard2.0\System.Text.Encodings.Web.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.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath> + </Reference> + <Reference Include="System.Threading.Thread, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Threading.Thread.4.3.0\lib\net46\System.Threading.Thread.dll</HintPath> + <Private>True</Private> + </Reference> + <Reference Include="System.Transactions" /> + <Reference Include="System.Web" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xml" /> + <Reference Include="System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Xml.ReaderWriter.4.3.1\lib\net46\System.Xml.ReaderWriter.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.Xml.XmlDocument, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Xml.XmlDocument.4.3.0\lib\net46\System.Xml.XmlDocument.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="Controllers\BlobController.cs" /> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="Startup.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + <None Include="packages.config" /> + </ItemGroup> + <ItemGroup> + <Analyzer Include="..\packages\AWSSDK.S3.3.3.111.9\analyzers\dotnet\cs\AWSSDK.S3.CodeAnalysis.dll" /> + <Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.2\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll" /> + <Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.2\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" /> + </ItemGroup> + <ItemGroup> + <Content Include="Microsoft.DiaSymReader.Native.amd64.dll" /> + <Content Include="Microsoft.DiaSymReader.Native.x86.dll" /> + </ItemGroup> + <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\linq2db.SqlServer.2.6.4\build\linq2db.SqlServer.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\linq2db.SqlServer.2.6.4\build\linq2db.SqlServer.props'))" /> + <Error Condition="!Exists('..\packages\linq2db.t4models.2.6.4\build\linq2db.t4models.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\linq2db.t4models.2.6.4\build\linq2db.t4models.props'))" /> + <Error Condition="!Exists('..\packages\Microsoft.AspNetCore.Razor.Design.2.2.0\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AspNetCore.Razor.Design.2.2.0\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.props'))" /> + <Error Condition="!Exists('..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.2\build\Microsoft.CodeAnalysis.Analyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeAnalysis.Analyzers.2.9.2\build\Microsoft.CodeAnalysis.Analyzers.props'))" /> + <Error Condition="!Exists('..\packages\Microsoft.DiaSymReader.Native.1.7.0\build\Microsoft.DiaSymReader.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.DiaSymReader.Native.1.7.0\build\Microsoft.DiaSymReader.Native.props'))" /> + <Error Condition="!Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.12.0\build\NUnit.props'))" /> + <Error Condition="!Exists('..\packages\Microsoft.AspNetCore.Mvc.Razor.Extensions.2.2.0\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AspNetCore.Mvc.Razor.Extensions.2.2.0\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.props'))" /> + <Error Condition="!Exists('..\packages\Microsoft.AspNetCore.Mvc.Razor.Extensions.2.2.0\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AspNetCore.Mvc.Razor.Extensions.2.2.0\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.targets'))" /> + </Target> + <Import Project="..\packages\Microsoft.AspNetCore.Mvc.Razor.Extensions.2.2.0\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.targets" Condition="Exists('..\packages\Microsoft.AspNetCore.Mvc.Razor.Extensions.2.2.0\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.targets')" /> +</Project> \ No newline at end of file diff --git a/src/Blob/Controllers/BlobController.cs b/src/Blob/Controllers/BlobController.cs new file mode 100644 index 0000000000000000000000000000000000000000..c61698ad0e14eed66f26ae8befc3030750b81641 --- /dev/null +++ b/src/Blob/Controllers/BlobController.cs @@ -0,0 +1,486 @@ +using Amazon.S3; +using Amazon.S3.Model; +using Coscine.Api.WaterbutlerHelper; +using Coscine.Api.WaterbutlerHelper.Services; +using Coscine.ApiCommons; +using Coscine.ApiCommons.Factories; +using Coscine.Configuration; +using Coscine.Database.DataModel; +using Coscine.Database.Models; +using Coscine.Database.Util; +using Coscine.Logging; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; +using Newtonsoft.Json.Linq; +using System; +using System.Linq; +using System.Net.Http; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using System.Web; + +namespace Coscine.Api.Blob.Controllers +{ + [Authorize] + public class BlobController : Controller + { + private readonly IConfiguration _configuration; + private readonly Authenticator _authenticator; + private readonly ResourceModel _resourceModel; + private readonly string _accessKey; + private readonly string _secretKey; + private readonly AmazonS3Config _amazonConfig; + private readonly ProjectResourceModel _projectResourceModel; + private readonly ProjectRoleModel _projectRoleModel; + private readonly CoscineLogger _coscineLogger; + private readonly AnalyticsLogObject _analyticsLogObject; + private readonly IDataSourceService _dataSourceService; + private readonly string _rdsResourceHost; + private readonly WaterbutlerInterface _waterbutlerInterface; + + public BlobController(ILogger<BlobController> logger, IDataSourceService dataSourceService) + { + _configuration = Program.Configuration; + _authenticator = new Authenticator(this, _configuration); + _resourceModel = new ResourceModel(); + _projectResourceModel = new ProjectResourceModel(); + _projectRoleModel = new ProjectRoleModel(); + + _accessKey = _configuration.GetStringAndWait("coscine/global/ecs/object_user_name"); + _secretKey = _configuration.GetStringAndWait("coscine/global/ecs/object_user_secretkey"); + _rdsResourceHost = _configuration.GetString("coscine/global/ecs/s3_endpoint"); + + _coscineLogger = new CoscineLogger(logger); + _analyticsLogObject = new AnalyticsLogObject(); + _amazonConfig = new AmazonS3Config + { + ServiceURL = _rdsResourceHost, + ForcePathStyle = true + }; + _dataSourceService = dataSourceService; + _waterbutlerInterface = new WaterbutlerInterface(_configuration, _dataSourceService); + } + + [HttpGet("[controller]/{resourceId}/quota")] + public IActionResult GetQuota(string resourceId) + { + if (!Guid.TryParse(resourceId, out Guid resourceGuid)) + { + return BadRequest($"{resourceId} is not a guid."); + } + + var user = _authenticator.GetUser(); + Resource resource; + try + { + resource = _resourceModel.GetById(resourceGuid); + if (resource == null) + { + return NotFound($"Could not find resource with id: {resourceId}"); + } + } + catch (Exception) + { + return NotFound($"Could not find resource with id: {resourceId}"); + } + + if (resource.Type == null) + { + ResourceTypeModel resourceTypeModel = new ResourceTypeModel(); + resource.Type = resourceTypeModel.GetById(resource.TypeId); + } + + if (user == null || !_resourceModel.HasAccess(user, resource, UserRoles.Owner, UserRoles.Member)) + { + return Forbid("User does not have permission to the resource."); + } + + if (resource.Type.DisplayName.ToLower() == "rds" && resource.ResourceTypeOptionId.HasValue) + { + var rdsResourceTypeModel = new RDSResourceTypeModel(); + var rdsResourceType = rdsResourceTypeModel.GetById(resource.ResourceTypeOptionId.Value); + var bucketname = rdsResourceType.BucketName; + + using (var client = new AmazonS3Client(_accessKey, _secretKey, _amazonConfig)) + { + long totalFileSize = 0; + long fileCount = 0; + ListObjectsRequest listReqeust = new ListObjectsRequest() + { + BucketName = bucketname + }; + + ListObjectsResponse listResponse; + try + { + do + { + listResponse = client.ListObjects(listReqeust); + fileCount += listResponse.S3Objects.Count(); + totalFileSize += listResponse.S3Objects.Sum(x => x.Size); + listReqeust.Marker = listResponse.NextMarker; + + } while (listResponse.IsTruncated); + } + catch (Exception) + { + return StatusCode(500); + } + + return Ok($"{{ \"data\": {{ \"fileCount\": {fileCount}, \"usedSizeByte\": {totalFileSize} }}}}"); + } + } + else + { + return BadRequest("The resource type must be rds."); + } + } + + // inferring a ../ (urlencoded) can manipulate the url. + // However the constructed signature for s3 won't match and it will not be resolved. + // This may be a problem for other provider! + [HttpGet("[controller]/{resourceId}/{path}")] + [DisableRequestSizeLimit] + public async Task<IActionResult> GetFile(string resourceId, string path) + { + var user = _authenticator.GetUser(); + + path = HttpUtility.UrlDecode(path); + + var check = CheckResourceIdAndPath(resourceId, path, out Resource resource); + if (check != null) + { + return check; + } + + if (user == null || !_resourceModel.HasAccess(user, resource, UserRoles.Owner, UserRoles.Member)) + { + return Forbid("User does not have permission to the resource."); + } + + var authHeader = _waterbutlerInterface.BuildAuthHeader(resource); + + if (authHeader == null) + { + return BadRequest($"No provider for: \"{resource.Type.DisplayName}\"."); + } + + var provider = GetResourceTypeName(resource); + var infos = await _waterbutlerInterface.GetObjectInfoAsync(path, provider, authHeader); + + // Not found + if (infos == null) + { + return NotFound($"Found nothing in waterbutler under \"{path}\"."); + } + + // Not a file + if (infos.Count > 1 || !infos.First().IsFile) + { + return NoContent(); + } + + // Do not dispose the response! + // The stream is later accessed by the MVC, to deliver the file. + // When disposed, the stream becomes invalid and can't be read. + var response = await _waterbutlerInterface.DownloadObjectAsync(infos.First(), authHeader); + if (response.IsSuccessStatusCode) + { + LogAnalytics("Download File", resourceId, path.Substring(1), user); + return File(await response.Content.ReadAsStreamAsync(), + response.Content.Headers.GetValues("Content-Type").First()); + } + else + { + return FailedRequest(response, path); + } + + } + + // inferring a ../ (urlencoded) can manipulate the url. + // However the constructed signature for s3 won't match and it will not be resolved. + // This may be a problem for other provider! + [HttpPut("[controller]/{resourceId}/{path}")] + [DisableRequestSizeLimit] + public async Task<IActionResult> UploadFile(string resourceId, string path) + { + var user = _authenticator.GetUser(); + + path = HttpUtility.UrlDecode(path); + + var check = CheckResourceIdAndPath(resourceId, path, out Resource resource); + if (check != null) + { + return check; + } + + if (user == null || !_resourceModel.HasAccess(user, resource, UserRoles.Owner, UserRoles.Member)) + { + return Forbid("User does not have permission to the resource."); + } + + var authHeader = _waterbutlerInterface.BuildAuthHeader(resource, "gitlab"); + + if (authHeader == null) + { + return BadRequest($"No provider for: \"{resource.Type.DisplayName}\"."); + } + else + { + var provider = GetResourceTypeName(resource); + var infos = await _waterbutlerInterface.GetObjectInfoAsync(path, provider, authHeader); + + // Not found, upload new + if (infos == null) + { + var filename = path.EndsWith("/") ? path.Substring(0, path.Length - 1) : path; + filename = path.Substring(path.LastIndexOf("/") + 1); + var rootPath = path.EndsWith("/") ? path.Substring(0, path.Length - 1) : path; + rootPath = path.Substring(0, path.Length - filename.Length); + + using (var response = await _waterbutlerInterface.UploadFileAsync(rootPath, filename, provider, authHeader, Request.Body)) + { + if (response.IsSuccessStatusCode) + { + LogAnalytics("Upload File", resourceId, path, user); + return NoContent(); + } + else + { + return FailedRequest(response, path); + } + } + } + else + { + // update existing file + + // Not a file + if (infos.Count > 1 || !infos.First().IsFile) + { + return BadRequest("Not an updatable or new file."); + } + + using (var response = await _waterbutlerInterface.UploadObjectAsync(infos.First(), authHeader, Request.Body)) + { + if (response.IsSuccessStatusCode) + { + LogAnalytics("Update File", resourceId, path, user); + return NoContent(); + } + else + { + return FailedRequest(response, path); + } + } + } + + } + } + + [HttpDelete("[controller]/{resourceId}/{path}")] + public async Task<IActionResult> DeleteFile(string resourceId, string path) + { + var user = _authenticator.GetUser(); + + path = HttpUtility.UrlDecode(path); + + var check = CheckResourceIdAndPath(resourceId, path, out Resource resource); + if (check != null) + { + return check; + } + + if (user == null || !_resourceModel.HasAccess(user, resource, UserRoles.Owner, UserRoles.Member)) + { + return Forbid("User does not have permission to the resource."); + } + + var authHeader = _waterbutlerInterface.BuildAuthHeader(resource, "gitlab"); + + if (authHeader == null) + { + return BadRequest($"No provider for: \"{resource.Type.DisplayName}\"."); + } + else + { + + var provider = GetResourceTypeName(resource); + var infos = await _waterbutlerInterface.GetObjectInfoAsync(path, provider, authHeader); + + // Not found + if (infos == null) + { + return NotFound($"Found nothing in waterbutler under {path}."); + } + + // Not a file + if (infos.Count > 1 || !infos.First().IsFile) + { + return BadRequest("Not a file"); + } + + using (var response = await _waterbutlerInterface.DeleteObjectAsync(infos.First(), authHeader)) + { + if (response.IsSuccessStatusCode) + { + LogAnalytics("Delete File", resourceId, path, user); + return NoContent(); + } + else + { + return FailedRequest(response, path); + } + } + } + } + + [HttpPost("[controller]/validate")] + public async Task<IActionResult> IsResourceValid() + { + var path = "/"; + + JToken resource = ObjectFactory<JToken>.DeserializeFromStream(Request.Body); + + string authHeader = null; + if (resource["type"]["displayName"].ToString().ToLower() == "s3") + { + S3ResourceType s3ResourceType = new S3ResourceType + { + BucketName = resource["resourceTypeOption"]["BucketName"].ToString(), + AccessKey = resource["resourceTypeOption"]["AccessKey"].ToString(), + SecretKey = resource["resourceTypeOption"]["SecretKey"].ToString(), + ResourceUrl = resource["resourceTypeOption"]["ResourceUrl"].ToString() + }; + authHeader = _waterbutlerInterface.BuildS3AuthHeader(s3ResourceType); + } + else if (resource["type"]["displayName"].ToString().ToLower() == "gitlab") + { + GitlabResourceType gitlabResourceType = new GitlabResourceType + { + RepositoryNumber = (int)resource["resourceTypeOption"]["RepositoryNumber"], + RepositoryUrl = resource["resourceTypeOption"]["RepositoryUrl"].ToString(), + Token = resource["resourceTypeOption"]["Token"].ToString() + }; + authHeader = _waterbutlerInterface.BuildGitlabAuthHeader(gitlabResourceType); + } + + if (authHeader == null) + { + return BadRequest($"No provider for: \"{resource["type"]["displayName"].ToString()}\"."); + } + else + { + var provider = GetResourceTypeName(resource); + var infos = await _waterbutlerInterface.GetObjectInfoAsync(path, provider, authHeader); + + // Not found + if (infos == null) + { + return NotFound($"Found nothing in waterbutler under {path}."); + } + + return NoContent(); + } + } + + private string GetResourceTypeName(Resource resource) + { + if (resource.Type.DisplayName.ToLower().Equals("s3")) + { + return "rds"; + } + else + { + return resource.Type.DisplayName.ToLower(); + } + } + + private string GetResourceTypeName(JToken resource) + { + if (resource["type"]["displayName"].ToString().ToLower().Equals("s3")) + { + return "rds"; + } + else + { + return resource["type"]["displayName"].ToString().ToLower(); + } + } + + private IActionResult FailedRequest(HttpResponseMessage response, string path) + { + if (response.StatusCode == System.Net.HttpStatusCode.NotFound) + { + return NotFound($"Could not find object for: \"{path}\"."); + } + else if (response.StatusCode == System.Net.HttpStatusCode.Forbidden) + { + return Forbid("Not allowed to access the datasource."); + } + else + { + return BadRequest($"Error in communication with waterbutler: {response.StatusCode}"); + } + } + + private IActionResult CheckResourceIdAndPath(string resourceId, string path, out Resource resource) + { + resource = null; + + if (string.IsNullOrWhiteSpace(path)) + { + return BadRequest($"Your path \"{path}\" is empty."); + } + + Regex rgx = new Regex(@"[\:?*<>|]+"); + if (rgx.IsMatch(path)) + { + return BadRequest($"Your path \"{path}\" contains bad characters. The following characters are not permissible: {@"\/:?*<>|"}."); + } + + if (!Guid.TryParse(resourceId, out Guid resourceGuid)) + { + return BadRequest($"{resourceId} is not a guid."); + } + + try + { + resource = _resourceModel.GetById(resourceGuid); + if (resource == null) + { + return NotFound($"Could not find resource with id: {resourceId}"); + } + } + catch (Exception) + { + return NotFound($"Could not find resource with id: {resourceId}"); + } + + if (resource.Type == null) + { + ResourceTypeModel resourceTypeModel = new ResourceTypeModel(); + resource.Type = resourceTypeModel.GetById(resource.TypeId); + } + + // All good + return null; + } + + // XXX extract in the future to an analytics Controller + private void LogAnalytics(string operation, string resourceId, string path, User user) + { + if (CoscineLoggerConfiguration.IsLogLevelActivated(LogType.Analytics)) + { + _analyticsLogObject.Type = "Action"; + _analyticsLogObject.FileId = resourceId + "/" + path; + _analyticsLogObject.ResourceId = resourceId; + _analyticsLogObject.ProjectId = _projectResourceModel.GetProjectForResource(new Guid(resourceId)).ToString(); + _analyticsLogObject.RoleId = _projectRoleModel.GetGetUserRoleForProject(new Guid(_analyticsLogObject.ProjectId), user.Id).ToString(); + _analyticsLogObject.Operation = operation; + _coscineLogger.AnalyticsLog(_analyticsLogObject); + } + } + } +} diff --git a/src/Blob/Microsoft.DiaSymReader.Native.amd64.dll b/src/Blob/Microsoft.DiaSymReader.Native.amd64.dll new file mode 100644 index 0000000000000000000000000000000000000000..e376a20352bb547c881ad93a9529ad3fedd5fae9 Binary files /dev/null and b/src/Blob/Microsoft.DiaSymReader.Native.amd64.dll differ diff --git a/src/Blob/Microsoft.DiaSymReader.Native.x86.dll b/src/Blob/Microsoft.DiaSymReader.Native.x86.dll new file mode 100644 index 0000000000000000000000000000000000000000..5ebef7fe292eaf725025142a43f8f667700cf003 Binary files /dev/null and b/src/Blob/Microsoft.DiaSymReader.Native.x86.dll differ diff --git a/src/Blob/Program.cs b/src/Blob/Program.cs new file mode 100644 index 0000000000000000000000000000000000000000..d56dc8c8a3d3d22657c1ecf7195494e881483945 --- /dev/null +++ b/src/Blob/Program.cs @@ -0,0 +1,13 @@ +using Coscine.ApiCommons; +using Coscine.Configuration; + +namespace Coscine.Api.Blob +{ + public class Program : AbstractProgram<ConsulConfiguration> + { + public static void Main() + { + InitializeWebService<Startup>(); + } + } +} diff --git a/src/Blob/Properties/AssemblyInfo.cs b/src/Blob/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..b0cfcc0211416588ee266283c3c8bde0bdd1e4ab --- /dev/null +++ b/src/Blob/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Blob")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Blob")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("4f76105d-8fc5-403a-a822-9f306a028a76")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Blob/Startup.cs b/src/Blob/Startup.cs new file mode 100644 index 0000000000000000000000000000000000000000..03076e9301bf83e55146f88c0ebbf90a5bcedba1 --- /dev/null +++ b/src/Blob/Startup.cs @@ -0,0 +1,26 @@ +using Coscine.Api.WaterbutlerHelper.Services; +using Coscine.ApiCommons; +using Microsoft.Extensions.DependencyInjection; +using System; + +namespace Coscine.Api.Blob +{ + public class Startup : AbstractStartup + { + public Startup() + { + } + + public override void ConfigureServicesExtension(IServiceCollection services) + { + base.ConfigureServicesExtension(services); + + services.AddHttpClient<IDataSourceService, DataSourceService>(client => + { + //TODO: Discuss Timeout value + client.Timeout = TimeSpan.FromMinutes(30); + }); + } + + } +} diff --git a/src/Blob/packages.config b/src/Blob/packages.config new file mode 100644 index 0000000000000000000000000000000000000000..377efbd3f2c70fcf4a6c0792c1ca3925017b0f78 --- /dev/null +++ b/src/Blob/packages.config @@ -0,0 +1,153 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="AWSSDK.Core" version="3.3.107.8" targetFramework="net461" /> + <package id="AWSSDK.S3" version="3.3.111.9" targetFramework="net461" /> + <package id="Consul" version="0.7.2.6" targetFramework="net461" /> + <package id="Coscine.Api.WaterbutlerHelper" version="1.0.0-topic-802-refact0008" targetFramework="net461" /> + <package id="Coscine.ApiCommons" version="1.8.0" targetFramework="net461" /> + <package id="Coscine.Configuration" version="1.5.0" targetFramework="net461" /> + <package id="Coscine.Database" version="1.21.0" targetFramework="net461" /> + <package id="Coscine.Logging" version="1.2.0" targetFramework="net461" /> + <package id="EntityFramework" version="6.2.0" targetFramework="net461" /> + <package id="linq2db" version="2.6.4" targetFramework="net461" /> + <package id="linq2db.SqlServer" version="2.6.4" targetFramework="net461" /> + <package id="linq2db.t4models" version="2.6.4" targetFramework="net461" /> + <package id="LinqKit" version="1.1.17" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Antiforgery" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Authentication" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Authentication.Abstractions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Authentication.Core" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Authentication.JwtBearer" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Authorization" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Authorization.Policy" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Connections.Abstractions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Cors" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Cryptography.Internal" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.DataProtection" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.DataProtection.Abstractions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Diagnostics" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Diagnostics.Abstractions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Hosting" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Hosting.Abstractions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Hosting.Server.Abstractions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Html.Abstractions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Http" version="2.2.2" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Http.Abstractions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Http.Extensions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Http.Features" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.HttpOverrides" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.JsonPatch" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Localization" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Mvc" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Mvc.Abstractions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Mvc.Analyzers" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Mvc.ApiExplorer" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Mvc.Core" version="2.2.2" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Mvc.Cors" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Mvc.DataAnnotations" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Mvc.Formatters.Json" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Mvc.Localization" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Mvc.Razor" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Mvc.Razor.Extensions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Mvc.RazorPages" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Mvc.TagHelpers" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Mvc.ViewFeatures" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Razor" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Razor.Design" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Razor.Language" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Razor.Runtime" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.ResponseCaching.Abstractions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Routing" version="2.2.2" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Routing.Abstractions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Server.Kestrel" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Server.Kestrel.Core" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Server.Kestrel.Https" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets" version="2.2.1" targetFramework="net461" /> + <package id="Microsoft.AspNetCore.WebUtilities" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.Bcl.AsyncInterfaces" version="1.1.1" targetFramework="net461" /> + <package id="Microsoft.CodeAnalysis.Analyzers" version="2.9.2" targetFramework="net461" /> + <package id="Microsoft.CodeAnalysis.Common" version="3.0.0" targetFramework="net461" /> + <package id="Microsoft.CodeAnalysis.CSharp" version="3.0.0" targetFramework="net461" /> + <package id="Microsoft.CodeAnalysis.Razor" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.CSharp" version="4.5.0" targetFramework="net461" /> + <package id="Microsoft.DiaSymReader.Native" version="1.7.0" targetFramework="net461" /> + <package id="Microsoft.DotNet.PlatformAbstractions" version="2.1.0" targetFramework="net461" /> + <package id="Microsoft.Extensions.Caching.Abstractions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.Extensions.Caching.Memory" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.Extensions.Configuration" version="3.1.5" targetFramework="net461" /> + <package id="Microsoft.Extensions.Configuration.Abstractions" version="3.1.5" targetFramework="net461" /> + <package id="Microsoft.Extensions.Configuration.Binder" version="3.1.5" targetFramework="net461" /> + <package id="Microsoft.Extensions.Configuration.EnvironmentVariables" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.Extensions.Configuration.FileExtensions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.Extensions.DependencyInjection" version="3.1.5" targetFramework="net461" /> + <package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="3.1.5" targetFramework="net461" /> + <package id="Microsoft.Extensions.DependencyModel" version="2.1.0" targetFramework="net461" /> + <package id="Microsoft.Extensions.FileProviders.Abstractions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.Extensions.FileProviders.Composite" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.Extensions.FileProviders.Physical" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.Extensions.FileSystemGlobbing" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.Extensions.Hosting.Abstractions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.Extensions.Http" version="3.1.5" targetFramework="net461" /> + <package id="Microsoft.Extensions.Localization" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.Extensions.Localization.Abstractions" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.Extensions.Logging" version="3.1.5" targetFramework="net461" /> + <package id="Microsoft.Extensions.Logging.Abstractions" version="3.1.5" targetFramework="net461" /> + <package id="Microsoft.Extensions.ObjectPool" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.Extensions.Options" version="3.1.5" targetFramework="net461" /> + <package id="Microsoft.Extensions.Primitives" version="3.1.5" targetFramework="net461" /> + <package id="Microsoft.Extensions.WebEncoders" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.IdentityModel.JsonWebTokens" version="6.6.0" targetFramework="net461" /> + <package id="Microsoft.IdentityModel.Logging" version="6.6.0" targetFramework="net461" /> + <package id="Microsoft.IdentityModel.Protocols" version="5.3.0" targetFramework="net461" /> + <package id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="5.3.0" targetFramework="net461" /> + <package id="Microsoft.IdentityModel.Tokens" version="6.6.0" targetFramework="net461" /> + <package id="Microsoft.Net.Http.Headers" version="2.2.0" targetFramework="net461" /> + <package id="Microsoft.Win32.Registry" version="4.5.0" targetFramework="net461" /> + <package id="Newtonsoft.Json" version="12.0.3" targetFramework="net461" /> + <package id="Newtonsoft.Json.Bson" version="1.0.2" targetFramework="net461" /> + <package id="NLog" version="4.6.8" targetFramework="net461" /> + <package id="NLog.Config" version="4.6.8" targetFramework="net461" /> + <package id="NLog.Extensions.Logging" version="1.6.1" targetFramework="net461" /> + <package id="NLog.Schema" version="4.6.8" targetFramework="net461" /> + <package id="NLog.Web.AspNetCore" version="4.9.0" targetFramework="net461" /> + <package id="NUnit" version="3.12.0" targetFramework="net461" /> + <package id="System.AppContext" version="4.3.0" targetFramework="net461" /> + <package id="System.Buffers" version="4.5.0" targetFramework="net461" /> + <package id="System.Collections" version="4.3.0" targetFramework="net461" /> + <package id="System.Collections.Immutable" version="1.5.0" targetFramework="net461" /> + <package id="System.ComponentModel.Annotations" version="4.7.0" targetFramework="net461" /> + <package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net461" /> + <package id="System.Diagnostics.DiagnosticSource" version="4.5.1" targetFramework="net461" /> + <package id="System.Diagnostics.StackTrace" version="4.3.0" targetFramework="net461" /> + <package id="System.Dynamic.Runtime" version="4.3.0" targetFramework="net461" /> + <package id="System.IdentityModel.Tokens.Jwt" version="6.6.0" targetFramework="net461" /> + <package id="System.IO" version="4.3.0" targetFramework="net461" /> + <package id="System.IO.FileSystem" version="4.3.0" targetFramework="net461" /> + <package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net461" /> + <package id="System.IO.Pipelines" version="4.5.3" targetFramework="net461" /> + <package id="System.Linq" version="4.3.0" targetFramework="net461" /> + <package id="System.Memory" version="4.5.2" targetFramework="net461" /> + <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" /> + <package id="System.Reflection.Metadata" version="1.6.0" targetFramework="net461" /> + <package id="System.Runtime" version="4.3.1" targetFramework="net461" /> + <package id="System.Runtime.CompilerServices.Unsafe" version="4.7.1" targetFramework="net461" /> + <package id="System.Runtime.Extensions" version="4.3.1" targetFramework="net461" /> + <package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net461" /> + <package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net461" /> + <package id="System.Security.AccessControl" version="4.5.0" targetFramework="net461" /> + <package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net461" /> + <package id="System.Security.Cryptography.Cng" version="4.5.0" targetFramework="net461" /> + <package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net461" /> + <package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net461" /> + <package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net461" /> + <package id="System.Security.Cryptography.Xml" version="4.5.0" targetFramework="net461" /> + <package id="System.Security.Permissions" version="4.5.0" targetFramework="net461" /> + <package id="System.Security.Principal.Windows" version="4.5.1" targetFramework="net461" /> + <package id="System.Text.Encoding.CodePages" version="4.5.1" targetFramework="net461" /> + <package id="System.Text.Encodings.Web" version="4.5.0" targetFramework="net461" /> + <package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net461" /> + <package id="System.Threading.Thread" version="4.3.0" targetFramework="net461" /> + <package id="System.Xml.ReaderWriter" version="4.3.1" targetFramework="net461" /> + <package id="System.Xml.XmlDocument" version="4.3.0" targetFramework="net461" /> +</packages> \ No newline at end of file diff --git a/tools/packages.config b/tools/packages.config new file mode 100644 index 0000000000000000000000000000000000000000..14aef3bf00189e621993b61ccea2e4a203e73b9b --- /dev/null +++ b/tools/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Cake" version="0.36.0" /> +</packages>