PostBuildEvent错误复制配置文件

时间:2012-04-24 18:15:54

标签: c# .net

我正在尝试构建我的项目并收到此错误:

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>

错误指向此行:

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

我做错了什么?

1 个答案:

答案 0 :(得分:1)

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