Question .NET 3.5, Build on Windows 10, Debug on Windows XP

MrPresident

New member
Joined
Sep 30, 2017
Messages
2
Programming Experience
5-10
Hi all,

The build environment is VS2017 on 10 Pro x64

These variants all work on the build machine:

x64 UWP .NET 4.5+
x64 .NET 3.5+
x86 .NET 3.5+

.NET 3.0 fails only because I have some lazy Linq, and 2.0 is not going to work.

The test environment is Windows XP Pro x86 (clean VM with .NET 3.5).

YourApp was built targeting .NET 3.5 and x86

Windows 10: YourApp is working.
Windows XP Prompt: "YourApp has encountered a problem and needs to close."
Windows XP System Information: [Type] ".NET 2.0 Error Reporting" [Details] "Faulting application YourApp; faulting module kernell32.dll; version 5.1.2600; debug ? 0; ..."

The frameworks installed on XP are .NET 2.0 SP1, .NET 3.0 SP1, .NET 3.5 - I am certain .NET 2.0 cannot (and should not) run this app.

YourApp_x86_.NET3.5 log messages (in exception handlers) are not being hit. I do get a startup log message showing System.Environment.Version:

Windows 10: .NET 2.0.50727.8794
Windows XP: .NET 2.0.50727.1433

I cannot find a remote debugger to connect VS2017 to .NET 2.0~3.5/XP. How do I start to go about fixing this? Please share tips, thoughts, and even old memories!
 
Last edited:
Ahhh....

Only 5 hours of life lost.

int[] a;

Windows 10: a.length is 0
Windows XP: a.length is an internal exception

All works now! Does this mean my app will run on mono(mac/*nix) as well?

Darn it... does anyone know how to get a Windows 10S VM? I have tested deployment as UWP/APPX on 10Pro with .NET4.7, so I expect the app to be fine on 10S, but this experience shows I can overlook small things. I have a feeling that writes to the Event Viewer will be blocked on 10S so debugging could be challenging :/
 
Last edited:
Back
Top Bottom