Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 构建不在另一台PC上工作_C#_Visual Studio - Fatal编程技术网

C# 构建不在另一台PC上工作

C# 构建不在另一台PC上工作,c#,visual-studio,C#,Visual Studio,我在Visual Studio 2015中构建我的winforms项目。它在我的笔记本电脑上运行良好,没有错误。当我复制到另一台电脑时,我得到的对象引用没有设置为对象的实例。当我向下滚动异常文本时,它指向笔记本电脑中的目录。这显然不存在于另一台电脑上。我如何才能建立这样可以在另一台电脑上测试 System.NullReferenceException: Object reference not set to an instance of an object. at Maintenance

我在Visual Studio 2015中构建我的winforms项目。它在我的笔记本电脑上运行良好,没有错误。当我复制到另一台电脑时,我得到的对象引用没有设置为对象的实例。当我向下滚动异常文本时,它指向笔记本电脑中的目录。这显然不存在于另一台电脑上。我如何才能建立这样可以在另一台电脑上测试

 System.NullReferenceException: Object reference not set to an instance of an object.
   at Maintenance.RepairList2.GetData() in C:\Users\Jason\Documents\DS\Maintenance\RepairList2.cs:line 179
   Maintenance.RepairList2.RepairList2_Load(Object sender, EventArgs e) in C:\Users\Jason\Documents\DS\Maintenance\RepairList2.cs:line 94
   at System.Windows.Forms.Form.OnLoad(EventArgs e)




  94 void RepairList2_Load(object sender, EventArgs e)
            {
                GetData();
            }




    fgUser.DataSource = _tb;
            //     fgUser.Cols["MemberID"].Visible = false;
  179          fgUser.Cols["..."].AllowSorting = false;
            fgUser.Cols["..."].Width = 45;
            fgUser.Cols["..."].TextAlignFixed = TextAlignEnum.CenterCenter;
            fgUser.AllowFreezing = AllowFreezingEnum.None;
            fgUser.Cols.Frozen = 2;
            fgUser.Cols["RepairID"].Width = 60;

在PC上安装Mysql Odbc Connector会对其进行排序。

文件名不适用于构建版本,只有在引发异常时,才会使用调试符号指出其原始位置。您能在
C:\Users\Jason\Documents\DS\Maintenance\RepairList2.cs:179行显示代码吗?您的代码似乎有问题。然而,我们不能帮助,除非我们有。否则,我们只是盲目猜测。在第94行,我有无效的RepairList2_Load(objectsender,EventArgs e){GetData();}您是否将输出目录的所有DLL复制到了其他计算机上?如果没有,请提供一个更新我原来的帖子。包括第94行和第179行。似乎在使用Mysql的网格上。我要检查一下我是否安装了。另一台电脑上的Mysql接口。