2012-04-24 58 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

對我來說,源配置文件不存在(我有自定義生成配置文件)。一旦我從另一個已知好的配置文件複製配置文件,併爲我的環境修改它,一切都開始工作。