在Naudio擺弄時,我發現了this的代碼。我編譯它:類型或命名空間名稱'Linq'不存在
csc.exe /reference:Naudio.dll play.cs
,並得到錯誤:
play.cs(3,14): error CS0234: The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)
CSC的版本是:C:\ WINDOWS \ Microsoft.NET \框架\ V2.0.50727 \ CSC.EXE
在搜索它時,我發現一個線程說我需要添加System.core
引用,但是執行如下操作:/reference:System.core.dll
或/reference:System.core
不能解決問題。
使用.NET 3.5或.NET 4.0的編譯器,代碼將按原樣編譯。 –