-1

我们有要求将.Net Web应用程序从.Net框架3.5迁移到4.6.2。我已将应用程序迁移到框架工作4.6.2并能够运行应用程序。使用框架发布迁移ASP.Net Web应用程序时出错4.6.2

发布代码时出现问题。我得到一个错误:

Copying file obj\Debug\Project.dll to obj\Release\Package\PackageTmp\obj\Debug\Project.dll failed

在迁移

(框架工作4.6.2)的代码,但是发布的旧代号(车架工作3.5)时,我没有看到任何错误。 我已经尝试了许多事情:

  1. 从溶液
  2. 跑msbuild.exe命令发布(自定义的MSBuild XML)
  3. 重新启动IDE(VS2015)
  4. 重新启动机器
  5. 删除该文件夹的OBJ

我还应该做什么?

错误 当从VS试过:发布

Error Copying file obj\Debug\Project.dll to obj\Release\Package\PackageTmp\obj\Debug\Project.dll failed. Could not find file 'obj\Debug\Project.dll'

当从自定义的MSBuild试图

构建失败。

"\Build1.xml" (default target) (1) -> "project.csproj" (default target) (2) -> (_CopyWebApplicationLegacy target) -> C:\Program Files\MSBuild\Microsoft\VisualStudio\v14.0\WebApplications\Microso ft.WebApplication.targets(182,5): error MSB3030: Could not copy the file "js\id le-timer.js" because it was not found.

C:\Program Files\MSBuild\Microsoft\VisualStudio\v14.0\WebApplications\Microso ft.WebApplication.targets(182,5): error MSB3030: Could not copy the file "js\jq uery-idleTimeout-iframes.min.js" because it was not found.

0 Warning(s) 2 Error(s)

+0

你能重新启动计算机,然后再试一次吗? – Win

+0

你介意提供详细的错误日志吗?它被另一个进程使用了​​吗?它要么坚持引用,不要释放资源,否则会导致过程在告知关闭时不结束。解决这个问题,这个问题会自行解决。请尝试关闭防病毒并清理\ bin文件夹,检查它是否正常工作。 –

+0

错误\t \t将文件obj \ Debug \ .dll复制到obj \ Release \ Package \ PackageTmp \ obj \ Debug \ .dll失败。找不到文件'obj \ Debug \ .dll' – Bhaski

回答

0

这里有我也跟着来解决这个问题

  1. Upgrade all the dll's (non solution dll's) with nuget package manager along with the solution migration from 3.5 to 4.6.2 framework.
  2. Remove un-used dll's from the project
  3. rebuild and publish!!

我的问题按照上述步骤后解决的步骤。

谢谢

+0

感谢您在这里分享您的解决方案,您可以将其标记为答案,这样可以帮助其他社区成员获得相同的问题。 –

相关问题