F#聲明的命名空間在c#項目中不可用,或者通過對象瀏覽器可見。F#聲明的命名空間在c#項目中不可用或通過對象瀏覽器可見
我已經建立了一個正常的F#庫項目,但即使在我構建項目並將其引用到C#項目後,我無法訪問所需的名稱空間。
我也無法在對象瀏覽器中看到它,我得到一個錯誤,告訴我它還沒有建成。我在9月發佈的版本可以有人指出我的錯誤?
F#版本1.9.6.0
(6)編輯:引用的DLL直接有固定我的問題,引用該項目允許我編譯但intellisence不起作用。當直接引用dll時,intellisence完美工作。
這在.FS中發現的代碼文件
#light
namespace Soilsiu.Core
module public Process =
open System.Xml.Linq
let private xname (tag:string) = XName.Get(tag)
let private tagUrl (tag:XElement) = let attribute = tag.Attribute(xname "href")
attribute.Value
let Bookmarks(xmlFile:string) =
let xml = XDocument.Load(xmlFile)
xml.Elements <| xname "A" |> Seq.map(tagUrl)
let PrintBookmarks (xmlFile:string) =
let list = Bookmarks(xmlFile)
list |> Seq.iter(fun u -> printfn "%s" u)
(5)編輯:可能ReSharper的4.0是什麼問題? (4)編輯:當我說對象瀏覽器無法讀取生成的程序集時,我的意思是當我嘗試在對象瀏覽器中打開程序集時,我得到一個錯誤,告訴我該項目尚未構建。再次我可以閱讀使用反射器的組件。
(3)編輯:反射器可以反彙編DLL,但對象瀏覽器無法讀取它。
(2)編輯:我曾提升F#版本1.9.6.2還是一樣的結果
(1)編輯:我是能夠拆卸的dll到C#我得到:(一切都顯得在這裏很好)
namespace Soilsiu.Core
{
[CompilationMapping(7)]
public static class Crawler
[CompilationMapping(7)]
public static class Process
}
[CompilationMapping(7)]
public static class Process
{
// Methods
static Process();
public static IEnumerable<string> Bookmarks(string xmlFile);
public static void PrintBookmarks(string xmlFile);
internal static string tagUrl(XElement tag);
internal static XName xname(string tag);
// Nested Types
[Serializable]
internal class [email protected] : FastFunc<XElement, string>
{
// Methods
public [email protected]();
public override string Invoke(XElement [email protected]);
}
[Serializable]
internal class [email protected] : FastFunc<string, Unit>
{
// Methods
public [email protected]();
public override Unit Invoke(string u);
}
}
您是否重建過C#項目的f#項目? – 2008-10-19 20:14:57
重建所有。有一個文件引用修復它(是標記的答案)?這仍然是一個錯誤,你應該報告它。 – MichaelGG 2008-10-20 20:17:46