Cannot load projects AT ALL in visual studio community 2015 - c++

I've been having this problem ever since my computer somehow abruptly decided to restart while I was working on a project.
Whenever I try to load a project now - any project - a warning message comes up saying that "The visual c++ project system package did not load correctly. The problem may have been caused by a configuration change or by the installation of another extension." Clicking either "yes" or "no" to "Continue to show this error message?" leads to a completely blank IDE, and trying to open or create any project or file after that leads to an error saying "Expected 1 exports with contract name "Microsoft.Internal.VisualStudio.PlatformUI.ISolutionAttachedCollectionService" but found 0 after applying applicable constraints."
In ActivityLog.xml, the description of the warning shows up as:
User:IdeUser, TF400813: Resource not available for anonymous access. Client authentication required.: VssUnauthorizedException during ImplicitSignIn
at Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler.<SendAsyncImpl>d__20.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.Services.Common.VssHttpMessageHandler.<SendAsync>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 Microsoft.VisualStudio.Services.Common.VssHttpRetryMessageHandler.<SendAsync>d__3.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.Services.WebApi.VssHttpClientBase.<SendAsync>d__79.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.Services.WebApi.VssHttpClientBase.<SendAsync>d__76`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.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.<GetConnectionDataAsync>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 Microsoft.VisualStudio.Services.Client.VssServerDataProvider.<ConnectAsync>d__39.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 Microsoft.VisualStudio.Shell.Connected.ConnectedUser.IdeConnector.<ConnectAsync>d__2.MoveNext() (ActivityId: 00000000-0000-0000-0000-000000000000)
I've seen this issue floating around a lot on stackoverflow and other websites, and the suggested solution has always been to delete %LOCALAPPDATA%\Microsoft\VisualStudio\14.0\ComponentModelCache and then restart visual studio. However, this has not worked for me thus far. Nothing - all the way to deleting said folder and then repairing or outright reinstalling visual studio - has worked. I'm at wit's end. I just don't know what else I can do, short of wiping my hard drive and reformatting Windows. Could anyone here offer any help or advice?

Fixed. The steps I took were thus:
Uninstalled VS
Uninstalled visual c++ redistributable from 2017, 2016, 2015, 2014, 2013... (x64 and x86)
Went through my computer and permanently deleted everything with the words "visual" and/or "studio"
Uninstalled Xamarin
Reinstalled visual studio
Run cmd as admin
Navigate to directory of visual studio
Type "devenv /Setup" (case-sensitive)
???
Login again (with another outlook account)
Profit

Related

Test Explorer cannot discover any unit tests in VS2019

I have .NET core unit test projects which use xunit package in Visual studio 2019, but I found that the unit tests cannot be discovered in the Test Exporer window, and there is below info in the Output-> Test pane.
I have tried the below workaround (from here) but none of them works
Update the VS2019 to the latest version (my version is 16.8.3)
Delete .vs folder then rebuild
Does anybody have any idea on this?
Microsoft.TestPlatform.VsTestConsole.TranslationLayer.TransationLayerException: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\ServiceHub\Hosts\ServiceHub.Host.CLR.AnyCPU\ServiceHub.TestWindowStoreHost.exe process failed to connect to vstest.console process after 90 seconds. This may occur due to machine slowness, please set environment variable VSTEST_CONNECTION_TIMEOUT to increase timeout.
at Microsoft.TestPlatform.VsTestConsole.TranslationLayer.VsTestConsoleWrapper.WaitForConnection()
at Microsoft.TestPlatform.VsTestConsole.TranslationLayer.VsTestConsoleWrapper.EnsureInitialized()
at Microsoft.TestPlatform.VsTestConsole.TranslationLayer.VsTestConsoleWrapper.InitializeExtensions(IEnumerable`1 pathToAdditionalExtensions)
at Microsoft.VisualStudio.TestWindow.Messaging.RemoteAgent.BaseTestAgentBridge.InitializeExtensionsAsync(IEnumerable`1 extensions)
at Microsoft.VisualStudio.TestWindow.Host.TestPlatformAgentPool.<>c__DisplayClass21_0.<<CreateRemoteAgentAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Utilities.EventPumpExtensions.<>c__DisplayClass4_0`1.<<EnqueueAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Host.TestPlatformProvider.<UpdateRuntimeEnvironmentsAsync>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Extensibility.ILoggerExtensions.<CallWithCatchAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

Cannot publish to azure

I have developed a Django app using Visual Studio Community Edition.
I am unable to deploy it to Azure, getting a temp file containing following exception:
02-07-2018 15:07:22 System.AggregateException: One or more errors
occurred. ---> System.Exception: Build failed. Check the Output window
for more details. --- End of inner exception stack trace --- at
System.Threading.Tasks.Task.ThrowIfExceptional(Boolean
includeTaskCanceledExceptions) at
System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout,
CancellationToken cancellationToken) at
Microsoft.VisualStudio.Web.Publish.PublishService.VsWebProjectPublish.<>c__DisplayClass41_0.b__2()
at System.Threading.Tasks.Task`1.InnerInvoke() at
System.Threading.Tasks.Task.Execute()
--- 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.ApplicationCapabilities.Publish.ViewModel.ProfileSelectorViewModel.d__116.MoveNext()
---> (Inner Exception #0) System.Exception: Build failed. Check the Output window for more details.<---
Sometimes it could be due to network or stop the fiddler if it is running in the background.
Check compiler errors!! Do you have other errors?
When you play code in debug mode, most of the code errors detected at runtime so the code won’t be detected unless it’s run it, when you publish your code for some reason, it check all cshtml for errors before publishing so hidden errors could be detected hence it won’t be published.
I had the same problem and I had CSHTML files which I didn’t need and I didn’t call it in my code, so after deleting these file my code run smoothly.
It’s not a problem with publishing, but you can say you have an unhandled error in your code, an error that appear as run time in debug mode but compiler error when you publish

Unhandled microsoft c++ exception cv exception at memory location

I currently developped a project with VS and OpenCV on my x64 computer and i've a problem with this line:
model->train(image, labels);
image and labels are not empty but i've got this error:
Unhandled exception at at 0x774FC42D in facerec_video.exe: Microsoft C++ exception: cv::Exception at memory location 0x0015EF38.
If i click "continue", program continue and works.
Furthermore, if i set a breakpoint on this line and do a step by step, error message doesn't appear and program works too.
How to resolve this problem ?
Thanks

The eclipse synchronized C/C++ project fails to synchronize

I tried to create synchronized C/C++ project for linux kernel (very big project) with Eclipse kepler, however project synchronization always fails to start between local and remote host (initial files on local host).
I've got the following exception:
An internal error occurred during: "Remote Synchronization". Exception
caught during execution of add command.
However there is no issue if I create synchronized project for small project.
Does any one has an idea what cause this issue?
exception stack trace:
!ENTRY org.eclipse.core.jobs 4 2 2013-12-27 11:12:07.376
!MESSAGE An internal error occurred during: "Remote Synchronization".
!STACK 0
org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of add command
at org.eclipse.jgit.api.AddCommand.call(AddCommand.java:208)
at org.eclipse.ptp.internal.rdt.sync.git.core.GitRemoteSyncConnection.doCommit(GitRemoteSyncConnection.java:577)
at org.eclipse.ptp.internal.rdt.sync.git.core.GitRemoteSyncConnection.buildRepo(GitRemoteSyncConnection.java:242)
at org.eclipse.ptp.internal.rdt.sync.git.core.GitRemoteSyncConnection.<init>(GitRemoteSyncConnection.java:167)
at org.eclipse.ptp.internal.rdt.sync.git.core.GitSyncService.getSyncConnection(GitSyncService.java:211)
at org.eclipse.ptp.internal.rdt.sync.git.core.GitSyncService.getMergeConflictFiles(GitSyncService.java:174)
at org.eclipse.ptp.internal.rdt.sync.git.core.GitSyncService.synchronize(GitSyncService.java:399)
at org.eclipse.ptp.internal.rdt.sync.core.SyncRunner.synchronize(SyncRunner.java:38)
at org.eclipse.ptp.rdt.sync.core.SyncManager$SynchronizeJob.run(SyncManager.java:79)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: org.eclipse.jgit.errors.LockFailedException: Cannot lock /home/oussama/devel/mylinux/.ptp-sync/index
at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:224)
at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:301)
at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:267)
at org.eclipse.jgit.lib.Repository.lockDirCache(Repository.java:1049)
at org.eclipse.jgit.api.AddCommand.call(AddCommand.java:138)
... 9 more
Judging from your stack trace it appears that EGit is choking on an orphaned lock file:
Cannot lock /home/oussama/devel/mylinux/.ptp-sync/index
Look for /home/oussama/devel/mylinus/.ptp-sync/index.lock. If it exists, delete it and try synchronizing again. See also, this Eclipse bug.

Problems running visual studio executables with mono

I'm trying to run with Mono executable files created by visual studio 2010.
Setting in VS 2010 are:
-c++ project
-cil pure
My final target is to compile Parsec benchmarks using visual studio 2010 and then run the executables with mono both in windows and linux.
By now I created a simple c++ project including only a printf.
The executable runs fair with mono under windows, while it gives me back many problems under linux
this is what i get:
** (thread.exe:1424): WARNING **: Missing method .ctor in assembly /home/chezz/Scrivania/thread.exe, type System.Runtime.CompilerServices.FixedAddressValueTypeAttribute
** (thread.exe:1424): WARNING **: Can't find custom attr constructor image: /home/chezz/Scrivania/thread.exe mtoken: 0x0a00000d
Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for <Module> ---> <CrtImplementationDetails>.ModuleLoadException: The C++ module failed to load.
---> System.MissingMethodException: Method not found: 'System.AppDomain.IsDefaultAppDomain'.
at <Module>.<CrtImplementationDetails>.LanguageSupport.Initialize (<CrtImplementationDetails>.LanguageSupport* ) [0x00000]
--- End of inner exception stack trace ---
at <Module>.<CrtImplementationDetails>.ThrowModuleLoadException (System.String errorMessage, System.Exception innerException) [0x00000]
at <Module>.<CrtImplementationDetails>.LanguageSupport.Initialize (<CrtImplementationDetails>.LanguageSupport* ) [0x00000]
at <Module>..cctor () [0x00000]
--- End of inner exception stack trace ---
Any idea?
Thanks
Andrea
My guess is that the code that the Visual C++ compiler generates will use the MSVCRT if you call functions that are in the C Runtime (i.e. non-.NET, like printf). To be able to run on Mono on Linux as well, you should only use the .NET framework classes (for example System.Console.WriteLine for console output instead of printf).
I believe reading Mono-C++ might help you with your issue. Look towards the bottom about C++ support and the problem with running C++ code.