Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/336.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#示例代码_C#_Windows_Dll_Command Line_Leap Motion - Fatal编程技术网

在命令行中运行C#示例代码

在命令行中运行C#示例代码,c#,windows,dll,command-line,leap-motion,C#,Windows,Dll,Command Line,Leap Motion,这里有一个新问题:我正在尝试运行这个示例c#代码,用于跳跃运动 运行样本 要运行示例应用程序,请执行以下操作: 编译示例应用程序:在Windows上,确保sample.cs 并且LeapCSharp.NET3.5.dll或LeapCSharp.NET4.0.dll在 当前目录。在命令行提示符下运行以下命令 (使用适用于.NET framework的适当库参考) 使用):csc/reference:LeapCSharp.NET4.0.dll/platform:x86/target:exe Samp

这里有一个新问题:我正在尝试运行这个示例c#代码,用于跳跃运动

运行样本

要运行示例应用程序,请执行以下操作:

编译示例应用程序:在Windows上,确保sample.cs 并且LeapCSharp.NET3.5.dll或LeapCSharp.NET4.0.dll在 当前目录。在命令行提示符下运行以下命令 (使用适用于.NET framework的适当库参考) 使用):csc/reference:LeapCSharp.NET4.0.dll/platform:x86/target:exe Sample.cs注意:使用相应版本的
csc
编译器 NET框架的一部分

如何确定我拥有的.NET框架

如何确保Sample.cs和LeapCSharp.NET3.5.dll或LeapCSharp.NET4.0.dll位于当前目录中?这仅仅意味着把这个文件夹放在我的CD上,对吗?然后执行:

csc /reference:LeapCSharp.NET4.0.dll /platform:x86 /target:exe
Sample.cs

有人能翻译这一行中的每一段的实际意思吗

在命令行中,键入
dir
以查看当前目录中的内容。如果存在
sample.cs
和相应的
.DLL
,则应将您设置为go

要查看.NET的版本,只需在Visual Studio命令提示符中键入
clrver
。仅供参考,如果您看到版本2.0,在本例中实际上是3.5(.NET 3.5实际上在2.0编译器上编译,而4.0则完全不同)

以及命令的详细信息:

csc         // C Sharp Compiler
/reference  // Reference a DLL not in the GAC
/platform   // Compile for 32bit or 64bit?
/target     // Producing a DLL or EXE?
Sample.cs   // File to actually compile

您应该能够在“程序”部分的“控制面板”中看到列出的.NET版本。