ViniciusAlberkovics / VSGitAutoFetch

VS Git AutoFetch extension
9 stars 6 forks source link

Backwards Compatibility with Visual Studio 2019 #4

Closed Kevinf63 closed 2 years ago

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! 👍

Originally posted by @Kevinf63 in https://github.com/ViniciusAlberkovics/VSGitAutoFetch/issues/3#issuecomment-1062335101

leprox43 commented 2 years ago

@Kevinf63 i'm working on it Probably my fault setting up extension manifest

Kevinf63 commented 2 years ago

Thanks @Leprox43! Appreciate this, I simply wasn't expecting your previous PR to get merged last night, so I'd make sure to left click three dot options + "reference new issue" my comment on #3.

leprox43 commented 2 years ago

Fixed in PR #5

ViniciusAlberkovics commented 2 years ago

https://github.com/ViniciusAlberkovics/VSGitAutoFetch/issues/4#issuecomment-1070814550