Let me start by saying that I'm receiving errors left and right inside Visual Studio since upgrading to the newest version of DotNet Core. I'm going to just post one of the problems here in the hopes that they're all related and/or can be fixed the same. I've tried uninstalling/repairing the packages here (https://www.microsoft.com/net/core#windows) several times, with no luck.



dotnet --info output:

If it helps any, when I try to load a project from RC1, in the ActivityLog.xml file, I get an error loading ITelemetry or something like that. I also get a failure file generated, which contains the following:
5/19/2016 5:24:26 PM
Recoverable
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.VisualStudio.ProjectSystem.DotNet.Publish.PublishLoader.<
--- 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.
--- 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.DotNet.Publish.PublishLoader.
--- 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)
I do not get this error when creating a new project, as I've done above.
I, too, have been receiving this error. I wasn't sure where to seek help (since VS Tooling doesn't appear to be on Github), so I posted to these two locations:
https://connect.microsoft.com/VisualStudio/Feedback/Details/2717687
but these have received no attention. I was beginning to think my situation was unique.
I was able to get further down the road (past the 0x80070002 message box) by building the templates myself from https://github.com/aspnet/Templates (and setting $env:KOREBUILD_DOTNET_VERSION = "1.0.0-preview1-002702" beforehand). I installed the templates in the user templates location and removed them from the VS directories.
Now I no longer get the file not found message box immediately. Instead, the templates create a partial project and I get the error that you're seeing (Microsoft.VisualStudio.ProjectSystem.DotNet.Publish.PublishLoader). The Core templates get partially instantiated--far enough along that I can replace the last remaining template parameters and get going.
EDIT:
I forgot to mention that I uninstalled and reinstalled:
I also went so far as to remove VS 2015 and install a new copy (after removing older .dnx caches), then reinstalling the above a third time. Same results.
I think I have a fix.
I went to the following folder:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft
And deleted the "DotNet" folder and the "Web Tools" folder.
Then I did a repair (from Programs and Features) of "Microsoft .NET Core 1.0.0 RC2 - VS 2015 Tooling Preview 1".
I'm still testing it, but I'm way further than I was able to get before.
I should also add that I added the environment variable to "opt out" of the new report-everything-that-you're-doing-to-microsoft (i.e. Telemetry) feature. :)
Yes! Thank you @joshmouch
I copied the two directories and ran a diff after the repair. It looks like the only file that is changed in DotNet is cache.bin, so it may not be necessary to remove this directory.
My "Web Tools" directory had a large number of files in it. In particular the "Web Tools" directory had a DNX subdirectory with these two files in it:
11/15/2015 01:06 PM 16,576 Microsoft.VisualStudio.ProjectSystem.DNX.14.0.dll
11/15/2015 01:06 PM 22,720 Microsoft.VisualStudio.ProjectSystem.Wizard.dll
The older Wizard assembly appears to be a possible cause of the file not found issue.
@barrytang @abpiskunov there are a number of potential tools issues here. Can you take a look, and provide guidance for tools bugs?
Could you send me your installation logs (they should be in %temp%, and will all start with dd_dotnet*)
Happy to. If you could send me an email (see my profile) I'll send a zip. I'm leaving for the holiday weekend soon.
@toddlucas zip will likely get rejected by mail on my end, so maybe try something like RAR. Otherwise you can just attach the zip with the logs to this issue
The zip is 42MB. I'd rather not attach since it's a log. If you send me an email I'll upload to S3 and send you a link.
Sure. Just mail the link to me at joeloff at microsoft dot com
Moved to appropriate repo. Closing CLI copy.
Most helpful comment
I think I have a fix.
I went to the following folder:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft
And deleted the "DotNet" folder and the "Web Tools" folder.
Then I did a repair (from Programs and Features) of "Microsoft .NET Core 1.0.0 RC2 - VS 2015 Tooling Preview 1".
I'm still testing it, but I'm way further than I was able to get before.