Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

error opening csproj with visual studio 2017 rc #568

Closed
lucamorelli opened this issue Jan 9, 2017 · 5 comments
Closed

error opening csproj with visual studio 2017 rc #568

lucamorelli opened this issue Jan 9, 2017 · 5 comments

Comments

@lucamorelli
Copy link

Hi, I have Vs 2015 rc updated with the latest fixes, installed the latest version of the aspnetcore generator and generated the project using csproj format.
If I try to open it using visual studio, it crashed and in the VsProjectsFault* log file I find this:

=====================
09/01/2017 16:05:55
Recoverable
System.AggregateException: One or more errors occurred. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.TreeService.EnsureNotFaultedTree(IProjectVersionedValue`1 appliedValue)
   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.TreeService.<PublishAnyNonLoadingTreeAsync>d__68.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 Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectNode.<>c__DisplayClass635_0.<<ParseCanonicalName>b__0>d.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 Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
   at Microsoft.VisualStudio.Threading.JoinableTask`1.CompleteOnCurrentThread()
   at Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run[T](Func`1 asyncMethod, JoinableTaskCreationOptions creationOptions)
   at Microsoft.VisualStudio.ProjectSystem.ProjectMultiThreadedService.ExecuteSynchronously[T](Func`1 asyncAction)
   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectNode.<>c__DisplayClass554_0.<HrInvoke>b__0()
   at Microsoft.VisualStudio.ProjectSystem.VS.HResult.Invoke(Func`1 action, IServiceProvider vsShellServiceProvider, IProjectFaultHandlerService projectFaultHandlerService, UnconfiguredProject project)
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.TreeService.EnsureNotFaultedTree(IProjectVersionedValue`1 appliedValue)
   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.TreeService.<PublishAnyNonLoadingTreeAsync>d__68.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 Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectNode.<>c__DisplayClass635_0.<<ParseCanonicalName>b__0>d.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 Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
   at Microsoft.VisualStudio.Threading.JoinableTask`1.CompleteOnCurrentThread()
   at Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run[T](Func`1 asyncMethod, JoinableTaskCreationOptions creationOptions)
   at Microsoft.VisualStudio.ProjectSystem.ProjectMultiThreadedService.ExecuteSynchronously[T](Func`1 asyncAction)
   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectNode.<>c__DisplayClass554_0.<HrInvoke>b__0()
   at Microsoft.VisualStudio.ProjectSystem.VS.HResult.Invoke(Func`1 action, IServiceProvider vsShellServiceProvider, IProjectFaultHandlerService projectFaultHandlerService, UnconfiguredProject project)<---

===================

@MarkPieszak
Copy link
Contributor

I believe the csproj version of the generator is for VS 2017 only.

@spboyer
Copy link

spboyer commented Jan 9, 2017

Correct @MarkPieszak csproj tooling is only in VS 2017.

@lucamorelli
Copy link
Author

lucamorelli commented Jan 9, 2017

sorry, I'm using vs 2017 rc

@chriscooper87
Copy link

chriscooper87 commented Jan 9, 2017

I also get this error when using the generator to create a csproj version within 2017 rc.

The only way I have manged to get this to open in vs 2017 rc is by editing the targetframework in the csproj file back to 1.0:

<TargetFramework>netcoreapp1.0</TargetFramework>

@SteveSandersonMS
Copy link
Member

Closing as duplicate of #563.

@chriscooper87 Thanks for the pointer about <TargetFramework>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants