Visual Studio 2013 高 DPI 解决方法导致调试器失败

2024-03-23

类似这个问题4k 屏幕上的 Visual Studio 2013 高 DPI https://stackoverflow.com/questions/30295785/visual-studio-2013-high-dpi-on-4k-screen/37313068我已经发布了一个答案,但自从发现下面的问题后现已删除。

我也刚刚购买了一台新的 4K 笔记本电脑,并且在 SSIS 包设计器的显示和 VS2013 中的对话框以及 SSMS 中的对话框等方面遇到了高 DPI 问题。

我找到的 SSMS 解决方法是启用位图缩放并在与 ssms.exe 相同的文件夹中创建一个清单文件 - ssms.exe.manifest。

本文介绍如何修复 SSMS 的此问题

http://www.sqlservercentral.com/blogs/spaghettidba/2015/10/14/ssms-in-high-dpi-displays-how-to-stop-the-madness/ http://www.sqlservercentral.com/blogs/spaghettidba/2015/10/14/ssms-in-high-dpi-displays-how-to-stop-the-madness/

为了完整起见,我重复了本文中描述的过程。

设置此注册表项:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide]
"PreferExternalManifest"=dword:00000001

然后将此 xml 粘贴到清单文件中。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">

<dependency>
  <dependentAssembly>
    <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*">
    </assemblyIdentity>
  </dependentAssembly>
</dependency>

<dependency>
  <dependentAssembly>
    <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="amd64" publicKeyToken="1fc8b3b9a1e18e3b">
    </assemblyIdentity>
  </dependentAssembly>
</dependency>

<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
  <security>
    <requestedPrivileges>
      <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
    </requestedPrivileges>
  </security>
</trustInfo>

<asmv3:application>
  <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
    <ms_windowsSettings:dpiAware xmlns:ms_windowsSettings="http://schemas.microsoft.com/SMI/2005/WindowsSettings">false</ms_windowsSettings:dpiAware>
  </asmv3:windowsSettings>
</asmv3:application>

</assembly>

现在这对于 SSMS 来说效果很好(到目前为止),所以我尝试将此修复应用于 VS2013。虽然它确实修复了 SSIS 设计器显示问题,但在尝试启动调试器时会导致问题。此外,这还会影响其他项目类型的调试 - C#、VB 以及 SSIS 项目。

我猜测清单中的依赖项不完整或不准确,因为0x80040155是COM接口未注册的错误代码。

Unable to start debugging.

An error occurred that usually indicates a corrupt installation (code 0x80040155). If the problem persists, repair your Visual Studio installation via 'Add or Remove Programs' in Control Panel. (Microsoft Visual Studio Debugger)

Unable to start debugging.
The debugger is not properly installed.
Run setup to install or repair the debugger. (Microsoft.DataTransformationServices.VsIntegration)

------------------------------
Program Location:

   at Microsoft.DataTransformationServices.Project.DataTransformationsPackageDebugger.LaunchVsDebugger(IVsDebugger iVsDebugger, DataTransformationsProjectConfigurationOptions options)
   at Microsoft.DataTransformationServices.Project.DataTransformationsPackageDebugger.ValidateAndRunDebugger(Int32 flags, IOutputWindow outputWindow, DataTransformationsProjectConfigurationOptions options)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, ProjectItem startupProjItem, DataTransformationsProjectConfigurationOptions options)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchActivePackage(Int32 launchOptions)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.Launch(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options)

===================================

所以我的问题是任何人都可以建议一个适合 VS2013 的清单(或者使 SSIS 设计器表现出行为的另一种方式)吗?


好的,所以我绝对地不知道我在做什么。

但是,在与 devenv.exe 相同的文件夹 (C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE) 中,还有几个其他清单文件,其中一个用于 DebuggerProxy.dll.manifest。由于这是一个调试器问题,并且似乎缺少对调试器的引用,因此我将内容合并到 devenv.exe.manifest 文件中并提出了这个,这对我有用:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">

<dependency>
  <dependentAssembly>
    <assemblyIdentity
      type="win32"
      name="Microsoft.Windows.Common-Controls"
      version="6.0.0.0" processorArchitecture="*"
      publicKeyToken="6595b64144ccf1df"
      language="*">
    </assemblyIdentity>
  </dependentAssembly>
</dependency>

<dependency>
  <dependentAssembly>
    <assemblyIdentity
      type="win32"
      name="Microsoft.VC90.CRT"
      version="9.0.21022.8"
      processorArchitecture="amd64"
      publicKeyToken="1fc8b3b9a1e18e3b">
    </assemblyIdentity>
  </dependentAssembly>
</dependency>

<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
  <security>
    <requestedPrivileges>
      <requestedExecutionLevel
        level="asInvoker"
        uiAccess="false"/>
    </requestedPrivileges>
  </security>
</trustInfo>

<asmv3:application>
  <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
    <ms_windowsSettings:dpiAware xmlns:ms_windowsSettings="http://schemas.microsoft.com/SMI/2005/WindowsSettings">false</ms_windowsSettings:dpiAware>
  </asmv3:windowsSettings>
</asmv3:application>
<file name="debuggerproxy.dll">
    <comClass clsid="{C5621364-87CC-4731-8947-929CAE75323E}" threadingModel="Both"/>
</file>
  <comInterfaceExternalProxyStub name="CausalityInternal_IAD7ALCausalityEventBridge" iid="{F6A124D7-5BB7-47B2-A9AF-AAB0EEAB60E3}" numMethods="5" proxyStubClsid32="{C5621364-87CC-4731-8947-929CAE75323E}"/>
  <comInterfaceExternalProxyStub name="CausalityInternal_ISDMCausalityEventCallback" iid="{74D108F1-1FD2-4699-991E-C4BAD52E773D}" numMethods="4" proxyStubClsid32="{C5621364-87CC-4731-8947-929CAE75323E}"/>
... many more entries ...
</assembly>

不幸的是,一篇文章的字符数有 30k 的限制,它不适合,所以我在我的一个驱动器中粘贴了该文件的副本here https://1drv.ms/u/s!AkGwImgERl9h_G81mbNVmTwpHRek.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Visual Studio 2013 高 DPI 解决方法导致调试器失败 的相关文章

随机推荐