1

I try to create a dll from all of my classes with VS command prompt but all classes using externall dll's won't do.

The program uses some dlls from OpenGl that I stored in the bin folder and it works fine while running the program

But I get error CS0246, namespace could not be found, missing directive when I try to create a dll from all those classes.

The line I use is:

csc /target:library /out:Engine.DLL *

All System namespace are found but all external dlls are not.

Do I need to add a path to the external dlls in VS environment?

4

1 回答 1

1

您当然需要为您的外部程序集使用/reference(或)编译器选项(是来自 msdn 的官方文档):/r

csc /target:library /r:Assembly1.dll;Assembly2.dll out/Engine.DLL *

/lib如果您的外部程序集位于不同的文件夹中并且您不想使用/r完整路径(例如/r:../test/folder/subfolder/Assembly1.dll) ,那么 /lib 也可能很有用

于 2013-10-27T12:25:06.640 回答