两台机器之间的运行时代码差异 [英] Runtime Code difference between two machines

查看:60
本文介绍了两台机器之间的运行时代码差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,我在visual studio 2008 pro中开发了高达3.5的框架。在我的项目中,我正在计算一个数学表达式,结果为17,当我将应用程序移动到Windows 2003服务器并运行它时,我得到的值为15.这让我感到困惑,如何解决。

项目计算机规格
dell xps i7
windows 7
visual visual 2008 pro

部署计算机规格
windows 2003 r3 sp1

所有ref都设置为复制local = true并且我已将ref'ed dll移动到部署计算机上的应用程序文件夹

代码如下所示



Dim SlotNum =(( CInt (_ Message.GetByName( " SCH.11.3" )。Substring(8).Substring( 0,2))* 4)+ CInt (_ Message.GetByName( " SCH.11.3" ).Substring(8).Substring(2,2)\ 15)) - 23


是_message是一个xmldoc

解决方案

将你的等式op分成几部分并将每个部分记录到一个日志文件中以查看哪一个是差异的原因,另一件你可以看到的是两台计算机是否设置了相同的区域选项,特别是如果你使用double.parse你可以得到差异取决于区域设置和的含义,和。字符点。


I have a project that i have developed in visual studio 2008 pro on frameworks up to 3.5. In my project I am calculating a mathematical expression which results in 17 and when i move the app to a windows 2003 server and run it i get a value of 15. It has left me baffled as to how to solve.

project computer specs
dell xps i7
windows 7
visual studio 2008 pro

deployment computer specs
windows 2003 r3 sp1

all ref are set to copy local = true and i have moved the ref'ed dll's to the app's folder on the deployment computer

Code looks like so

 

Dim SlotNum = ((CInt(_Message.GetByName("SCH.11.3").Substring(8).Substring(0, 2)) * 4) + CInt(_Message.GetByName("SCH.11.3").Substring(8).Substring(2, 2) \ 15)) - 23

were _message is an xmldoc

解决方案

Split your equation op in parts and log every part to a log file to see which one is the cause of the difference, another thing you could look at is if both computers have set the same regional options especially if you are using double.parse you can get differences depending on locale and the meaning of the , and . characters.


这篇关于两台机器之间的运行时代码差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆