复制配置文件时出现生成后事件错误

本文关键字:事件 错误 配置文件 复制 | 更新日期: 2023-09-27 18:32:11

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

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)

我做错了什么?

复制配置文件时出现生成后事件错误

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