无法加载类型; process_dpi_awareness'从汇编' windowsbase,版本= 4.0.0.0,
我已经使用此清单文件添加了该应用程序的DPI意识:
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
</windowsSettings>
</application>
它主要工作,但是在客户端机器之一上抛出了:
Could not load type 'PROCESS_DPI_AWARENESS' from assembly 'WindowsBase, Version=4.0.0.0,
在我的代码process_dpi_awareness
中未使用变量。 System.WindowsBase
被添加为我的项目的依赖。
我使用以下几个窗口在几个窗口上使用DPI:
var dpi = VisualTreeHelper.GetDpi(this);
您可以暗示如何解决此问题吗?
I have added DPI awareness for the app using this manifest file:
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
</windowsSettings>
</application>
It works mostly but on one of the client machines exception is thrown:
Could not load type 'PROCESS_DPI_AWARENESS' from assembly 'WindowsBase, Version=4.0.0.0,
In my code PROCESS_DPI_AWARENESS
variable is not used. System.WindowsBase
is added as dependancy to my project.
I use DPI on several windows using this:
var dpi = VisualTreeHelper.GetDpi(this);
Could you hint how to resolve this issue ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论