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.

BuildVision fails when VS loads a solution

See original GitHub issue

I’m running a fresh install of VS 2019 Professional version 16.5.4. BuildVision 3.0.0.104 is installed.

On loading a solution while VS starts, I get a popup “The ‘BuildVisionPackage’ package did not correctly. The problem may have been caused by a configuration change or the installation of another extension. You can get more information by examining the file <path hidden>\ActivityLog.xml. Restarting Visual Studio could help to resolve this issue. Continue to show this error message?”

Restarting VS or Windows didn’t help, the error reoccurred. The solution is on .NET Framework 4.6.1.

The log contains the following error:

CreateInstance failed for package [BuildVisionPackage]Source: &apos;mscorlib&apos; Description: Exception has been thrown by the target of an invocation.&#x000D;&#x000A;System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---&gt; System.MissingMethodException: Method not found: &apos;Serilog.LoggerConfiguration Serilog.FileLoggerConfigurationExtensions.File(Serilog.Configuration.LoggerSinkConfiguration, System.String, Serilog.Events.LogEventLevel, System.String, System.IFormatProvider, System.Nullable`1&lt;Int64&gt;, Serilog.Core.LoggingLevelSwitch, Boolean, Boolean, System.Nullable`1&lt;System.TimeSpan&gt;, Serilog.RollingInterval, Boolean, System.Nullable`1&lt;Int32&gt;, System.Text.Encoding)&apos;.&#x000D;&#x000A;   at BuildVision.Common.Logging.LogManager.CreateLogger()&#x000D;&#x000A;   at System.Lazy`1.CreateValue()&#x000D;&#x000A;   at System.Lazy`1.LazyInitValue()&#x000D;&#x000A;   at System.Lazy`1.get_Value()&#x000D;&#x000A;   at BuildVision.Common.Logging.LogManager.ForContext(Type type)&#x000D;&#x000A;   at BuildVision.Common.Logging.LogManager.ForContext[T]()&#x000D;&#x000A;   at BuildVision.Core.BuildVisionPackage..ctor()&#x000D;&#x000A;   --- End of inner exception stack trace ---&#x000D;&#x000A;   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&amp; canBeCached, RuntimeMethodHandleInternal&amp; ctor, Boolean&amp; bNeedSecurityCheck)&#x000D;&#x000A;   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp; stackMark)&#x000D;&#x000A;   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp; stackMark)&#x000D;&#x000A;   at System.Activator.CreateInstance(Type type, Boolean nonPublic)&#x000D;&#x000A;   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark&amp; stackMark)&#x000D;&#x000A;   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)&#x000D;&#x000A;   at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)&#x000D;&#x000A;   at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)System.MissingMethodException: Method not found: &apos;Serilog.LoggerConfiguration Serilog.FileLoggerConfigurationExtensions.File(Serilog.Configuration.LoggerSinkConfiguration, System.String, Serilog.Events.LogEventLevel, System.String, System.IFormatProvider, System.Nullable`1&lt;Int64&gt;, Serilog.Core.LoggingLevelSwitch, Boolean, Boolean, System.Nullable`1&lt;System.TimeSpan&gt;, Serilog.RollingInterval, Boolean, System.Nullable`1&lt;Int32&gt;, System.Text.Encoding)&apos;.&#x000D;&#x000A;   at BuildVision.Common.Logging.LogManager.CreateLogger()&#x000D;&#x000A;   at System.Lazy`1.CreateValue()&#x000D;&#x000A;   at System.Lazy`1.LazyInitValue()&#x000D;&#x000A;   at System.Lazy`1.get_Value()&#x000D;&#x000A;   at BuildVision.Common.Logging.LogManager.ForContext(Type type)&#x000D;&#x000A;   at BuildVision.Common.Logging.LogManager.ForContext[T]()&#x000D;&#x000A;   at BuildVision.Core.BuildVisionPackage..ctor()

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
StefanKertcommented, Aug 11, 2020

Hi folks!

Thanks for the detailed analysis of this issue 😃. This really saved me some time. I just created a .vsix package with a downgraded Serilog version. I am currently not able to reproduce it, so if somebody that is facing this issue could check it I´d greatly appreciate it 😃.

BuildVision_3_0_2_preview.zip

2reactions
thoemmicommented, Aug 11, 2020

I can confirm that GitHub’s version of Serilog.dll ist out-dated.

I’ve run following command in both the user and the application extensions path:

gci serilog.* -Recurse | % { [pscustomobject]@{ Name=(Resolve-Path $_ -Relative); Version=[System.Diagnostics.FileVersionInfo]::GetVersionInfo($_).FileVersion }}

In the user extensions folder Serilog is only used by BuildVision:

Name                                         Version
----                                         -------
.\12klbayc.p2q\Serilog.dll                   2.9.0.0
.\12klbayc.p2q\Serilog.Enrichers.Process.dll 2.0.1.0
.\12klbayc.p2q\Serilog.Enrichers.Thread.dll  3.1.0.0
.\12klbayc.p2q\Serilog.Sinks.File.dll        4.1.0.0

However, in the application extension folder serilog is found in the subfolders of both GitHub and Xamarin:

Name                                          Version
----                                          -------
.\GitHub\GitHub\Serilog.dll                   2.5.0.0
.\GitHub\GitHub\Serilog.Enrichers.Process.dll 2.0.1.0
.\GitHub\GitHub\Serilog.Enrichers.Thread.dll  3.0.0.0
.\GitHub\GitHub\Serilog.Sinks.File.dll        3.2.0.0
.\Xamarin.VisualStudio\hotrestart\Serilog.dll 2.8.0.0
Read more comments on GitHub >

github_iconTop Results From Across the Web

StefanKert/BuildVision: A Visual Studio extension to ...
BuildVision activates when Visual Studio starts the process of building, rebuilding or cleaning projects (solution). BuildVision tool window and Visual Studio ...
Read more >
How can I fix the Microsoft Visual Studio error
EditorPackage' package did not load correctly. The problem may have been caused by a configuration change or by the installation of another ...
Read more >
"Construction of frame content failed." [Build Vision extension]
This issue seems to be caused by the Build Vision extension and not Visual Studio. Please file an issue with that product at...
Read more >
BuildVision
BuildVision activates when Visual Studio starts the process of building, rebuilding or cleaning projects (solution).
Read more >
Visual Studio 2022 Community Project not load solution
Open Developer Command Prompt for VS 2022 Community > type and run devenv /ResetSettings . Right-click VS 2022 and run it as administrator....
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