{"action":"opened","issue":{"url":"https://api.github.com/repos/dotnet/cli/issues/869","labels_url":"https://api.github.com/repos/dotnet/cli/issues/869/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/cli/issues/869/comments","events_url":"https://api.github.com/repos/dotnet/cli/issues/869/events","html_url":"https://github.com/dotnet/cli/issues/869","id":126944652,"number":869,"title":"Error running dnu restore on linux from a Makefile","user":{"login":"ac-esousa","id":16337360,"avatar_url":"https://avatars.githubusercontent.com/u/16337360?v=3","gravatar_id":"","url":"https://api.github.com/users/ac-esousa","html_url":"https://github.com/ac-esousa","followers_url":"https://api.github.com/users/ac-esousa/followers","following_url":"https://api.github.com/users/ac-esousa/following{/other_user}","gists_url":"https://api.github.com/users/ac-esousa/gists{/gist_id}","starred_url":"https://api.github.com/users/ac-esousa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ac-esousa/subscriptions","organizations_url":"https://api.github.com/users/ac-esousa/orgs","repos_url":"https://api.github.com/users/ac-esousa/repos","events_url":"https://api.github.com/users/ac-esousa/events{/privacy}","received_events_url":"https://api.github.com/users/ac-esousa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-15T19:53:58Z","updated_at":"2016-01-15T19:53:58Z","closed_at":null,"body":"Hello,\r\n\r\nWhen a running `dnu restore` from a Makefile (this is my Makefile [Makefile.zip](https://github.com/dotnet/cli/files/92434/Makefile.zip)) on a linux machine, I got the following error:\r\n\r\n    Microsoft .NET Development Utility CoreClr-x64-1.0.0-rc1-16231\r\n\r\n      CACHE https://api.nuget.org/v3/index.json\r\n    Restoring packages for /home/dudu/acpm/src/BackEnd/Data.Contracts/project.json\r\n\r\n    Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.\r\n       at NuGet.VersionUtility.GetNearestCore[T](FrameworkName projectFramework, IEnumerable`1 items, Func`2 fxExtractor, IEnumerable`1& compatibleItems)\r\n       at NuGet.VersionUtility.GetNearest[T](FrameworkName projectFramework, IEnumerable`1 items, IEnumerable`1& compatibleItems)\r\n       at Microsoft.Dnx.Runtime.NuGetDependencyResolver.<GetDependencies>d__4.MoveNext()\r\n       at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.<>c__DisplayClass3_0.<ChainPredicate>b__0(String name)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.<CreateGraphNode>d__2.MoveNext()\r\n       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.CreateGraphNode(RestoreContext context, LibraryRange libraryRange, Func`2 predicate)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.<CreateGraphNode>d__2.MoveNext()\r\n       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.CreateGraphNode(RestoreContext context, LibraryRange libraryRange, Func`2 predicate)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.<CreateGraphNode>d__2.MoveNext()\r\n       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.CreateGraphNode(RestoreContext context, LibraryRange libraryRange, Func`2 predicate)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.<CreateGraphNode>d__2.MoveNext()\r\n       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.CreateGraphNode(RestoreContext context, LibraryRange libraryRange, Func`2 predicate)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.<CreateGraphNode>d__2.MoveNext()\r\n       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.CreateGraphNode(RestoreContext context, LibraryRange libraryRange, Func`2 predicate)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.<CreateGraphNode>d__2.MoveNext()\r\n       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.CreateGraphNode(RestoreContext context, LibraryRange libraryRange, Func`2 predicate)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.<CreateGraphNode>d__2.MoveNext()\r\n       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.CreateGraphNode(RestoreContext context, LibraryRange libraryRange, Func`2 predicate)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.<CreateGraphNode>d__2.MoveNext()\r\n       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.CreateGraphNode(RestoreContext context, LibraryRange libraryRange, Func`2 predicate)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.<CreateGraphNode>d__2.MoveNext()\r\n       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.CreateGraphNode(RestoreContext context, LibraryRange libraryRange, Func`2 predicate)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.<CreateGraphNode>d__2.MoveNext()\r\n       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.CreateGraphNode(RestoreContext context, LibraryRange libraryRange, Func`2 predicate)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.<CreateGraphNode>d__2.MoveNext()\r\n       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n       at Microsoft.Dnx.Tooling.RestoreOperations.CreateGraphNode(RestoreContext context, LibraryRange libraryRange, Func`2 predicate)\r\n       at Microsoft.Dnx.Tooling.RestoreCommand.<CreateGraphNode>d__71.MoveNext()\r\n       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n       at Microsoft.Dnx.Tooling.RestoreCommand.CreateGraphNode(RestoreOperations restoreOperations, RestoreContext context, LibraryRange libraryRange, Func`2 predicate)\r\n       at Microsoft.Dnx.Tooling.RestoreCommand.<RestoreForProject>d__69.MoveNext()\r\n       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n       at Microsoft.Dnx.Tooling.RestoreCommand.RestoreForProject(String projectJsonPath, String rootDirectory, String packagesDirectory, IList`1 remoteProviders, SummaryContext summary)\r\n       at Microsoft.Dnx.Tooling.RestoreCommand.<>c__DisplayClass68_0.<<Execute>b__2>d.MoveNext()\r\n       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)\r\n       at Microsoft.Dnx.Tooling.RestoreCommand.<>c__DisplayClass68_0.<Execute>b__2(String projectJsonPath)\r\n       at Microsoft.Dnx.Tooling.RestoreCommand.<Execute>d__68.MoveNext()\r\n       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n       at Microsoft.Dnx.Tooling.RestoreCommand.Execute(String restoreDirectory, PackageFeedCache packageFeeds, SummaryContext summary)\r\n       at Microsoft.Dnx.Tooling.RestoreCommand.<Execute>d__67.MoveNext()\r\n       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n       at Microsoft.Dnx.Tooling.RestoreCommand.Execute()\r\n       at Microsoft.Dnx.Tooling.RestoreConsoleCommand.<>c__DisplayClass0_0.<<Register>b__1>d.MoveNext()\r\n       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)\r\n       at Microsoft.Dnx.Tooling.RestoreConsoleCommand.<>c__DisplayClass0_0.<Register>b__1()\r\n       at Microsoft.Dnx.Runtime.Common.CommandLine.CommandLineApplication.<>c__DisplayClass68_0.<OnExecute>b__0()\r\n       at Microsoft.Dnx.Runtime.Common.CommandLine.CommandLineApplication.Execute(String[] args)\r\n       at Microsoft.Dnx.Tooling.Program.Main(String[] args)\r\n       --- End of inner exception stack trace ---\r\n       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)\r\n       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)\r\n       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n       at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider)\r\n       at Microsoft.Dnx.Host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment env, String appBase, FrameworkName targetFramework)\r\n       at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args, BootstrapperContext bootstrapperContext)\r\n       at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args, BootstrapperContext bootstrapperContext)\r\n       at DomainManager.Execute(Int32 argc, Char** argv, NativeBootstrapperContext* context)\r\n    make: *** [src/BackEnd/Services/project.lock.json] Aborted (core dumped)\r\n    make: Leaving directory `/home/dudu/acpm'\r\n\r\nIf I run `dnu restore` without using make, everything goes ok.\r\n\r\nAlso, I am able to use this Makefile on a Mac OSX machine.\r\n"}}