question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is running VisualFSharpFull still supported? Several errors when running it after clean build.

See original GitHub issue

It’s been over a year that I tried this, but, at least for me, it doesn’t work out of the box. Before I’m going to try to debug what’s going on, let me first ask the simple question: is running / debugging from VisualFSharpFull in the VisualFSharp.sln still supported?

Repro steps

  1. Checkout latest main
  2. Ensure clean (git clean -xdf)
  3. Run build.cmd
  4. Open VisualFSharp.sln
  5. Select Release, then Build
  6. Click Debug -> Run (or <kbd>Ctrl</kbd>+<kbd>F5</kbd>)
  7. Wait until new Visual Studio opens
  8. Select any existing F# project

Expected behavior

It should “just work”.

Actual behavior

Receiving a couple of those:

image

And after clicking each away, it shows this on top, clicking Reload projects has no effect:

image

Known workarounds

I’d like to hear them!

Related information

  • Latest Visual Studio 2022 (do I need the latest preview perhaps?)
  • Windows 11
  • Available locally: latest preview dotnet SDK

Also tried:

  • As administrator and without
  • With an existing F# 6.0 project
  • Without any project and trying to create a new once: Console F#

Each of the above leads to load errors.

Log

The Activity Log shows a bunch of warnings like this:

The term ‘ProjSelected’ for the UI context 5d0ad025-3bf2-4260-bdb9-8e320ffa4b1e is not referenced in the expression ‘( (AspNetCore & TargetsDotNetCore) | (AzureFunctions & TargetsDotNetCore) | (CSharp & CrossPlatformExecutable & !WindowsForms & !WPF) | (VB & CrossPlatformExecutable & !WindowsForms & !WPF) | (CSharp & WebProject) | (VB & WebProject) ) & SolutionExistsAndNotBuildingAndNotDebugging & !WebAssembly’. This term will be ignored.

This:

Request for “Microsoft.VisualStudio.Shell.Internal.SettingsManager (1.0)” from Process denied because the service is only exposed RemoteExclusiveClient, LiveShareGuest. Request for proxy to “Microsoft.VisualStudio.Shell.Internal.SettingsManager (1.0)” is declined: ServiceAudienceMismatch.

This:

About to block on async service creation because the service was requested via GetService. This has the potential to deadlock. Async initializing services should be retrieved via GetServiceAsync.

Errors on IntelliCode and FSharp.Editor.dll:

Still unable to load MEF component DLL: Could not load file or assembly ‘Microsoft.VisualStudio.VC.RecommendationProvider, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified. C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\EXTENSIONS\Microsoft\IntelliCode\IntelliCodeCpp.dll Still unable to load MEF component DLL: Could not load file or assembly ‘Microsoft.CodeAnalysis.Workspaces, Version=4.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified. c:\users\abel\appdata\local\microsoft\visualstudio\17.0_99cd9cf1roslyndev\extensions\microsoft.visualfsharptools\visual f# tools\42.42.42.4242424\FSharp.Editor.dll

And this big one, suggesting there’s an assembly load error with LanguageServices for F#:

CreateInstance failed for package [FSharpPackage]Source: ‘mscorlib’ Description: Could not load file or assembly ‘Microsoft.VisualStudio.LanguageServices, Version=4.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified. System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.VisualStudio.LanguageServices, Version=4.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified. File name: ‘Microsoft.VisualStudio.LanguageServices, Version=4.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type) at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) at System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark) at System.Activator.CreateInstance(String assemblyName, String typeName) at System.AppDomain.CreateInstance(String assemblyName, String typeName) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

The VS load log shows many of the following errors repeated (probably once for each project in the solution I’m trying to open):

=====================
8/17/2022 12:15:47
LimitedFunctionality
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   at Microsoft.VisualStudio.Shell.Interop.IVsTaskBody.DoWork(IVsTask pTask, UInt32 dwCount, IVsTask[] pParentTasks, Object& pResult)
   at Microsoft.VisualStudio.Services.VsTask.<>c__DisplayClass86_0.<GetCallbackForMultipleParent>b__0(Task`1[] _)
   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.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)
   at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)
   at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.CPS.CPSProjectFactory.<CreateProjectContextAsync>d__8.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.ProjectSystem.LanguageServices.WorkspaceProjectContextProvider.<CreateProjectContextHandlingFaultAsync>d__7.MoveNext()

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
abelbraaksmacommented, Oct 22, 2022

Yeah, works for me again as well. From time to time, it appears I need to update the dotnet SDK and/or the CLR or something, which makes sense, I guess. Not sure that was the cause here, but either way, all’s well that ends well 😃.

0reactions
vzarytovskiicommented, Sep 26, 2022

Both VisualFSharpFull and VisualFSharpDebug work for me in the latest 17.4

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warnings during build-from-VisualStudio · Issue #4541
We get lots of warnings and errors from a build of ... For the first issue you'll need to re-run build.cmd vs ,...
Read more >
Visual Studio displaying errors even if projects build
Even though the project will build successfully, there will remain errors in the error list.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found