2011-11-11 69 views
1

(从来就更新了标题,以反映我的新发现)Team Foundation Server的2010 - 构建配置没有为项目

我刚刚移植了一堆项目从TFS2008到TFS2010和已经运行到(实际上是几个:))问题与一个特定的项目。使用构建配置“调试”编译时,一切都按预期工作。然而,当使用构建配置'Release'进行编译时,由于al.exe无法在'obj \ debug'中找到指定的文件,所以我得到一个链接器错误。

错误:

Task "AL" (TaskId:781) 
... 
ALINK : error AL1047: Error importing file 'c:\Builds\23\...\obj\Debug\someproject.exe' -- The system cannot find the file specified. [C:\Builds\23\...\Release\Sources\...\someproject.csproj] 
    The command exited with code 1. (TaskId:781) 
Done executing task "AL" -- FAILED. (TaskId:781) 

我使团队建设信息诊断日志,发现以下变量:

IntermediateOutputPath = obj\Debug\ 

我的问题是,为什么会链接看在Debug文件夹,当我在发布配置下构建。我检查了解决方案和项目配置,并且在发布解决方案配置下没有“调试”配置。任何想法,为什么发生这种情况,以及如何解决它?

在此先感谢。

!!奖金信息

我在项目文件中有以下声明失败,确保如果生成配置未指定,它将被设置为调试。

<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 

我试图改变它发布为默认,现在我的团队调试构建失败,在OBJ \发布指向代替。所以在编译项目时,似乎没有指定构建配置。怎么会这样?

回答

1

发现问题。我必须为someproject.csproj项目文件中定义的发布目标明确地设置构建配置。我插入了'Configuration = Release'行'

<MSBuild ToolsVersion="3.5" Projects="$(SolutionRoot)\...someproject.csproj" 
      Properties="RunCodeAnalysis=false; 
          Configuration=Release; 
          ClrVersion=2.0.50727.0; 
      ApplicationVersion=$(VersionNumber); 
      UpdateUrl=$(DevtestUpdateUrl); 
      InstallUrl=$(DevtestInstallUrl); 
      IsWebBootstrapper=true; 
      PublishDir=$(DropLocation)\$(BuildNumber)\Publish\Update\; 
      SolutionDir=$(SolutionRoot)\Kl******\; 
      DeploymentConfiguration=devtest; 
      SignManifests=true; 
         ManifestCertificateThumbprint=23...23;" 
      Targets="PublishOnly" /> 
相关问题