4
如何參考GAC中最新的Microsoft.Build
從.fsx
?在F#Interactive中引用最新的Microsoft.Build GAC程序集?
當我做#r "Microsoft.Build"
我總是得到版本4.0.0
,但我想要12.0.0
加載。
#r "Microsoft.Build"
open Microsoft.Build.Evaluation
printfn "%s" typeof<ProjectCollection>.Assembly.Location
這將幫助我solve this issue。
編輯#1:
做一個完全合格的組件名稱並沒有爲我工作:
編輯#2:
我需要最新的這可能是不同的不同的系統。我希望這會起作用。 :(
#I @"C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Build\v4.0_14.0.0.0__b03f5f7f11d50a3a"
#I @"C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Build\v4.0_12.0.0.0__b03f5f7f11d50a3a"
#r "Microsoft.Build"
open Microsoft.Build.Evaluation
printfn "%s" typeof<ProjectCollection>.Assembly.Location
好消息是,它現在是開源的,因爲沒有這個工程,我想,我目前正在建設一個岔路口。我可能會SourceLink.MSBuild
重命名爲。避免衝突
我已經試過了,但它並沒有爲我工作。我附上了上面的截圖。 –
@CameronTaggart你說得對。顯然你必須提供實際文件的路徑。上面的例子。 – phoog
這確實可以在帶有msbuild 12的系統上工作,但是帶有msbuild 14的系統呢?參見編輯#2。我不認爲這是可能的。 –