ViniciusAlberkovics / VSGitAutoFetch

VS Git AutoFetch extension
9 stars 6 forks source link

VS2022 Support (Issue #2) and Thread sleep performance (Issue #1) #3

Closed leprox43 closed 2 years ago

leprox43 commented 2 years ago

VS2022 Support (Issue #2 ) and Thread sleep performance (Issue #1 )

Kevinf63 commented 2 years ago

@Leprox43 and @ViniciusAlberkovics, Not sure if it's just me, and definitely worth reproducing the problem on another machine, but based on Microsoft docs and my experience with this PR/fork erroring out on VS2019:

"If you want to target Visual Studio 2019 or an earlier version [alongside VS2022], you must modify the created project."

"Consider using shared projects to target Visual Studio 2019 and Visual Studio 2022 while sharing most or all the code in your extension."

Microsoft Docs - Target a previous version when creating an extension in Visual Studio 2022

  <entry>
    <record>2898</record>
    <time>2022/03/08 22:37:39.148</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>CreateInstance failed for package [GitAutoFetchPackage]Source: &apos;mscorlib&apos; Description: Could not load file or assembly &apos;Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;System.IO.FileNotFoundException: Could not load file or assembly &apos;Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;File name: &apos;Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos;&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)&#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)&#x000D;&#x000A;&#x000D;&#x000A;WRN: Assembly binding logging is turned OFF.&#x000D;&#x000A;To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.&#x000D;&#x000A;Note: There is some performance penalty associated with assembly bind failure logging.&#x000D;&#x000A;To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].&#x000D;&#x000A;</description>
    <guid>{A0B3344D-E011-4159-8052-C8EED06BC3AB}</guid>
    <hr>80004005 - E_FAIL</hr>
    <errorinfo></errorinfo>
  </entry>

Edit: I'd like to also highlight, greatly appreciate the work done here! 👍