You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right click on the "UnitTests" project in the Solution Explorer and click Build.
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
The text was updated successfully, but these errors were encountered:
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.
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
Clone https://github.com/rainersigwald/msbuild/tree/sdk-progress/framework-tests
Open
src/MSBuild.sln
in VS 2017Right click on the "UnitTests" project in the Solution Explorer and click Build.
Observe this error in the Output window
Other
dotnet restore UnitTests.csproj
works from the command line withThe text was updated successfully, but these errors were encountered: