Asp.net 错误 ;MSB3030&x9;无法复制文件";C:\Users\…\WebApi3\obj\Debug\netcoreapp3.0\WebApi3.exe“;因为没有找到
大家好,我的社区 我正在尝试根据项目“应用程序”属性,使用以下方法构建目标框架为.NET Core 3.0的Web和WebAPI控制台应用程序: 微软Visual Studio社区2019 Windows 10 PRO上的16.5.4版 我看到以下错误: 错误MSB3030无法复制文件“C:\Users…\WebApi3\obj\Debug\netcoreapp3.0\WebApi3.exe”,因为找不到该文件 及 错误MSB3030无法复制文件“C:\Users…\Web\obj\Debug\netcoreapp3.0\webportal.exe”,因为找不到该文件 因此,这些项目尚未建成 感谢您抽出时间来阅读本文 请告知 以下是错误指向的代码部分:Asp.net 错误 ;MSB3030&x9;无法复制文件";C:\Users\…\WebApi3\obj\Debug\netcoreapp3.0\WebApi3.exe“;因为没有找到,asp.net,windows,visual-studio,.net-core,msbuild,Asp.net,Windows,Visual Studio,.net Core,Msbuild,大家好,我的社区 我正在尝试根据项目“应用程序”属性,使用以下方法构建目标框架为.NET Core 3.0的Web和WebAPI控制台应用程序: 微软Visual Studio社区2019 Windows 10 PRO上的16.5.4版 我看到以下错误: 错误MSB3030无法复制文件“C:\Users…\WebApi3\obj\Debug\netcoreapp3.0\WebApi3.exe”,因为找不到该文件 及 错误MSB3030无法复制文件“C:\Users…\Web\obj\Debug\
============================================================
_CopyOutOfDateSourceItemsToOutputDirectory
Copy files that have the CopyToOutputDirectory attribute set to 'PreserveNewest'.
============================================================
-->
<Target
Name="_CopyOutOfDateSourceItemsToOutputDirectory"
Condition=" '@(_SourceItemsToCopyToOutputDirectory)' != '' "
Inputs="@(_SourceItemsToCopyToOutputDirectory)"
Outputs="@(_SourceItemsToCopyToOutputDirectory->'$(OutDir)%(TargetPath)')">
<!--
Not using SkipUnchangedFiles="true" because the application may want to change
one of these files and not have an incremental build replace it.
-->
<Copy
SourceFiles = "@(_SourceItemsToCopyToOutputDirectory)"
DestinationFiles = "@(_SourceItemsToCopyToOutputDirectory->'$(OutDir)%(TargetPath)')"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
Retries="$(CopyRetryCount)"
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)"
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForAdditionalFilesIfPossible)"
>
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
</Copy>
</Target>
============================================================
_CopyOutofDateSourceItemsOutputDirectory
复制CopyToOutputDirectory属性设置为“保留最新”的文件。
============================================================
-->
将Visual Studio更新为16.5.5。到目前为止,似乎已经解决了这个问题。我也遇到了类似的问题,但在尝试发布时。受影响的.DLL是一个nuget包,我注意到我对它进行了更新
更新受影响的包、清理解决方案、重建然后重新发布解决了我的问题。主要问题不是您提供的问题。信息还不够。我认为主要项目下的自定义复制任务有一些错误。你是如何建立三个项目的?您是否实际构建了WebApi项目和Web项目?自定义复制任务的角色是什么?是否需要将一些文件复制到新项目中?您可以选择
工具-->选项-->项目和解决方案-->生成并运行-->将MSBuild项目生成输出详细程度设置为详细,以查看详细的生成日志以检查错误。我认为您的自定义复制任务有错误。首先,确保在执行复制任务之前生成输出文件。其次,确保copy task命令没有语法错误。或者你的主要项目是否引用了这两个项目?或者请与我们共享错误锁定的项目文件的内容,以便更快地解决此问题。感谢您的快速响应。昨天,我将VS更新为16.5.5,两个项目现在都重建了。