我正在嘗試將我在Microsoft Azure中承載的Web服務添加到腳本#項目中,並且我遇到了一些問題。將Web服務引用添加到腳本#項目
目前我正在儘可能地做到這一點,所以我正在使用腳本#> jQuery腳本庫項目,只有自動生成的代碼。如果我用鼠標右鍵單擊該解決方案>添加服務引用>高級...>添加Web引用,然後編譯我得到的不兼容錯誤的一個重要的量:
Error 1 The type or namespace name 'GeneratedCodeAttributeAttribute' does not exist in the namespace 'System.CodeDom.Compiler' (are you missing an assembly reference?) C:\Users\Axel\Documents\Visual Studio 2012\Projects\ScriptSharpEmAirTest\ScriptSharpEmAirTest\Properties\Settings.Designer.cs 15 38 ScriptSharpEmAirTest
Error 2 The type 'System.CodeDom.Compiler.GeneratedCodeAttribute' exists in both 'c:\Users\Axel\Documents\Visual Studio 2012\Projects\ScriptSharpEmAirTest\packages\ScriptSharp.0.7.5.1\tools\mscorlib.dll' and 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll' C:\Users\Axel\Documents\Visual Studio 2012\Projects\ScriptSharpEmAirTest\ScriptSharpEmAirTest\Properties\Settings.Designer.cs 15 38 ScriptSharpEmAirTest
Error 3 The type or namespace name 'GeneratedCodeAttributeAttribute' does not exist in the namespace 'System.CodeDom.Compiler' (are you missing an assembly reference?) C:\Users\Axel\Documents\Visual Studio 2012\Projects\ScriptSharpEmAirTest\ScriptSharpEmAirTest\Web References\net.azurewebsites.emair\Reference.cs 26 30 ScriptSharpEmAirTest
Error 4 The type 'System.CodeDom.Compiler.GeneratedCodeAttribute' exists in both 'c:\Users\Axel\Documents\Visual Studio 2012\Projects\ScriptSharpEmAirTest\packages\ScriptSharp.0.7.5.1\tools\mscorlib.dll' and 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll' C:\Users\Axel\Documents\Visual Studio 2012\Projects\ScriptSharpEmAirTest\ScriptSharpEmAirTest\Web References\net.azurewebsites.emair\Reference.cs 26 30 ScriptSharpEmAirTest
Error 5 The type or namespace name 'DebuggerStepThroughAttributeAttribute' does not exist in the namespace 'System.Diagnostics' (are you missing an assembly reference?) C:\Users\Axel\Documents\Visual Studio 2012\Projects\ScriptSharpEmAirTest\ScriptSharpEmAirTest\Web References\net.azurewebsites.emair\Reference.cs 27 25 ScriptSharpEmAirTest
Error 6 The type or namespace name 'DebuggerStepThroughAttribute' does not exist in the namespace 'System.Diagnostics' (are you missing an assembly reference?) C:\Users\Axel\Documents\Visual Studio 2012\Projects\ScriptSharpEmAirTest\ScriptSharpEmAirTest\Web References\net.azurewebsites.emair\Reference.cs 27 25 ScriptSharpEmAirTest
Error 7 The type or namespace name 'DebuggerNonUserCodeAttributeAttribute' does not exist in the namespace 'System.Diagnostics' (are you missing an assembly reference?) C:\Users\Axel\Documents\Visual Studio 2012\Projects\ScriptSharpEmAirTest\ScriptSharpEmAirTest\Properties\Settings.Designer.cs 27 37 ScriptSharpEmAirTest
Error 8 The type or namespace name 'DebuggerNonUserCodeAttribute' does not exist in the namespace 'System.Diagnostics' (are you missing an assembly reference?) C:\Users\Axel\Documents\Visual Studio 2012\Projects\ScriptSharpEmAirTest\ScriptSharpEmAirTest\Properties\Settings.Designer.cs 27 37 ScriptSharpEmAirTest
Error 9 The type or namespace name 'SendOrPostCallback' does not exist in the namespace 'System.Threading' (are you missing an assembly reference?) C:\Users\Axel\Documents\Visual Studio 2012\Projects\ScriptSharpEmAirTest\ScriptSharpEmAirTest\Web References\net.azurewebsites.emair\Reference.cs 33 34 ScriptSharpEmAirTest
Error 10 The type or namespace name 'SendOrPostCallback' does not exist in the namespace 'System.Threading' (are you missing an assembly reference?) C:\Users\Axel\Documents\Visual Studio 2012\Projects\ScriptSharpEmAirTest\ScriptSharpEmAirTest\Web References\net.azurewebsites.emair\Reference.cs 35 34 ScriptSharpEmAirTest
Error 11 The type or namespace name 'SendOrPostCallback' does not exist in the namespace 'System.Threading' (are you missing an assembly reference?) C:\Users\Axel\Documents\Visual Studio 2012\Projects\ScriptSharpEmAirTest\ScriptSharpEmAirTest\Web References\net.azurewebsites.emair\Reference.cs 37 34 ScriptSharpEmAirTest
Error 12 The type or namespace name 'SendOrPostCallback' does not exist in the namespace 'System.Threading' (are you missing an assembly reference?) C:\Users\Axel\Documents\Visual Studio 2012\Projects\ScriptSharpEmAirTest\ScriptSharpEmAirTest\Web References\net.azurewebsites.emair\Reference.cs 39 34 ScriptSharpEmAirTest
(實際上有這樣的錯誤158)
很明顯,在添加web引用之前進行編譯可以順利進行,並且具有相同web引用的控制檯項目看不到任何問題。
您可以將web參考添加到scripsharp項目嗎?有沒有特定的程序要遵循?
這是不可能的,腳本#只支持.net框架的最小子集。 – LunicLynx
有沒有像這樣的官方聲明,這是不可能的?也許NikhilK發表評論? – Axel