Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 751
Jorb Avatar asked Mar 14 '14 14:03

Jorb


People also ask

Can I install .NET 4.0 on Windows XP?

NET Framework 4 can be installed on Windows XP. Most apps that require the . NET Framework require this version.

What version of net Framework for Windows XP?

NET Framework 3.0 is supported on Windows XP, Server 2003, Vista, Server 2008, and Server 2008 R2.

Can C# run on Windows XP?

Solution 1 On XP the latest supported is 4.0. 3b) If it is not compiled a Visual Studio solution, download and install the necessary Visual Studio Express (on XP the highest supported is 2010). In general Visual Studio 2013 Community Edition will be more than enough - altrough it is targeting XP, does not run on XP.


1 Answers

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.

like image 81
G.Y Avatar answered Oct 17 '22 16:10

G.Y