.NET 4.7

编程入门 行业动态 更新时间:2024-10-26 18:16:48
本文介绍了.NET 4.7 - System.Data.Resource的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好,

我们开始看到一个问题,即我们的应用程序无法加载System.Data.zh-Hant.resources&安装了.NET 4.7的中文Windows 7操作系统上的System.Data.zh-Hans.resources。如果我们卸载.Net 4.7并安装4.6.1,那么就像魅力一样。我们确实看到非英语语言在GAC_MSIL中安装了更多东西,其中包括System.Data.resource文件。我们看到我们的堆栈跟踪正在GAC中的这些文件中加载资源文件,如果我们使用像ilspy这样的东西,它就会存在。我们目前正在调查其他语言,看看它是否仅仅是Hant和Hans的一个问题,还是进一步延伸。

We are beginning to see an issue where our application is failing to load the System.Data.zh-Hant.resources & System.Data.zh-Hans.resources on a Chinese Windows 7 operating system with .NET 4.7 installed. If we uninstall .Net 4.7 and install 4.6.1 it works like a charm. We do see with non-English languages there are more things installed into the GAC_MSIL which includes the System.Data.resource file. We see that our stack trace is getting to these files in the GAC to load the resource file which looks to exist if we use something like ilspy. We are currently investigating other languages to see if it is just an issue with Hant and Hans or if it extends further.

还有其他人跑过进入这个问题?我们可以对代码应用哪些修补程序?

Has anyone else ran into this issue? Are their any fixes that we can apply to our code?

从我们的日志中加载文件: INFO [ 07/19 11:04:23.60] - 已加载程序集:C:\Program Files(x86)\<我们目录的路径> \ System.Data.SQLite.dll INFO  ; [07/19 11:04:23.60] - 已加载程序集:C:\ Windows \ Microsoft.Net \assembly \ GAC_32 \ System.Transactions \v4.0_4.0.0.0__b77a5c561934e089 \ System.Transactions .dll INFO [07/19 11:04:23.71] - 已加载程序集:C:\ Windows \ Microsoft \\ net\assembly \ GAC_32 \ System.EnterpriseServices \ v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll INFO [07/19 11:04:23.78] - 已加载程序集:C:\ Windows \ Microsoft \\ .Net \\ \\assembly\GAC_MSIL\System.Data.resour ces\v4.0_4.0.0.0_zh-Hant_b77a5c561934e089\System.Data.resources.dll INFO [07/19 11:04:23.78] - 无法解析资源:系统.Data.zh-Hant.resources 堆栈追踪:

Loaded files from our logs: INFO [07/19 11:04:23.60] - Loaded assembly: C:\Program Files (x86)\<Path to our Directory>\System.Data.SQLite.dll INFO [07/19 11:04:23.60] - Loaded assembly: C:\Windows\Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll INFO [07/19 11:04:23.71] - Loaded assembly: C:\Windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll INFO [07/19 11:04:23.78] - Loaded assembly: C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.resources\v4.0_4.0.0.0_zh-Hant_b77a5c561934e089\System.Data.resources.dll INFO[07/19 11:04:23.78] - Failed to resolve resource: System.Data.zh-Hant.resources Stack trace:

在System.RuntimeMethodHandle.InvokeMethod(Object target,Object []参数,Signature sig,Boolean constructor) 于System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,Object [] parameters,Object [] arguments) 在System.Delegate.DynamicInvokeImpl(Object [] args) 于< OurApplication.Window> .BeginInvokeProxy。<> c__DisplayClass15_0。< BeginInvokeSafely> b__0() ---内部例外状况堆叠追踪的结尾--- 在System.RuntimeMethodHandle.InvokeMethod(Object target,Object []参数,Signature sig,Boolean constructor) 于System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,Object [] parameters,Object [] arguments) 在System.Delegate.DynamicInvokeImpl(Object [] args) 于System.Windows.Threading.ExceptionWrapper.InternalRealCall(委托回调,Object args,Int32 numArgs) 于System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source,Delegate callback,Object args,Int32 numArgs,Delegate catchHandler)

於 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 於 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 於 System.Delegate.DynamicInvokeImpl(Object[] args) 於 <OurApplication.Window>.BeginInvokeProxy.<>c__DisplayClass15_0.<BeginInvokeSafely>b__0() --- 內部例外狀況堆疊追蹤的結尾 --- 於 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 於 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 於 System.Delegate.DynamicInvokeImpl(Object[] args) 於 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) 於 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

感谢您提前抽出时间!

推荐答案

经过进一步检查后,我们注意到了一些差异。

After further inspection, we noticed a few differences.

1..NET 4.6.1没有将任何System.Data.Resource文件夹安装到GAC_MSIL中。(4.7英文也没有安装该文件夹)

1. .NET 4.6.1 doesn't install any System.Data.Resource folder into the GAC_MSIL. (4.7 English doesn't install the folder as well)

2.用.NET 4.6启动我们的应用程序.1不会尝试加载任何System.Data.Resources.dll

2. Launching our application with .NET 4.6.1 doesn't try loading any System.Data.Resources.dll

3.使用.NET 4.7启动我们的应用程序并删除位于的 ; C:\ Windows \ Microsoft.Net\assembly\GAC_MSIL \ System.Data.resources \v4.0_4.0.0.0_zh-Hant_b77a5c561934e089 \ System.Data.resources.dll。不抛我们的应用程序错误和w ork就像.Net 4.6.1。

3. Launching our application with .NET 4.7 and having removed the System.Data.Resource.dll located atC:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.resources\v4.0_4.0.0.0_zh-Hant_b77a5c561934e089\System.Data.resources.dll. Does not throw the error to our application and work just like .Net 4.6.1.

4.我们能够确认为所有国际版本的.NET 4.7创建了目录System.Data.resources但问题没有适用于所有语言。例如,德语工作,我们仍然从GAC加载文件。我们已将问题缩小到zh-Hant和zh-Hans版本。

4. We were able to confirm that the directory System.Data.resources is created for all international versions of .NET 4.7 but issue doesn't occur for all languages. For example, German works and we still load up the file from the GAC. We have narrowed the issue down to just the zh-Hant and zh-Hans versions.

所以下一个问题是......应该在GAC中安装该资源文件吗?这是.NET 4.7安装中可能存在的错误吗?

So next question is... should that resource file be installed in the GAC? Is this a possible bug in .NET 4.7 installation?

更多推荐

.NET 4.7

本文发布于:2023-11-07 14:57:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1566756.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:NET

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!