2012-04-24 69 views
1

我想建立我的项目,收到此错误:PostBuildEvent错误复制配置文件

Error 148 The command "copy "C:\Users\agordon\Documents\Visual Studio 2008\Projects\SubversionRepository\Internal Application\eFormsSystem\eFormsApp\Debug.config" "C:\Users\agordon\Documents\Visual Studio 2008\Projects\SubversionRepository\Internal Application\eFormsSystem\eFormsApp\bin\Debug\eFormsApp.exe.config" 
copy "C:\Users\agordon\Documents\Visual Studio 2008\Projects\SubversionRepository\Internal Application\eFormsSystem\eFormsApp\Debug.config" "C:\Users\agordon\Documents\Visual Studio 2008\Projects\SubversionRepository\Internal Application\eFormsSystem\eFormsApp\App.config"" exited with code 1. C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets 3397 13 eFormsApp 

这里是这个复制过程中,编译器生成的代码:

<Target 
     Name="PostBuildEvent" 
     Condition= 
     " 
      '$(PostBuildEvent)'!='' 
      and 
      (
       '$(RunPostBuildEvent)'!='OnOutputUpdated' 
       or 
       '$(_AssemblyTimestampBeforeCompile)'!='$(_AssemblyTimestampAfterCompile)' 
      ) 
     " 
     DependsOnTargets="$(PostBuildEventDependsOn)"> 

      <Exec WorkingDirectory="$(OutDir)" Command="$(PostBuildEvent)" /> 

    </Target> 

错误指向该line:

<Exec WorkingDirectory="$(OutDir)" Command="$(PostBuildEvent) 

我在做什么错?

+0

当您手动执行'copy'命令时会发生什么? – 2012-04-24 18:24:01

+0

我试过它在命令提示符下,没有问题,只是问我是否想覆盖文件,我说是的 – 2012-04-24 18:25:40

+0

我忘了提这个解决方案存储在一个存储库中 – 2012-04-24 18:37:38

回答

1

对我来说,源配置文件不存在(我有自定义生成配置文件)。一旦我从另一个已知好的配置文件复制配置文件,并为我的环境修改它,一切都开始工作。