Skip to content

Instantly share code, notes, and snippets.

View emgarten's full-sized avatar

Justin Emgarten emgarten

View GitHub Profile
@emgarten
emgarten / HexastoreTest.cs
Created February 26, 2020 01:52
Example of using hexastore
using System;
using Hexastore.Processor;
using Hexastore.Resoner;
using Hexastore.Rocks;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json.Linq;
namespace HexaTest
{
class Program
@emgarten
emgarten / RestoreErrors.md
Created May 15, 2017 22:37
NuGet warnings and errors in 4.2.0

A list of all errors and warnings that could come from Restore in NuGet 4.2.0

Errors in 4.2.0

Code Project Group Message Fields Comments
DependencyResolver Http The feed {0} lists package {1} but multiple attempts to download the nupkg have failed. The feed is either invalid or required packages were removed while the current operation was in progress. Verify the package exists on the feed and try again uri, package Feed is likely corrupt, recently added this message
NuGet.Commands resolver Failed to resolve conflicts for {0} graph
NuGet.Commands resolver Unable to satisfy conflicting requests for {0}: {1} packages combines all conflicts into a single message
NuGet.Commands compat {0} {1} provides a compile-time reference assembly for {2} on {3}, but there is no compatible run-time assembly package, framework Log_MissingImplementationFx

Keybase proof

I hereby claim:

  • I am emgarten on github.
  • I am emgarten (https://keybase.io/emgarten) on keybase.
  • I have a public key ASCV90JElTo4kho5a_Ue_-fSijEycBnQ8cSEu0R-FIqW8go

To claim this, I am signing this object:

@emgarten
emgarten / FindParentPackages.cs
Created January 22, 2017 20:34
Find all packages on nuget.org that depend on the target package id.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using NuGet.CatalogReader;
using NuGet.Common;
using NuGet.Packaging.Core;
using NuGet.Protocol;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using NuGet.Frameworks;
using NuGet.Packaging.Core;
using NuGet.ProjectManagement;
namespace ConsoleApplication5
@emgarten
emgarten / dg-debugging.txt
Created October 12, 2016 22:36
Debugging restore3
Set environment variables
$env:NUGET_PERSIST_DG=true
$env:NUGET_PERSIST_DG_PATH=c:\temp\path.json
Run dotnet.exe restore3
Open the output json file
Restore contains projects that will be directly restored.
<!--
***********************************************************************************************
Microsoft.NuGet.ImportAfter.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
#:C:\src\repros\roslyn\src\Compilers\Core\CodeAnalysisTest\CodeAnalysisTest.csproj
C:\src\repros\roslyn\src\Compilers\Core\CodeAnalysisTest\CodeAnalysisTest.csproj|C:\src\repros\roslyn\src\Test\PdbUtilities\PdbUtilities.csproj
C:\src\repros\roslyn\src\Compilers\Core\CodeAnalysisTest\CodeAnalysisTest.csproj|C:\src\repros\roslyn\src\Test\Utilities\Desktop\TestUtilities.Desktop.csproj
C:\src\repros\roslyn\src\Compilers\Core\CodeAnalysisTest\CodeAnalysisTest.csproj|C:\src\repros\roslyn\src\Compilers\CSharp\Portable\CSharpCodeAnalysis.csproj
C:\src\repros\roslyn\src\Compilers\Core\CodeAnalysisTest\CodeAnalysisTest.csproj|C:\src\repros\roslyn\src\Compilers\Test\Resources\Core\CompilerTestResources.csproj
C:\src\repros\roslyn\src\Compilers\Core\CodeAnalysisTest\CodeAnalysisTest.csproj|C:\src\repros\roslyn\src\Test\Utilities\Portable.FX45\TestUtilities.FX45.csproj
C:\src\repros\roslyn\src\Compilers\Core\CodeAnalysisTest\CodeAnalysisTest.csproj|C:\src\repros\roslyn\src\Compilers\VisualBasic\Portable\BasicCodeAnalysis.
@emgarten
emgarten / updates.cs
Created November 18, 2015 23:22
Find package updates available for a packages.config file
// install-package nuget.protocol.visualstudio
using NuGet.Configuration;
using NuGet.Packaging;
using NuGet.Protocol.Core.Types;
using NuGet.Protocol.VisualStudio;
using System;
using System.IO;
using System.Linq;
using System.Threading;
@emgarten
emgarten / restore.cs
Created November 4, 2015 04:00
NuGet.Core example of reading nuget.config restore settings
using System;
using NuGet;
namespace ConsoleApplication25
{
class Program
{
static void Main(string[] args)
{
// Create a new file system using the root directory of the solution or project.