.NET 4.0 Project不能在Windows XP上运行

Jor*_*orb 6 .net c# wcf .net-4.0

我有一个程序,我在Windows 7 64位计算机上使用Visual Studio 2013进行开发.我有我的项目设置目标框架4.0和我的平台目标为x86.我可以使用它来构建和运行我的64位,以及使用.NET 4.0的Win 7 32位机器,但它不能在XP上运行.

我正在使用BCL Portability Pack和Microsoft Async NuGet包.我已经在XP上安装了.NET 4.0的KB2468871更新.

我还运行了Fusion数据记录器并收到了:

*** Assembly Binder Log Entry  (3/14/2014 @ 9:18:05 AM) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:  c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  U:\All_Access\UserName\iBEdit\iBedit64Forms\bin\Release\IBEdit.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = USER
LOG: DisplayName = IBEdit.resources, Version=1.0.0.0, Culture=en, PublicKeyToken=null
 (Fully-specified)
LOG: Appbase = file:///U:/All_Access/UserName/iBEdit/iBedit64Forms/bin/Release/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = IBEdit.exe
Calling assembly : IBEdit, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: U:\All_Access\UserName\iBEdit\iBedit64Forms\bin\Release\IBEdit.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///U:/All_Access/UserName/iBEdit/iBedit64Forms/bin/Release/en/IBEdit.resources.DLL.
LOG: Attempting download of new URL file:///U:/All_Access/UserName/iBEdit/iBedit64Forms/bin/Release/en/IBEdit.resources/IBEdit.resources.DLL.
LOG: Attempting download of new URL file:///U:/All_Access/UserName/iBEdit/iBedit64Forms/bin/Release/en/IBEdit.resources.EXE.
LOG: Attempting download of new URL file:///U:/All_Access/UserName/iBEdit/iBedit64Forms/bin/Release/en/IBEdit.resources/IBEdit.resources.EXE.
LOG: All probing URLs attempted and failed.
Run Code Online (Sandbox Code Playgroud)

我的项目的"Release"文件夹中没有"en"文件夹.这可能导致问题吗?为什么看那里?

我需要对项目进行其他更改吗?

更新:

没有给出异常,只是消息:"iBEdit遇到了问题,需要关闭"

这是AppConfig代码:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    </startup>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="SpecSrvSoapBinding"/>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://example.com/TCheckWebServices/services/SpecSrv" binding="basicHttpBinding" bindingConfiguration="SpecSrvSoapBinding" contract="DBService.SpecSrv" name="SpecSrv"/>
        </client>
    </system.serviceModel>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
            <bindingRedirect oldVersion="0.0.0.0-2.5.19.0" newVersion="2.5.19.0"/>
        </dependentAssembly>
        <dependentAssembly>
            <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
            <bindingRedirect oldVersion="0.0.0.0-2.5.19.0" newVersion="2.5.19.0"/>
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
</configuration>
Run Code Online (Sandbox Code Playgroud)

更新2:

不是真的成功,但我确信管理层试图开发这个应用程序与XP一起工作是一种浪费,他们应该让我集中精力将我们的机器升级到Windows 7.

G.Y*_*G.Y 3

您尝试从 app.config 加载的某些内容会导致此问题。

也许 app.config 中的某个文件位置在您的 XP 计算机中不存在。

无论如何,这看起来不像.Net 4.0 对 XP 的支持问题。
它看起来像是来自您的代码,而不是来自 .NET“信封”。

很抱歉回答简短,
但如果您不打算显示任何相关的实际代码 - 这是我能做的最好的事情。

更新(查看您的配置后):

---><binding name="SpecSrvSoapBinding"/>我认为这是 XP 机器上加载失败的原因。

要验证这一点 - 从 app.config 中注释这部分,并注释使用该部分的所有代码,然后尝试看看是否再次遇到相同的错误。