在Visual Studio Professional 2019中,如何更改通用扩展目录?

jjjwad0x  于 2023-11-21  发布在  其他
关注(0)|答案(1)|浏览(170)

我正在将Visual Studio 2019的安装从G:\迁移到L:.

<entry>
<record>675</record>
<time>2023/10/30 14:36:16.637</time>
<type>Error</type>
<source>VisualStudio</source>
<description>CreateInstance failed for package [UnityPackage]Source: &apos;mscorlib&apos; Description: Could not load file or assembly &apos;file:///g:\program files (x86)\microsoft visual studio\2019\professional\common7\ide\extensions\microsoft\visual studio tools for unity\SyntaxTree.VisualStudio.Unity.dll&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;file:///g:\program files (x86)\microsoft visual studio\2019\professional\common7\ide\extensions\microsoft\visual studio tools for unity\SyntaxTree.VisualStudio.Unity.dll&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;File name: &apos;
file:///g:\program files (x86)\microsoft visual studio\2019\professional\common7\ide\extensions\microsoft\visual studio tools for unity\SyntaxTree.VisualStudio.Unity.dll&apos;&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark&amp; stackMark)&#x000D;&#x000A;   at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence)&#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>{B6546C9C-E5FE-4095-8D39-C080D9BD6A85}</guid>
<hr>80004005 - E_FAIL</hr>
<errorinfo></errorinfo>

我不想重新安装所有的东西。我试图找到一个更简单的方法。我希望这可能只是一个类似文本的文件的变化。我正在转储'G'驱动器。

cidc1ykv

cidc1ykv1#

对我来说,真正的答案是确保VS已关闭。1){Windows-10}使用右键单击Windows图标。单击“磁盘管理”。2)将我的“G”驱动器号更改为“W”。3)将我的“L”驱动器号更改为“G”。
因此,有效地使'L'驱动器的'G'驱动器.然后我已经混淆了注册表项目的'L'驱动器和搞砸了我的'缓存'.所有的损害,我在上面的评论做了我必须纠正.我改变了所有的引用回到'G'在注册表,和任何人谁发现这个.“请忽略这一部分.".真的,唯一的事情任何人发现这将不得不做的可能是上述'删除管理'步骤.所以我不得不删除文件夹:\Users{User}\AppData\Local\Microsoft\VisualStudio\16.0_xxx在我的案例中是“16.0_5672de2b”。然后当我重新启动VS时,它说它必须重新启动以进行“首次使用”。.但后来加载正常。包括上面失败的“Unity”项目。

相关问题