Click here to Skip to main content
15,879,095 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi All,
A bit of a follow up to yesterdays mess of a question.
I am working on a Win11 PC with VS 2022 trying to build a program that makes use of the serial port on a Win 10 PC. If I use a version of the code that is built in VS2008 (.NET 2...) The code as an Exe will run!
So I made the mods to the working version of the program once it had been upgraded by 2022 and ran it on the PC it was built on. Build the Exe take to the Win10 box, get a Blue banner telling me to contact the disturber of the software for a version that is compatible. Much confusion I am the 'distributor' and I have no idea what has broken!
My one guess is it runs in debug mode but not in executable mode maybe the debug build doesn't include or get to the bit that causes it to bomb out.

What I have tried:

Tried using VS2022 to create a simple C# application which has a button and text box. Built this in 2022 took it to Win10 and it worked!

using System.IO.Ports;
to test application to see if was the serial ports or access that was causing issues. It wasn't working fine.
PIEBALDconsult 13-Dec-23 10:57am    
Then don't repost, use the Improve Question button.
glennPattonWork3 13-Dec-23 13:30pm    
Richard MacCutchan 13-Dec-23 11:19am    
We still need more details. What is the exact text of the error message, and where in the code does it occur?
glennPattonWork3 13-Dec-23 13:32pm    
If you remember the blue screen of death, it's the same blue bar middle of the screen never seen it before and I have seen most error messages
Maciej Los 30-Dec-23 12:28pm    

1 solution

There are a few things that are missing here. When you say you've rebuilt the app, am I correct in assuming that you have updated the version of .NET that you are using? Similarly, how are you distributing the application?

Have you checked event viewer to see what's being written out here?

Ultimately, my suspicion is that you are going to find that this is a dependencies issue. To investigate these, I normally use Dependency Walker (depends.exe)[^].
Share this answer
glennPattonWork3 12-Jan-24 8:32am    
Sorry meant to close this, running two or three things at once this got overlooked.
Pete O'Hanlon 12-Jan-24 8:37am    
No need to apologies. I saw that it hadn't been answered and thought "better late than never".

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900