我正在试图编译Audacity 2.0.0,并收到以下错误。我对C/C++是新的,所以我不确定如何排除它。我正在使用VS2010专业版SP1。
错误449错误MSB4023:无法计算项元数据“%(扩展名)”。项目元数据“%(扩展名)”不能应用于路径“C:\ audacity-src-2.0.0\win\Debug\audacity.vcxproj\analyze.ny”。路径中有非法字符。C:\audacity-src-2.0.0\win\ny.targets 65 6大胆
这是我的ny.targets文件。我做了一些谷歌搜索,但到目前为止没有结果。

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <PropertyPageSchema
      Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
    <AvailableItemName
      Include="copy">
      <Targets>_copy</Targets>
    </AvailableItemName>
  </ItemGroup>
  <UsingTask
    TaskName="copy"
    TaskFactory="XamlTaskFactory"
    AssemblyName="Microsoft.Build.Tasks.v4.0">
    <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
  </UsingTask>
  <Target
    Name="_copy"
    BeforeTargets="$(copyBeforeTargets)"
    AfterTargets="$(copyAfterTargets)"
    Condition="'@(copy)' != ''"
    DependsOnTargets="$(copyDependsOn);ComputecopyOutput"
    Outputs="@(copy-&gt;'%(Outputs)')"
    Inputs="@(copy);%(copy.AdditionalDependencies);$(MSBuildProjectFile)">
    <ItemGroup
      Condition="'@(SelectedFiles)' != ''">
      <copy
        Remove="@(copy)"
        Condition="'%(Identity)' != '@(SelectedFiles)'" />
    </ItemGroup>
    <ItemGroup>
      <copy_tlog
        Include="%(copy.Outputs)"
        Condition="'%(copy.Outputs)' != '' and '%(copy.ExcludedFromBuild)' != 'true'">
        <Source>@(copy, '|')</Source>
      </copy_tlog>
    </ItemGroup>
    <Message
      Importance="High"
      Text="%(copy.ExecutionDescription)" />
    <WriteLinesToFile
      Condition="'@(copy_tlog)' != '' and '%(copy_tlog.ExcludedFromBuild)' != 'true'"
      File="$(IntDir)$(ProjectName).write.1.tlog"
      Lines="^%(copy_tlog.Source);@(copy_tlog-&gt;'%(Fullpath)')" />
    <copy
      Condition="'@(copy)' != '' and '%(copy.ExcludedFromBuild)' != 'true'"
      CommandLineTemplate="%(copy.CommandLineTemplate)"
      OutputName="%(copy.OutputName)"
      AdditionalOptions="%(copy.AdditionalOptions)"
      Inputs="@(copy)" />
  </Target>
  <PropertyGroup>
    <ComputeLinkInputsTargets>
      $(ComputeLinkInputsTargets);
      ComputecopyOutput;
    </ComputeLinkInputsTargets>
    <ComputeLibInputsTargets>
      $(ComputeLibInputsTargets);
      ComputecopyOutput;
    </ComputeLibInputsTargets>
  </PropertyGroup>
  <Target
    Name="ComputecopyOutput"
    Condition="'@(copy)' != ''">
    <ItemGroup>
      <copyDirsToMake
        Condition="'@(copy)' != '' and '%(copy.ExcludedFromBuild)' != 'true'"
        Include="%(copy.Outputs)" />
      <Link
        Include="%(copyDirsToMake.Identity)"
        Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
      <Lib
        Include="%(copyDirsToMake.Identity)"
        Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
      <ImpLib
        Include="%(copyDirsToMake.Identity)"
        Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
    </ItemGroup>
    <MakeDir
      Directories="@(copyDirsToMake-&gt;'%(RootDir)%(Directory)')" />
  </Target>
</Project>

最佳答案

请注意,你的问题是由引号引起的。
转弯:

""C:\audacity-src-2.0.0\win\Debug\Audacity.vcxproj\analyze.ny""

进入
"C:\audacity-src-2.0.0\win\Debug\Audacity.vcxproj\analyze.ny"

如何做到这一点将取决于输入的传递方式。

07-24 09:21