【问题标题】:Visual Studio 2010 Beta 2 myTODO Error messageVisual Studio 2010 Beta 2 myTODO 错误消息
【发布时间】:2010-01-06 11:39:32
【问题描述】:

我已经下载了myTODO Azure 示例应用程序,当尝试在本地运行它时,我收到以下非常令人费解的错误消息。

The item "..\MyTodo.WebUx\MyTodo.WebUx.csproj" in item list 
"ProjectReferenceWithConfiguration" does not define a value for metadata "Configuration".  
In order to use this metadata, either qualify it by specifying %(ProjectReferenceWithConfiguration.Configuration), 
or ensure that all items in this list define a value for this metadata. 
C:\Program Files (x86)\MSBuild\Microsoft\Cloud Service\1.0\Visual Studio 10.0\Microsoft.CloudService.targets

以下是 MyToDo.WebUX.csproj 文件的摘录,我要更改什么?

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>

【问题讨论】:

    标签: visual-studio-2010 azure


    【解决方案1】:

    我今天遇到了一个问题,MSBuild 给了我一个几乎相同的错误:

    The item "xxx.csproj" in item list "ProjectReferenceWithConfiguration" does not define a value for metadata "Name".
    

    幸运的是,我有另一个可以正确编译的 Azure 服务,因此我能够找出差异。事实证明,在有效的解决方案中,MyService.ccproj(Azure 服务项目)正在编译 before xxx.csproj。在失败的解决方案中,xxx.csproj 首先编译。当我指定了 xxx.csprojMyService.ccproj 之后编译的依赖项时,它就开始工作了。

    我不确定这里到底发生了什么,或者它是关于xxx.csproj 的原因,所以它必须紧随其后。如果我弄清楚了,我会更新,但也许这会对你有所帮助。

    更新:如果您指定除了 Azure 角色项目之外的任何内容作为对服务项目的依赖项,Azure 似乎不喜欢它。我做到了,所以MyWebRole.csproj 依赖于xxx.csproj,而不是MyService.ccproj 依赖于xxx.csproj,并且它起作用了。

    【讨论】:

      【解决方案2】:

      要让 Web 项目进行转换,请从元素中删除以下内容:“{603c0e0b-db56-11dc-be95-000d561079b0};”

      虽然该示例已过时...您可以使用它来查看测试项目,但要获得该项目大部分代码的最新 vs2008 版本,请尝试将源下载到此实验室: DeployingApplicationsinWindowsAzure

      源链接位于右上角。如果您查看第 3 个练习的最终文件夹,您会发现该项目的更新版本……但是我认为没有完整的解决方案,因此您必须将其与您链接的解决方案进行比较到上面。

      ...我自己没有比较这些项目,所以我不知道实验室版本和代码库版本之间缺少什么。

      【讨论】:

      • 谢谢,项目现在转换但收到 AppDomainUnloadedException。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-04-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多