Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update codebase #3

Open
wants to merge 43 commits into
base: choco_adds
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
fee4754
Re-evaluate IsLatest properties when a package is delisted (#42)
joelverhagen Nov 30, 2017
2011cd4
When a package is unlisted, return the package's published date as 19…
joelverhagen Nov 30, 2017
07896e1
Merge branch 'dev'
joelverhagen Nov 30, 2017
ffc2b36
Use latest build tools
joelverhagen Nov 30, 2017
2972fb3
Merge branch 'dev'
joelverhagen Nov 30, 2017
f5aa2ba
Support projection on the Packages() endpoint ($select) (#46)
joelverhagen Dec 15, 2017
c7d9144
Merge branch 'dev'
joelverhagen Dec 15, 2017
135a920
Use a null file system for the OptimizedZipPackage's expanded file sy…
joelverhagen Jan 21, 2018
44ce576
Configurable cache file name (#49)
apeneve Feb 3, 2018
f507bd2
Merge branch 'dev' into master
joelverhagen Feb 5, 2018
4aad11b
In the template C# file NuGetODataConfig.cs.pp, log exceptions to Tra…
joelverhagen Feb 6, 2018
0f46245
Normalize directories before comparing paths in file changed event in…
cosminpopescu Feb 12, 2018
bf717c1
Merge branch 'dev' into master
joelverhagen Feb 12, 2018
5a354c6
Use includeDelisted query parameter (#56)
patricksadowski Feb 26, 2018
2ee751a
Merge pull request #57 from NuGet/dev
chenriksson Feb 26, 2018
ddcb106
Enable TLS 1.2 in build.ps1 (#58)
joelverhagen Mar 1, 2018
94ee01b
Add route to match older Nuget.Server uploads (#62)
ericcoleman Sep 4, 2018
09c28fd
Appended allowRemoteCacheManagement key into web.config to allow remo…
ezverev Sep 4, 2018
26869a9
Add repository type and URL to .nuspec (#63)
joelverhagen Oct 22, 2018
fe2231b
Merge branch 'dev' (#64)
joelverhagen Oct 22, 2018
00a05a1
Configure MicroBuild to sign NuGet.Server (#65)
Oct 30, 2018
c595803
Enable package signing on NuGet.Server .nupkgs (#73)
joelverhagen Mar 8, 2019
3b9e7de
Filter out late file system events caused by API push (#72)
joelverhagen Mar 6, 2019
0f06e4c
Merge branch 'dev' (#74)
joelverhagen Mar 11, 2019
7a2198e
Fix package metadata to meet Microsoft requirements (#75)
joelverhagen Mar 11, 2019
e5d8ee2
Merge branch 'dev' (#76)
joelverhagen Mar 11, 2019
1682022
Use new ServerCommon to sign packages in a shared way (#77)
joelverhagen Mar 14, 2019
6366df2
Don't enable the legacy push route by default (#78)
joelverhagen Mar 20, 2019
c2cac1d
Merge branch 'dev' into master (#79)
joelverhagen Mar 21, 2019
c09d26d
Replace V2 with V3 in nuget.config
skofman1 Apr 18, 2019
0473427
Merge pull request #80 from NuGet/V2ToV3
skofman1 Apr 18, 2019
0f6c364
Merge pull request #81 from NuGet/master
joelverhagen Jul 15, 2019
e9352c9
Update Microsoft.Data.OData to 5.8.4 (#82)
joelverhagen Jul 15, 2019
97e3d99
Merge pull request #83 from NuGet/dev
joelverhagen Jul 15, 2019
a6bed67
Move to latest build tools (#84)
joelverhagen Aug 2, 2019
cfe584f
Added support for new -SkipDuplicate option in NuGet 5.1 (#85)
jacksga Aug 7, 2019
03597a6
Merge pull request #86 from NuGet/dev
joelverhagen Aug 7, 2019
55f68e9
Force package metadata URLs to be parsed as absolute URIs (#87)
joelverhagen Aug 12, 2019
3d8f707
Merge pull request #88 from NuGet/dev
joelverhagen Aug 13, 2019
6631e71
(maint) add nuget-chocolatey
ferventcoder Jan 4, 2018
2785f40
(maint) add Chocolatey enhancements
ferventcoder Jan 4, 2018
3436a5a
Helper should use chocolatey as path
ferventcoder Jan 4, 2018
0c3d6de
Update to .NET Framework 4.8
vexx32 Feb 4, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nuget/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="xunit.runner.console" version="2.1.0" />
<package id="MicroBuild.Core" version="0.3.0" />
</packages>
11 changes: 5 additions & 6 deletions NuGet.Settings.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<MonoBuild>true</MonoBuild>
<DefineConstants>$(DefineConstants);MONO;</DefineConstants>
<VisualStudioVersion>11.0</VisualStudioVersion>
</PropertyGroup>
</PropertyGroup>

<!-- Common Build Settings and Configurations -->
<PropertyGroup>
Expand All @@ -18,18 +18,17 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<TargetFrameworkProfile />
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
<AdditionalSettingsImport Condition=" $(AdditionalSettingsImport) == '' ">$(NuGetRoot)\Extended.Settings.targets</AdditionalSettingsImport>
</PropertyGroup>

<PropertyGroup Condition=" $(VisualStudioVersion) == '10.0' ">
<ShellAssembly>Microsoft.VisualStudio.Shell.10.0, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL</ShellAssembly>
<ShellAssemblyHintPath>..\..\lib\VS10\Microsoft.VisualStudio.Shell.10.0.dll</ShellAssemblyHintPath>

<MSBuildAssembly>Microsoft.Build</MSBuildAssembly>
<VCProjectEngineAssembly>Microsoft.VisualStudio.VCProjectEngine, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</VCProjectEngineAssembly>
<VCProjectEngineAssemblyHintPath>..\..\lib\Microsoft.VisualStudio.VCProjectEngine.dll</VCProjectEngineAssemblyHintPath>
Expand All @@ -41,7 +40,7 @@
<VCProjectEngineAssembly>Microsoft.VisualStudio.VCProjectEngine, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</VCProjectEngineAssembly>
</PropertyGroup>

<PropertyGroup Condition=" $(VisualStudioVersion) == '12.0' ">
<PropertyGroup Condition=" $(VisualStudioVersion) == '12.0' ">
<ShellAssembly>Microsoft.VisualStudio.Shell.12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL</ShellAssembly>
<ShellAssemblyHintPath>..\..\lib\VS12\Microsoft.VisualStudio.Shell.12.0.dll</ShellAssemblyHintPath>

Expand Down Expand Up @@ -108,7 +107,7 @@
<PropertyGroup Condition=" '$(Configuration)' == 'Coverage' ">
<OutputPath>bin\Coverage\</OutputPath>
<Coverage>true</Coverage>
<DefineConstants>$(DefineConstants);CODE_COVERAGE</DefineConstants>
<DefineConstants>$(DefineConstants);CODE_COVERAGE</DefineConstants>
</PropertyGroup>

<Import Project="$(AdditionalSettingsImport)" Condition="Exists('$(AdditionalSettingsImport)')" />
Expand Down
2 changes: 1 addition & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</packageRestore>
<packageSources>
<clear />
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<disabledPackageSources>
<add key="Microsoft and .NET" value="true" />
Expand Down
28 changes: 22 additions & 6 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ param (
[string]$SemanticVersion = '1.0.0-zlocal',
[string]$Branch,
[string]$CommitSHA,
[string]$BuildBranch = '1c479a7381ebbc0fe1fded765de70d513b8bd68e'
[string]$BuildBranch = 'cb2b9e41b18cb77ee644a51951d8c8f24cde9adf'
)

$msBuildVersion = 15;

# For TeamCity - If any issue occurs, this script fail the build. - By default, TeamCity returns an exit code of 0 for all powershell scripts, even if they fail
trap {
Write-Host "BUILD FAILED: $_" -ForegroundColor Red
Expand All @@ -24,7 +26,11 @@ trap {
if (-not (Test-Path "$PSScriptRoot/build")) {
New-Item -Path "$PSScriptRoot/build" -ItemType "directory"
}
wget -UseBasicParsing -Uri "https://raw.githubusercontent.com/NuGet/ServerCommon/$BuildBranch/build/init.ps1" -OutFile "$PSScriptRoot/build/init.ps1"

# Enable TLS 1.2 since GitHub requires it.
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12

Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/NuGet/ServerCommon/$BuildBranch/build/init.ps1" -OutFile "$PSScriptRoot/build/init.ps1"
. "$PSScriptRoot/build/init.ps1" -BuildBranch "$BuildBranch"

Write-Host ("`r`n" * 3)
Expand Down Expand Up @@ -69,14 +75,24 @@ Invoke-BuildStep 'Set version metadata in AssemblyInfo.cs' {

Invoke-BuildStep 'Building solution' {
$SolutionPath = Join-Path $PSScriptRoot "NuGet.Server.sln"
Build-Solution $Configuration $BuildNumber -MSBuildVersion "14" $SolutionPath -SkipRestore:$SkipRestore `
Build-Solution $Configuration $BuildNumber -MSBuildVersion "$msBuildVersion" $SolutionPath -SkipRestore:$SkipRestore `
} `
-ev +BuildErrors

Invoke-BuildStep 'Creating artifacts' {
New-Package (Join-Path $PSScriptRoot "src\NuGet.Server.Core\NuGet.Server.Core.csproj") -Configuration $Configuration -Symbols -BuildNumber $BuildNumber -Version $SemanticVersion -Branch $Branch
New-Package (Join-Path $PSScriptRoot "src\NuGet.Server.V2\NuGet.Server.V2.csproj") -Configuration $Configuration -Symbols -BuildNumber $BuildNumber -Version $SemanticVersion -Branch $Branch
New-Package (Join-Path $PSScriptRoot "src\NuGet.Server\NuGet.Server.nuspec") -Configuration $Configuration -Symbols -BuildNumber $BuildNumber -Version $SemanticVersion -Branch $Branch
$projects = `
"src\NuGet.Server.Core\NuGet.Server.Core.csproj", `
"src\NuGet.Server.V2\NuGet.Server.V2.csproj", `
"src\NuGet.Server\NuGet.Server.nuspec"

Foreach ($project in $projects) {
New-Package (Join-Path $PSScriptRoot $project) -Configuration $Configuration -Symbols -BuildNumber $BuildNumber -MSBuildVersion "$msBuildVersion" -Version $SemanticVersion -Branch $Branch
}
} `
-ev +BuildErrors

Invoke-BuildStep 'Signing the packages' {
Sign-Packages -Configuration $Configuration -BuildNumber $BuildNumber -MSBuildVersion $msBuildVersion `
} `
-ev +BuildErrors

Expand Down
Binary file added lib/NuGet-Chocolatey/NuGet.Core.dll
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using NuGet.Server.Core.Infrastructure;

namespace NuGet.Server.V2.Samples.OwinHost
{
public class DictionarySettingsProvider : ISettingsProvider
{
readonly Dictionary<string, bool> _settings;
private readonly Dictionary<string, object> _settings;

public DictionarySettingsProvider(Dictionary<string, bool> settings)
public DictionarySettingsProvider(Dictionary<string, object> settings)
{
_settings = settings;
}


public bool GetBoolSetting(string key, bool defaultValue)
{
System.Diagnostics.Debug.WriteLine("getSetting: " + key);
return _settings.ContainsKey(key) ? _settings[key] : defaultValue;
return _settings.ContainsKey(key) ? Convert.ToBoolean(_settings[key]) : defaultValue;
}

public int GetIntSetting(string key, int defaultValue)
{
return _settings.ContainsKey(key) ? Convert.ToInt32(_settings[key]) : defaultValue;
}

public string GetStringSetting(string key, string defaultValue)
{
return _settings.ContainsKey(key) ? Convert.ToString(_settings[key]) : defaultValue;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\MicroBuild.Core.0.3.0\build\MicroBuild.Core.props" Condition="Exists('..\..\packages\MicroBuild.Core.0.3.0\build\MicroBuild.Core.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand All @@ -9,9 +10,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NuGet.Server.V2.Samples.OwinHost</RootNamespace>
<AssemblyName>NuGet.Server.V2.Samples.OwinHost</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -38,14 +41,14 @@
<StartupObject>NuGet.Server.V2.Samples.OwinHost.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Data.Edm, Version=5.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="Microsoft.Data.Edm, Version=5.8.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Data.Edm.5.7.0\lib\net40\Microsoft.Data.Edm.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Data.Edm.5.8.4\lib\net40\Microsoft.Data.Edm.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Data.OData, Version=5.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="Microsoft.Data.OData, Version=5.8.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Data.OData.5.7.0\lib\net40\Microsoft.Data.OData.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Data.OData.5.8.4\lib\net40\Microsoft.Data.OData.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Expand All @@ -71,10 +74,6 @@
<HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.Core, Version=2.14.0.832, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\NuGet.Core.2.14.0\lib\net40-Client\NuGet.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Owin">
<HintPath>..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
<Private>True</Private>
Expand All @@ -87,9 +86,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
</Reference>
<Reference Include="System.Spatial, Version=5.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="System.Spatial, Version=5.8.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\System.Spatial.5.7.0\lib\net40\System.Spatial.dll</HintPath>
<HintPath>..\..\packages\System.Spatial.5.8.4\lib\net40\System.Spatial.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Expand Down Expand Up @@ -136,5 +135,20 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\build\sign.targets" Condition="Exists('..\..\build\sign.targets')" />
<PropertyGroup>
<SignPath>..\..\build</SignPath>
<SignPath Condition="'$(BUILD_SOURCESDIRECTORY)' != ''">$(BUILD_SOURCESDIRECTORY)\build</SignPath>
<SignPath Condition="'$(NuGetBuildPath)' != ''">$(NuGetBuildPath)</SignPath>
<SignType Condition="'$(SignType)' == ''">none</SignType>
</PropertyGroup>
<Import Project="$(SignPath)\sign.targets" Condition="Exists('$(SignPath)\sign.targets')" />
<Import Project="$(SignPath)\sign.microbuild.targets" Condition="Exists('$(SignPath)\sign.microbuild.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\MicroBuild.Core.0.3.0\build\MicroBuild.Core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\MicroBuild.Core.0.3.0\build\MicroBuild.Core.props'))" />
<Error Condition="!Exists('..\..\packages\MicroBuild.Core.0.3.0\build\MicroBuild.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\MicroBuild.Core.0.3.0\build\MicroBuild.Core.targets'))" />
</Target>
<Import Project="..\..\packages\MicroBuild.Core.0.3.0\build\MicroBuild.Core.targets" Condition="Exists('..\..\packages\MicroBuild.Core.0.3.0\build\MicroBuild.Core.targets')" />
</Project>
2 changes: 1 addition & 1 deletion samples/NuGet.Server.V2.Samples.OwinHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static void Main(string[] args)

// Set up a common settingsProvider to be used by all repositories.
// If a setting is not present in dictionary default value will be used.
var settings = new Dictionary<string, bool>();
var settings = new Dictionary<string, object>();
settings.Add("enableDelisting", false); //default=false
settings.Add("enableFrameworkFiltering", false); //default=false
settings.Add("ignoreSymbolsPackages", true); //default=false
Expand Down
32 changes: 16 additions & 16 deletions samples/NuGet.Server.V2.Samples.OwinHost/app.config
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /></startup>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0" />
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.8.4.0" newVersion="5.8.4.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0" />
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.8.4.0" newVersion="5.8.4.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Spatial" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0" />
<assemblyIdentity name="System.Spatial" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.8.4.0" newVersion="5.8.4.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down
7 changes: 4 additions & 3 deletions samples/NuGet.Server.V2.Samples.OwinHost/packages.config
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MicroBuild.Core" version="0.3.0" targetFramework="net46" developmentDependency="true" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net461" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.OData" version="5.7.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.Data.Edm" version="5.7.0" targetFramework="net45" />
<package id="Microsoft.Data.OData" version="5.7.0" targetFramework="net45" />
<package id="Microsoft.Data.Edm" version="5.8.4" targetFramework="net46" />
<package id="Microsoft.Data.OData" version="5.8.4" targetFramework="net46" />
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Host.HttpListener" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Hosting" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Web.Xdt" version="2.1.1" targetFramework="net46" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net46" />
<package id="NuGet.Core" version="2.14.0" targetFramework="net46" />
<package id="Owin" version="1.0" targetFramework="net45" />
<package id="System.Spatial" version="5.7.0" targetFramework="net45" />
<package id="System.Spatial" version="5.8.4" targetFramework="net46" />
</packages>
32 changes: 32 additions & 0 deletions src/NuGet.Server.Core/Core/DuplicatePackageException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace NuGet.Server.Core
{
/// <summary>
/// This exception is thrown when trying to add a package in a version that already exists on the server
/// and <see cref="NuGet.Server.Core.Infrastructure.ServerPackageRepository.AllowOverrideExistingPackageOnPush"/> is set to false.
/// </summary>
public class DuplicatePackageException : Exception
{
public DuplicatePackageException()
{
}

public DuplicatePackageException(string message) : base(message)
{
}

public DuplicatePackageException(string message, Exception innerException) : base(message, innerException)
{
}

protected DuplicatePackageException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}
}
Loading