erlandranvinge / ReAttach

The ReAttach Visual Studio Extension
117 stars 36 forks source link

VS2015 Ent UPD3 icons invisible in 2 #11

Closed tonyliving closed 7 years ago

tonyliving commented 7 years ago

VS2015 can not load ReAttach and the icons is invisible. Here is the error log CreateInstance failed for package [ReAttachPackage]Source: 'mscorlib' Description: 未能加载文件或程序集“file:///C:\Users\Administrator\AppData\Local\Microsoft\VisualStudio\14.0\Extensions\kz20b5m3.xdu\ReAttach.dll”或它的某一个依赖项。系统找不到指定的文件。 System.IO.FileNotFoundException: 未能加载文件或程序集“file:///C:\Users\Administrator\AppData\Local\Microsoft\VisualStudio\14.0\Extensions\kz20b5m3.xdu\ReAttach.dll”或它的某一个依赖项。系统找不到指定的文件。 文件名:“file:///C:\Users\Administrator\AppData\Local\Microsoft\VisualStudio\14.0\Extensions\kz20b5m3.xdu\ReAttach.dll” 在 System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 在 System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 在 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 在 System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) 在 System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence) 在 System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo) 在 System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName) 警告: 程序集绑定日志记录被关闭。 要启用程序集绑定失败日志记录,请将注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD)设置为 1。 注意: 会有一些与程序集绑定失败日志记录关联的性能损失。 要关闭此功能,请移除注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog]。

ToddRopog commented 7 years ago

I believe I'm experiencing the same issue. It started today. This morning when I launched VS2015, I got the following message:

The 'ReAttachPackage' package did not load correctly. The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file 'C:\Users\tropog\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml'.

I've been using the extension for months and haven't had a problem. I didn't install or update anything yesterday, and I don't see anything in the update logs, for yesterday or today, that I can find. Maybe MS stealth updated something. After I uninstalled and reinstalled the extension, the above error stopped happening on startup, but the ReAttach menu is missing and can't be activated.

I'm attaching my ActivityLog.xml (renamed to .txt) ActivityLog.txt

arsuceno commented 7 years ago

Same problem here with VS 2015 U3, I cannot see the ReAttach menu.

erlandranvinge commented 7 years ago

Hi guys. This has something to do with the actual distribution of the plugin, please try to actually download the vsix file from the site and install it "manually" instead of installing the extension from within Visual Studio.

arsuceno commented 7 years ago

Hi @erlandranvinge . It didn't work for me at the beggining, but suddenly, about 5 hours after the installation, the icon appeared. I don't know exactly why, but it seems to work now. Does it make some sense for you?

Btw, really thanks for the plugin.

erlandranvinge commented 7 years ago

Hi, thanks.

Given the log file provided, it seems to be unable to load one more more dependent assemblies. This makes sense and would likely cause the behaviour your describing. However, which particular file that is missing is not specified in the logs provided. If it happens again, it would help a lot if you could enable the fuselog, see https://msdn.microsoft.com/en-us/library/e74a18c4(v=vs.110).aspx and help me figure out which dependency that is missing from your machine. Most likely I need to ship one or two more DLL:s with the extension and/or mark them as required or something.

ToddRopog commented 7 years ago

Okay, I disabled a couple of other extensions and the menu button came back. Then I re-enabled those extensions and the button was still there. At that point it seemed to be working fine.

Then I tried disabling the ReAttach extension. Even though Visual Studio said the extension was disabled, the menu button was still there and the extension still worked. I restarted VS, but nothing changed. Then I disabled a different extension and the ReAttach button went away. Then I re-enabled ReAttach, but it didn't come back. Then I enabled or disabled another extension and it came back. So it seems like something in the process of enabling or disabling ReAttach is not quite doing everything it needs to do. Enabling or disabling a different extension seems to straighten everything out. I also noticed that after enabling or disabling ReAttach, I don't get the message saying VS must be restarted. However, I did restart it between each change, just to be sure.

erlandranvinge commented 7 years ago

Now the issues seemed to have been resolved. Please try installing v2.2 of ReAttach. It should work regardless if you're using VS2012, VS2015 or VS2017. If you're having trouble uninstalling the old ReAttach, please use the command provided by @codeowl1: vsixinstaller /u:0ee94538-22b7-40c8-a253-3fce8ad39b6f