我正在尝试将我在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