简体   繁体   中英

.NET 4.0 Project will not run on Windows xp

I have a program that I am developing using Visual Studio 2013 on a Windows 7 64 bit machine. I have my project setup to target Framework 4.0 and my platform target as x86. I can get it to build and run on my 64 bit, and on a Win 7 32 bit machine with .NET 4.0, but it will not run on XP.

I am using the BCL Portability Pack and Microsoft Async NuGet packages. I have already installed the KB2468871 update for .NET 4.0 on XP.

I have also run the Fusion data logger and received this:

*** 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.

There is no "en" folder in my project's "Release" folder. Could that be causing issues? Why is it looking there?

Are there any other changes I need to make to my project?

Update:

There is no Exception given, just the message: "iBEdit has encountered a problem and needs to close"

Here is the AppConfig code:

<?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>

Update 2:

Not really a success, but I have convinced management that trying to develop this app to work with XP is a waste and they should let me focus my efforts on upgrading our machines to Windows 7.

Something you attempting to load from your app.config is causing this.

Perhaps a file location in the app.config which does not exist in your XP machine.

Anyway, This does not look like .Net 4.0 support for XP issue.
It looks like it is coming from your code - and not from the .NET "envelope".

Sorry for the short answer,
But if you ain't going to show any related actual code - this is the best I can do.

Update (after seeing your config):

---> <binding name="SpecSrvSoapBinding"/> I think that this is what failing to load on the XP machine.

To validate on that - remark this part from the app.config and remark all the code that use that and than try and see if you get the same error again.

Do you try to compile localized in english(en)? I found similar error in this question,hope can help u, How can I modify my C# project file so that Resources.resx is compiled into the satellite assembly for my UICulture?

Your problem is MVS cannot find the localized resource for en .

LOG: DisplayName = IBEdit.resources, Version=1.0.0.0, Culture= en , PublicKeyToken=null (Fully-specified)

Change Culture = en to Culture= neutral if possible. Sorry if I misleading you.

Old

Do you have the four mentioned download URL files at other place of your windows? Put those file under your release folder as it mentioned and see what happened? It seem like cannot download those EXEs and DLLs for executing?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM