Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI restore failure on .NET Core xunit unit test project #4442

Closed
rainersigwald opened this issue Jan 30, 2017 · 3 comments
Closed

UI restore failure on .NET Core xunit unit test project #4442

rainersigwald opened this issue Jan 30, 2017 · 3 comments
Assignees
Labels
Resolution:Duplicate This issue appears to be a Duplicate of another issue Type:Bug
Milestone

Comments

@rainersigwald
Copy link

Details about Problem

NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe):
VS UI

NuGet version (x.x.x.xxx):

VS version (if appropriate): (internal build) Microsoft Visual Studio Enterprise 2017 RC Version 15.0.26130.0 D15PREREL

OS version (i.e. win10 v1607 (14393.321)): Version 10.0.14393 Build 14393

Worked before? This is the first time I've tried it.

Detailed repro steps so we can see the same problem

  1. Clone https://github.com/rainersigwald/msbuild/tree/sdk-progress/framework-tests

  2. Open src/MSBuild.sln in VS 2017

  3. Right click on the "UnitTests" project in the Solution Explorer and click Build.

  4. Observe this error in the Output window

Error occurred while restoring NuGet packages: System.InvalidOperationException: The operation failed as details for project Framework could not be loaded.
   at NuGet.PackageManagement.VisualStudio.CpsPackageReferenceProject.GetPackageSpecsAsync(DependencyGraphCacheContext context)
   at NuGet.PackageManagement.DependencyGraphRestoreUtility.<GetSolutionRestoreSpec>d__8.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.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.DependencyGraphRestoreUtility.<IsRestoreRequiredAsync>d__6.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.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.SolutionRestoreManager.SolutionRestoreJob.<RestorePackageSpecProjectsAsync>d__17.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.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at NuGet.SolutionRestoreManager.SolutionRestoreJob.<RestoreAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at NuGet.SolutionRestoreManager.SolutionRestoreJob.<RestoreAsync>d__15.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.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.SolutionRestoreManager.SolutionRestoreJob.<ExecuteAsync>d__14.MoveNext()

Other

dotnet restore UnitTests.csproj works from the command line with

C:\src\msbuild\src\Framework\UnitTests>dotnet --info
.NET Command Line Tools (1.0.0-rc4-004689)

Product Information:
 Version:            1.0.0-rc4-004689
 Commit SHA-1 hash:  c740fa8f43

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\1.0.0-rc4-004689
@rainersigwald
Copy link
Author

Possible duplicate of #4307 ?

@rrelyea rrelyea added this to the 4.0 RTM milestone Feb 2, 2017
@rrelyea
Copy link
Contributor

rrelyea commented Feb 2, 2017

@jainaashish - can you determine if this is the same issue, please?

@jainaashish
Copy link
Contributor

Dupe of #4419 It has been fixed and will be available as part of next visual studio update.

For time being to unblock yourself, you can add below PropertyGroup inside Framework.csproj which will resolve this error:
<PackageVersion>1.0.0</PackageVersion>

But note, your solution has other restore errors as well like Dependency project has multipe target frameworks defined inside project.json which is not a supported scenario. Project.Json only support single target framework but you can import other target frameworks.

@jainaashish jainaashish added the Resolution:Duplicate This issue appears to be a Duplicate of another issue label Feb 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution:Duplicate This issue appears to be a Duplicate of another issue Type:Bug
Projects
None yet
Development

No branches or pull requests

3 participants