代码之家  ›  专栏  ›  技术社区  ›  Vasyl Boroviak

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

  •  0
  • Vasyl Boroviak  · 技术社区  · 16 年前

    我们在silverlight3.0客户机和服务器之间共享我们的类 here . 将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.
    

    我发现 exactly the same question 在这里。有4种解决方法 there

    有没有想过如何构建解决方案?

    1 回复  |  直到 9 年前
        1
  •  0
  •   Vasyl Boroviak    15 年前

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