Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 共享类仅在VS2008下生成,而不是在MSBuild下生成_C#_Visual Studio 2008_Wcf_Silverlight_Msbuild - Fatal编程技术网

C# 共享类仅在VS2008下生成,而不是在MSBuild下生成

C# 共享类仅在VS2008下生成,而不是在MSBuild下生成,c#,visual-studio-2008,wcf,silverlight,msbuild,C#,Visual Studio 2008,Wcf,Silverlight,Msbuild,我们在silverlight 3.0客户端和服务器之间共享我们的类,正如所描述的那样仅在Visual Studio 2008下一切正常。使用带有以下命令行参数的msbuild: C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe FoobarApplication.sln/t:Rebuild/p:Configuration=Release/p:Platform=“Any CPU” 我们得到以下错误: Class1.cs(28,54): erro

我们在silverlight 3.0客户端和服务器之间共享我们的类,正如所描述的那样仅在Visual Studio 2008下一切正常。使用带有以下命令行参数的msbuild:

C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe FoobarApplication.sln/t:Rebuild/p:Configuration=Release/p:Platform=“Any CPU”

我们得到以下错误:

Class1.cs(28,54): error CS0234: The type or namespace name 'WcfService' does not exist in the namespace 'Company.FoobarApplication' (are you missing an assembly reference?)
Service References\geoServiceReference1\Reference.cs(24,81): error CS0234: The type or namespace name 'WcfService' does not exist in the namespace 'Company.FoobarApplication' (are you missing an assembly reference?)
Done Building Project "C:\work\bov-tmp\FoobarApplication\SilverlightClassLibrary3\SilverlightClassLibrary3.csproj" (Rebuild target(s)) -- FAILED.

Done Building Project "C:\work\bov-tmp\FoobarApplication\FoobarApplication.sln" (Rebuild target(s)) -- FAILED.
我在这里找到的。有4种变通方法,我尝试了其中的前3种,但都没有成功。第四个解决方案不是可接受的解决方案


如何构建解决方案有什么想法吗?

解决了问题。geoServiceReference1项目引用了我们的RUI.Web项目。在解决方案重组后,不知何故出现了那个愚蠢的引用。

解决了问题。geoServiceReference1项目引用了我们的RUI.Web项目。那个愚蠢的引用在解决方案重组后不知何故出现了。