Created
December 5, 2017 10:22
-
-
Save SlowLogicBoy/56769cfd66803c0d2608688c8bd08859 to your computer and use it in GitHub Desktop.
Nuget.Client repo with csproj.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>netcoreapp2.0</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="NuGet.Client" Version="4.2.0" /> | |
<PackageReference Include="NuGet.Configuration" Version="4.4.0" /> | |
</ItemGroup> | |
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using NuGet; | |
using NuGet.Configuration; | |
using NuGet.Repositories; | |
namespace CSProjs | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var repo = new NuGetv3LocalRepository(SettingsUtility.GetGlobalPackagesFolder(Settings.LoadDefaultSettings(null))); | |
var packages = repo.FindPackagesById("NuGet.Client"); | |
var pkg = packages.Last(); | |
var nuspec = pkg.Nuspec; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment