Skip to content

Commit

Permalink
Uplift To NuGet.Client
Browse files Browse the repository at this point in the history
(#508) Update using references to new NuGet libraries

(#508) Update Constants references for new libraries

update constants

(#508) ChocolateyNugetLogger update to nuget logger changes

(#508) Update method of getting remote repository

This allows getting the remote repositories and remote resources from the config,
 with authentication and client certificates attached as available.

(#508) Get Push working

(#508) Get pack compiling

This gets pack working, if the package is using the NuGet compatible schema without
the added Chocolatey specific elements

(#508) Switch nupkg reading to PackageArchiveReader

As OptimizedZipPackage is no longer available

Switch to using my forked libraries

Switch package result to use IPackageMetadata/IPackageServerMetadata

Fix Pin, Template and Export commands

Get List working

Misc fixes

Get Outdated, Install, Upgrade and Uninstall compiling

Try initial manual package installation routine

Remove Pending from Install Scenarios and tweak tests

Fixes a couple of tests that have different behavior with newer NuGet
Fixes a couple of tests that were pending, and were not written correctly

Add better exception handling during setup to TinySpec

ChocolateyPackageMetadata handle .nuspecs

Fixes for List

Make sure results are not duplicated, and that ordering is correct

Add Identity to packageresult

ChocolateyPackagePathResolver fix for side by side and use to get install location

temp add debug asset to ensure metadata available

NuGetCommon add more methods and tweak GetPackageDependencies

This adds methods to get the local/installed package repository,
to get dependencies for installed packages,
and fixes GetPackageDependencies to get dependencys with ranges

Switch to PackageMetadataResource to get all package versions

Port over install improvements from parallel install branch

misc cleanups

Switch package service actions to include configuration

Upgrade command work

Switch depender to parent

Add in package page to list verbose output

Work on upgrade/uninstall

Upgrade to nuget 6.4.0.4

Upgrade and Uninstall get passing tests

Upgrade NuGet SDK build

Update path resolver to specify correct manifest name

upgrade nuget library version again

Add tests for side by side nuspec and nupkg file names

This adds tests to ensure that the manifest and package files are correctly named,
that is with the version in the filenames if side by side, and without the version
if not side by side.

Remove now unused nugetpackagemanager related code

Update my added integration tests

Fixes and adds a test to the switch side by side to normal install scenario.

Tweak install package resolution for side by side and add a test

Update messages in some pester tests
  • Loading branch information
TheCakeIsNaOH committed Nov 8, 2022
1 parent 73dfc82 commit 99ec19b
Show file tree
Hide file tree
Showing 65 changed files with 3,287 additions and 1,126 deletions.
1 change: 1 addition & 0 deletions Invoke-Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ try {
if (-not $env:VM_RUNNING -and -not $env:TEST_KITCHEN) {
'VMOnly'
}
'NaOHBroken'
)
}
}
Expand Down
3 changes: 3 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ Param(
[string[]]$ScriptArgs
)

#REMOVE ME, TEMP SET EXTRA nuget source:
$ENV:NUGETDEVRESTORE_SOURCE = "https://nuget.naoh.host/repository/nuget-public/index.json"

# 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
Expand Down
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export CAKE_PATHS_TOOLS=$TOOLS_DIR
export CAKE_PATHS_ADDINS=$ADDINS_DIR
export CAKE_PATHS_MODULES=$MODULES_DIR

#REMOVE ME, TEMP SET EXTRA nuget source:
export NUGETDEVRESTORE_SOURCE="https://nuget.naoh.host/repository/nuget-public/index.json"

# Define md5sum or md5 depending on Linux / macOS
MD5_EXE=
if [[ "$(uname -s)" == "Darwin" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions src/chocolatey.console/chocolatey.console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Web.XmlTransform">
<HintPath>..\packages\Microsoft.Web.Xdt.2.1.1\lib\net40\Microsoft.Web.XmlTransform.dll</HintPath>
<Reference Include="Microsoft.Web.XmlTransform, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Web.Xdt.3.1.0\lib\net40\Microsoft.Web.XmlTransform.dll</HintPath>
</Reference>
<Reference Include="SimpleInjector, Version=2.8.3.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL">
<HintPath>..\packages\SimpleInjector.2.8.3\lib\net45\SimpleInjector.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion src/chocolatey.console/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<packages>
<package id="AlphaFS" version="2.1.3" targetFramework="net40" />
<package id="log4net" version="2.0.12" targetFramework="net48" />
<package id="Microsoft.Web.Xdt" version="2.1.1" targetFramework="net40" />
<package id="Microsoft.Web.Xdt" version="3.1.0" targetFramework="net48" />
<package id="SimpleInjector" version="2.8.3" targetFramework="net48" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,33 @@
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Web.XmlTransform, Version=2.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Web.Xdt.2.1.1\lib\net40\Microsoft.Web.XmlTransform.dll</HintPath>
<Reference Include="Microsoft.Web.XmlTransform, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Web.Xdt.3.1.0\lib\net40\Microsoft.Web.XmlTransform.dll</HintPath>
</Reference>
<Reference Include="Moq">
<HintPath>..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NuGet.Common, Version=6.4.1.1, Culture=neutral, PublicKeyToken=fd112f53c3ab578c, processorArchitecture=MSIL">
<HintPath>..\packages\Chocolatey.NuGet.Common.6.4.1-zlocal.1\lib\net472\NuGet.Common.dll</HintPath>
</Reference>
<Reference Include="NuGet.Configuration, Version=6.4.1.1, Culture=neutral, PublicKeyToken=fd112f53c3ab578c, processorArchitecture=MSIL">
<HintPath>..\packages\Chocolatey.NuGet.Configuration.6.4.1-zlocal.1\lib\net472\NuGet.Configuration.dll</HintPath>
</Reference>
<Reference Include="NuGet.Frameworks, Version=6.4.1.1, Culture=neutral, PublicKeyToken=fd112f53c3ab578c, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Frameworks.6.4.1-zlocal.1\lib\net472\NuGet.Frameworks.dll</HintPath>
</Reference>
<Reference Include="NuGet.Packaging, Version=6.4.1.1, Culture=neutral, PublicKeyToken=fd112f53c3ab578c, processorArchitecture=MSIL">
<HintPath>..\packages\Chocolatey.NuGet.Packaging.6.4.1-zlocal.1\lib\net472\NuGet.Packaging.dll</HintPath>
</Reference>
<Reference Include="NuGet.Protocol, Version=6.4.1.1, Culture=neutral, PublicKeyToken=fd112f53c3ab578c, processorArchitecture=MSIL">
<HintPath>..\packages\Chocolatey.NuGet.Protocol.6.4.1-zlocal.1\lib\net472\NuGet.Protocol.dll</HintPath>
</Reference>
<Reference Include="NuGet.Versioning, Version=6.4.1.1, Culture=neutral, PublicKeyToken=fd112f53c3ab578c, processorArchitecture=MSIL">
<HintPath>..\packages\Chocolatey.NuGet.Versioning.6.4.1-zlocal.1\lib\net472\NuGet.Versioning.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
Expand All @@ -87,6 +108,10 @@
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.IdentityModel" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Reactive.Core">
<HintPath>..\packages\Rx-Core.2.1.30214.0\lib\Net40\System.Reactive.Core.dll</HintPath>
</Reference>
Expand All @@ -96,6 +121,8 @@
<Reference Include="System.Reactive.Linq">
<HintPath>..\packages\Rx-Linq.2.1.30214.0\lib\Net40\System.Reactive.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Security" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
Expand Down
9 changes: 8 additions & 1 deletion src/chocolatey.tests.integration/packages.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Chocolatey.NuGet.Common" version="6.4.1-zlocal.1" targetFramework="net48" />
<package id="Chocolatey.NuGet.Configuration" version="6.4.1-zlocal.1" targetFramework="net48" />
<package id="Chocolatey.NuGet.Packaging" version="6.4.1-zlocal.1" targetFramework="net48" />
<package id="Chocolatey.NuGet.Protocol" version="6.4.1-zlocal.1" targetFramework="net48" />
<package id="Chocolatey.NuGet.Versioning" version="6.4.1-zlocal.1" targetFramework="net48" />
<package id="log4net" version="2.0.12" targetFramework="net48" />
<package id="Microsoft.Web.Xdt" version="2.1.1" targetFramework="net40" />
<package id="Microsoft.Web.Xdt" version="3.1.0" targetFramework="net48" />
<package id="Moq" version="4.2.1402.2112" targetFramework="net40" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="NuGet.Frameworks" version="6.4.1-zlocal.1" targetFramework="net48" />
<package id="NUnit" version="2.6.4" targetFramework="net40" />
<package id="NUnitTestAdapter" version="2.3.0" targetFramework="net40" />
<package id="Rx-Core" version="2.1.30214.0" targetFramework="net48" />
Expand Down
Loading

0 comments on commit 99ec19b

Please sign in to comment.