简体   繁体   中英

Serial port communication through vb.net not working on some computers

I recently developed new vb.net application for our commercial product. It is working on some laptops and not working on some. Details about my application are as follows:

Target .net framework = 4 (Tried with 3.5 and combination of both also)

Driver = usbser.sys (Provided by microsoft)

CPU = any CPU

Windows version = XP and later

This application is working on my laptop (x86 CPU and x86 WIN7 OS), another laptop with x64 chipset and x64 WIN7 OS. But it fails on x64 chipset with x86 OS. All of these laptops have .net framework 4 or later. What settings should I do so that my application will work on platforms? Is this the issue with vb.net application or driver installation process?

Please help. My project is stuck up with this issue.

I just resolved a very similar problem, but don't understand why the change mattered. The code in my branch worked perfectly, then I merged it back to trunk and it no longer worked. But the code in question was identical. It turned out that when I merged, the configuration flag flipped from x86 to Any CPU. When the integration server built the installer, it was using Any CPU as well. So installed versions would not work and would fail any time I tried to write data to the serial port. But if I used the local build that was set to x86, it would work fine. Did you try to change to x86 to see what happens?

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