【问题标题】:No application configuration file found in FUSLOGVW.exe logs在 FUSLOGVW.exe 日志中找不到应用程序配置文件
【发布时间】:2016-04-05 23:35:53
【问题描述】:

我正在创建一个 C# .NET 项目,我试图在其中加载安装在 GAC 中的第三方程序集。

但在某些机器上,我收到一条错误消息,指出“无法加载指定版本 7.0.351.0 的程序集”。

当我尝试进行程序集重定向时,它不起作用,它仍然显示相同的错误。

注意: 7.0.351.0 - 编译的版本。

12.0.0.0 - 目标机器中存在的程序集

参考属性 特定版本 -> 错误

别名 -> 全局

复制本地 -> 错误

这是我的示例应用程序配置文件

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" >
            <dependentAssembly>
                <assemblyIdentity
                    name="Act.Framework"
                    publicKeyToken="ebf6b2ff4d0a08aa" />
                <bindingRedirect oldVersion="7.0.351.0" newVersion="12.0.0.0" />
            </dependentAssembly> 
        </assemblyBinding>
    </runtime>
</configuration> 

FUSLOGVW节目记录

“LOG:未找到应用程序配置文件。”

但我已经添加了 App Config 文件。它没有检测到我的配置文件吗?

如何让它检测到?

我添加 App.Config 文件的步骤:

  1. 通过项目向导添加新项目并选择“应用程序配置文件”。

【问题讨论】:

    标签: .net


    【解决方案1】:

    检查包含web.config 的路径。如果您的web.config 文件所在的目录路径包含一个或多个名称中带有“#”的文件夹,Microsoft Fusion 将完全忽略所有assemblyBinding 条目的web.config

    【讨论】:

    • 这让我大吃一惊。布拉德,你有任何引用吗?
    • 难以置信!先生您说的很对! MS 技术糟透了!太愚蠢了,路径中的 # 正在破坏 IIS asp.net 应用程序...
    【解决方案2】:

    尝试在 bindingRedirect 中指定程序集的文化:

    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="Act.Framework"
                                  publicKeyToken="ebf6b2ff4d0a08aa"
                                  culture="neutral" />
                <bindingRedirect oldVersion="7.0.351.0"
                                 newVersion="12.0.0.0" />
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
    

    您还需要验证新版本的程序集是否使用与旧版本完全相同的私钥进行签名。

    就配置文件而言,确认它被称为ABC.exe.config,其中ABC 是您的可执行文件的名称,并且它位于同一文件夹中(当然,如果这是一个 Windows 应用程序,对于 web您需要使用的应用程序web.config)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-09-25
      • 1970-01-01
      • 2023-03-12
      • 1970-01-01
      • 2019-07-11
      • 2020-03-04
      • 1970-01-01
      • 2012-05-18
      相关资源
      最近更新 更多