<small id='AUNmC'></small><noframes id='AUNmC'>

      <bdo id='AUNmC'></bdo><ul id='AUNmC'></ul>
      1. <tfoot id='AUNmC'></tfoot>
        <i id='AUNmC'><tr id='AUNmC'><dt id='AUNmC'><q id='AUNmC'><span id='AUNmC'><b id='AUNmC'><form id='AUNmC'><ins id='AUNmC'></ins><ul id='AUNmC'></ul><sub id='AUNmC'></sub></form><legend id='AUNmC'></legend><bdo id='AUNmC'><pre id='AUNmC'><center id='AUNmC'></center></pre></bdo></b><th id='AUNmC'></th></span></q></dt></tr></i><div id='AUNmC'><tfoot id='AUNmC'></tfoot><dl id='AUNmC'><fieldset id='AUNmC'></fieldset></dl></div>
      2. <legend id='AUNmC'><style id='AUNmC'><dir id='AUNmC'><q id='AUNmC'></q></dir></style></legend>

      3. 通过命令行编译c#代码时如何使用引用

        How to use references when compiling c# code via command line(通过命令行编译c#代码时如何使用引用)

                <bdo id='j1Kri'></bdo><ul id='j1Kri'></ul>

                  <tbody id='j1Kri'></tbody>
                <i id='j1Kri'><tr id='j1Kri'><dt id='j1Kri'><q id='j1Kri'><span id='j1Kri'><b id='j1Kri'><form id='j1Kri'><ins id='j1Kri'></ins><ul id='j1Kri'></ul><sub id='j1Kri'></sub></form><legend id='j1Kri'></legend><bdo id='j1Kri'><pre id='j1Kri'><center id='j1Kri'></center></pre></bdo></b><th id='j1Kri'></th></span></q></dt></tr></i><div id='j1Kri'><tfoot id='j1Kri'></tfoot><dl id='j1Kri'><fieldset id='j1Kri'></fieldset></dl></div>
              • <tfoot id='j1Kri'></tfoot>

                <small id='j1Kri'></small><noframes id='j1Kri'>

                <legend id='j1Kri'><style id='j1Kri'><dir id='j1Kri'><q id='j1Kri'></q></dir></style></legend>

                • 本文介绍了通过命令行编译c#代码时如何使用引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  谁能帮我通过命令行编译一些 c# 文件?我有 4 个文件要编译,Main、Form1(使用 2.cs 文件)和项目中使用的另一个类.

                  Could anyone help me compile via command line some c# files? I have 4 files to compile, Main, Form1 (which uses 2.cs file) and another class used in the project.

                  我想在命令行中编译这个项目,这样我就可以添加/t:library 开关(就像在本教程中一样:http://dotnetslackers.com/articles/csharp/WritingAnActiveXControlInCSharp.aspx).

                  I would like to compile this project in command line so I could add the /t:library switch (like in this tutorial: http://dotnetslackers.com/articles/csharp/WritingAnActiveXControlInCSharp.aspx).

                  但是,在使用csc/t:library Program1.cs MainForm.cs MainForm.Designer.cs EigenObjectRecognizer.cs"后,我得到了缺少程序集引用的错误,例如:

                  However after using "csc /t:library Program1.cs MainForm.cs MainForm.Designer.cs EigenObjectRecognizer.cs" I get missing assembly reference errros such as these:

                  ProjectFaceRecProOVaspVerFaceRecProOVMainForm.cs(14,15): error CS0234: The type or namespace name 'Structure' does not exist
                      in the namespace 'Emgu.CV' (are you missing an assembly reference?)
                  

                  我确实安装了 EMGU 二进制文件.我认为我需要使用该文件夹中的一些 .dll,例如 EMGU.CV.dll?

                  I do have installed EMGU binaries installed. I would think I need to use some .dll's from that folder like EMGU.CV.dll?

                  推荐答案

                  要在命令行上引用库,您需要使用 /r: 编译器选项并将相对路径传递给库.假设它在同一目录中,您可以执行以下操作

                  To reference a library on the command line you need to use the /r: compiler option and pass the relative path to the library. Assuming it's in the same directory you can do the following

                  csc/r:EMGU.CV.dll/t:library Program1.cs MainForm.cs MainForm.Designer.cs EigenObjectRecognizer.cs

                  csc /r:EMGU.CV.dll /t:library Program1.cs MainForm.cs MainForm.Designer.cs EigenObjectRecognizer.cs

                  文档:http://msdn.microsoft.com/en-us/library/yabyz3h4.通过指定 /? 可以直接从命令行获得简短版本的文档:C:WindowsMicrosoft.NETFrameworkv4.0.30319csc/?

                  Documentation: http://msdn.microsoft.com/en-us/library/yabyz3h4. Short version of documentation available directly from command line by specifying /?: C:WindowsMicrosoft.NETFrameworkv4.0.30319csc /?

                  这篇关于通过命令行编译c#代码时如何使用引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Populate ListBox with a IEnumrable on another thread (winforms)(在另一个线程(winforms)上使用 IEnumrable 填充 ListBox)
                  listbox selected item give me quot; System.Data.DataRowViewquot; , C# winforms(列表框选择的项目给我quot;System.Data.DataRowView, C# Winforms)
                  Cannot remove items from ListBox(无法从列表框中删除项目)
                  Preventing ListBox scrolling to top when updated(更新时防止列表框滚动到顶部)
                  Drag and drop from list to canvas on windows phone with MVVM(使用 MVVM 在 Windows 手机上从列表拖放到画布)
                  Deselection on a WPF listbox with extended selection mode(具有扩展选择模式的 WPF 列表框上的取消选择)

                  <small id='dXQto'></small><noframes id='dXQto'>

                  1. <legend id='dXQto'><style id='dXQto'><dir id='dXQto'><q id='dXQto'></q></dir></style></legend>

                  2. <tfoot id='dXQto'></tfoot>

                            <tbody id='dXQto'></tbody>

                          • <bdo id='dXQto'></bdo><ul id='dXQto'></ul>
                            <i id='dXQto'><tr id='dXQto'><dt id='dXQto'><q id='dXQto'><span id='dXQto'><b id='dXQto'><form id='dXQto'><ins id='dXQto'></ins><ul id='dXQto'></ul><sub id='dXQto'></sub></form><legend id='dXQto'></legend><bdo id='dXQto'><pre id='dXQto'><center id='dXQto'></center></pre></bdo></b><th id='dXQto'></th></span></q></dt></tr></i><div id='dXQto'><tfoot id='dXQto'></tfoot><dl id='dXQto'><fieldset id='dXQto'></fieldset></dl></div>