Visual Studio - 无法复制文件“obj\Debug\[file].exe";因为没有找到 [英] Visual Studio - Could not copy the file "obj\Debug\[file].exe" because it was not found
问题描述
所以,我正在尝试构建一个我刚刚安装了 Visual Studio 的项目来构建这个特定项目(它在 vb6 中,所以我需要使用 Visual Basic 工具扩展,因为我安装了 Visual Studio 2015).我没有这方面的编程知识,只有网络.
So, I'm trying to build a project I just installed Visual Studio to build this specific project (it is in vb6 so I needed to use the Visual Basic tools extension because i had Visual Studio 2015 installed). I have no programming knowledge on this area, only web.
当我尝试构建它时,它给了我这个错误:
And when I try to build it it gives me this error:
------ 构建开始:项目:Proyecto1,配置:调试 x86 ------
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(3812,5):错误 MSB3030:无法复制文件obj\Debug\Proyecto1.exe"因为没有找到.完成构建项目Proyecto1.vb6proj"——失败.
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(3812,5): error MSB3030: Could not copy the file "obj\Debug\Proyecto1.exe" because it was not found. Done building project "Proyecto1.vb6proj" -- FAILED.
构建失败.
然后我点击错误并将我发送到那段代码
Then I click on the error and it send me to that piece of code
<!-- Copy the build product (.dll or .exe). -->
<Copy
SourceFiles="@(IntermediateAssembly)"
DestinationFolder="$(OutDir)"
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
Retries="$(CopyRetryCount)"
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
Condition="'$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)' != 'true'">
<Output TaskParameter="DestinationFiles" ItemName="MainAssembly"/>
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
</Copy>
<Message Importance="High" Text="$(MSBuildProjectName) -> @(MainAssembly->'%(FullPath)')" Condition="'$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)'!='true'" />
我已经看到了有关此问题的现有问题,但解决方案对我不起作用.
I already saw the existent questions for this problem and the solutions didn't worked for me.
推荐答案
就我而言,就像@Hans 说这是我的 Antivirus 错误 (Avast) 我禁用它以测试是否是问题,删除 bin 并进行调试文件夹并重新打开解决方案,它运行良好.
In my case it was like @Hans says it was my Antivirus fault (Avast) I disabled it to test if that was the problem, deleted the bin and debug folders and re-opened the solution and it worked perfectly.
PD请记住将您的解决方案文件夹添加到您的防病毒排除项中.
P.D. Remember to add you solution folder to your antivirus exclusions.
这篇关于Visual Studio - 无法复制文件“obj\Debug\[file].exe";因为没有找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!