Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

CoreCLR version of kpm restore failed with Only one asynchronous reader or writer is allowed time at one time  #858

@xqiu

Description

@xqiu

When I run kpm restore for azure storage from commandline, I get the following error:

C:\github\xqiu\StorageClientPrivate>where kpm
C:\Users\xinqiu\.kre\packages\KRE-CoreCLR-x86.1.0.0-beta1-10662\bin\kpm.cmd

C:\github\xqiu\StorageClientPrivate>kpm restore           (or use C:\github\xqiu\StorageClientPrivate>kpm restore --source \\projectk-tc\Drops\Cor
eCLR\release\Latest\build --source https://www.myget.org/F/aspnetrelease/api/v2
--source https://nuget.org/api/v2/ )

…
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Data.Edm'.
  OK https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Data.Edm' 782ms
  OK https://www.myget.org/F/aspnetrelease/api/v2/FindPackagesById()?Id='Microso
ft.Data.Edm' 3193ms
 CACHE https://nuget.org/api/v2/package/Microsoft.Data.Edm/5.6.3
----------
System.InvalidOperationException: Only one asynchronous reader or writer is allo
wed time at one time.
   at System.IO.Compression.DeflateStream.ReadAsync(Byte[] array, Int32 offset,
Int32 count, CancellationToken cancellationToken)
   at System.IO.Stream.<CopyToAsyncInternal>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
   at Microsoft.Framework.PackageManager.Restore.NuGet.NuGetPackageFolder.<OpenN
uspecStreamAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
   at Microsoft.Framework.PackageManager.RemoteWalkProvider.<GetDependencies>d__
1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
   at Microsoft.Framework.PackageManager.RestoreOperations.<FindLibraryEntry>d__
1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
   at Microsoft.Framework.PackageManager.RestoreOperations.<CreateGraphNode>d__1
.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.Framework.PackageManager.RestoreOperations.<CreateGraphNode>d__1
.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.Framework.PackageManager.RestoreCommand.<RestoreForProject>d__1.
MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at Microsoft.Framework.PackageManager.RestoreCommand.<ExecuteCommand>d__1.Mov
eNext()
----------
Restore failed
Only one asynchronous reader or writer is allowed time at one time.

Nuget.config has:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="localReleaseCoreCLR" value="\\projectk-tc\Drops\CoreCLR\release\Latest\build" />
    <add key="AspNetRelease" value="https://www.myget.org/F/aspnetrelease/api/v2" />
    <add key="NuGet.org" value="https://nuget.org/api/v2/" />
  </packageSources>
</configuration>

Project.json has:

{
    "version": "4.3.0.0",
    "authors": ["Microsoft Corporation"],
    "description": "Azure Storage SDK for ASP.NET 5 Preview",
    "dependencies": {
        "Microsoft.Data.OData": "5.6.3",
        "Microsoft.Data.Services.Client": "5.6.3",
        "System.Spatial": "5.6.3"
    },
    "frameworks": {
        "aspnetcore50": {
            "dependencies": {
                "System.Collections": "4.0.10-beta-*",
                "System.Collections.Concurrent": "4.0.0-beta-*",
                "System.Collections.Specialized": "4.0.0-beta-*",
                "System.Diagnostics.Debug": "4.0.10-beta-*",
                "System.Diagnostics.Tools": "4.0.0-beta-*",
                "System.Diagnostics.TraceSource": "4.0.0-beta-*",
                "System.Diagnostics.Tracing": "4.0.10-beta-*",
                "System.Dynamic.Runtime": "4.0.0-beta-*",
                "System.Globalization": "4.0.10-beta-*",
                "System.IO": "4.0.10-beta-*",
                "System.IO.FileSystem": "4.0.0-beta-*",
                "System.IO.FileSystem.Primitives": "4.0.0-beta-*",
                "System.Linq": "4.0.0-beta-*",
                "System.Linq.Expressions": "4.0.0-beta-*",
                "System.Linq.Queryable": "4.0.0-beta-*",
                "System.Net.Http": "4.0.0-beta-*",
                "System.Net.Primitives": "4.0.10-beta-*",
                "System.Reflection": "4.0.10-beta-*",
                "System.Reflection.Extensions": "4.0.0-beta-*",
                "System.Reflection.TypeExtensions": "4.0.0-beta-*",
                "System.Runtime": "4.0.20-beta-*",
                "System.Runtime.Extensions": "4.0.10-beta-*",
                "System.Runtime.InteropServices": "4.0.20-beta-*",
                "System.Runtime.Serialization.Primitives": "4.0.0-beta-*",
                "System.Runtime.Serialization.Xml": "4.0.10-beta-*",
                "System.Security.Cryptography.Encoding": "4.0.0-beta-*",
                "System.Security.Cryptography.Encryption": "4.0.0-beta-*",
                "System.Security.Cryptography.Hashing": "4.0.0-beta-*",
                "System.Security.Cryptography.Hashing.Algorithms": "4.0.0-beta-*",
                "System.Text.Encoding": "4.0.10-beta-*",
                "System.Text.Encoding.Extensions": "4.0.10-beta-*",
                "System.Text.RegularExpressions": "4.0.10-beta-*",
                "System.Threading": "4.0.0-beta-*",
                "System.Threading.Tasks": "4.0.10-beta-*",
                "System.Threading.Thread": "4.0.0-beta-*",
                "System.Threading.ThreadPool": "4.0.10-beta-*",
                "System.Threading.Timer": "4.0.0-beta-*",
                "System.Xml.ReaderWriter": "4.0.10-beta-*",
                "System.Xml.XDocument": "4.0.0-beta-*",
                "System.Xml.XmlSerializer": "4.0.0-beta-*"
            }
        },
        "aspnet50": {
            "frameworkAssemblies": {
                "System.Data": "",
                "System.Data.DataSetExtensions": "",
                "System.Runtime": "",
                "System.Xml": "",
                "System.Xml.Linq": "",
                "System.Runtime.Serialization.Xml": "",
                "System.Net.Http": ""
            }
        }
    },
    "compilationOptions": {
        "define": [ "ASPNET_K" ],
       "allowUnsafe": false,
        "warningsAsErrors": true
    },
    "code": [
        "**/*.cs",

        "../../Common/*.cs",
        "../../Common/Shared/**/*.cs",
        "../../Common/Auth/**/*.cs",
        "../../Common/Core/**/*.cs",
        "../../Common/RetryPolicies/**/*.cs",
        "../../Common/Blob/**/*.cs",
        "../../Common/File/**/*.cs",
        "../../Common/Queue/**/*.cs",
        "../../Common/Table/*.cs",
        "../../Common/Table/Protocol/*.cs",

        "../../WindowsRuntime/*.cs",
        "../../WindowsRuntime/Auth/**/*.cs",
        "../../WindowsRuntime/Blob/Protocol/*.cs",
        "../../WindowsRuntime/Blob/*.cs",
        "../../WindowsRuntime/Core/**/*.cs",
        "../../WindowsRuntime/Shared/**/*.cs",
        "../../WindowsRuntime/Queue/*.cs",
        "../../WindowsRuntime/Queue/Protocol/*.cs",
        "../../WindowsRuntime/File/*.cs",
        "../../WindowsRuntime/File/Protocol/*.cs",
        "../../WindowsRuntime/Table/*.cs",
        "../../WindowsRuntime/Table/DataServices/*.cs",
        "../../WindowsRuntime/Table/Protocol/*.cs"

        /*
        Note, WinRT does not include "../../Common/Table/Queryable/*.cs", so we won't either
        */
    ]
}

Workaround: use kpm restore with CLR version, instead of CoreCLR version

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions