-1

We have a requirement to migrated the ASP .Net web app from .Net framework 3.5 to 4.6.2. I have migrated the application to frame work 4.6.2 and able to run the application.

problem comes here when publishing the code. I am getting an error:

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

in migrated (frame work 4.6.2) code, however i don't see any error when publishing the old code(frame work 3.5). i have tried many things:

  1. delete the Obj folder from the solution
  2. ran msbuild.exe command to publish (custom msbuild xml)
  3. restarted the IDE(VS2015)
  4. restarted machine

What else should i do?

Error When tried from VS : Publish

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'

When tried from custom msbuild

Build FAILED.

"\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)

Bhaski
  • 11
  • 1
  • 5
  • Could you restart the computer and try again? – Win Jul 19 '17 at 15:57
  • Would you mind providing the detailed error log? Did it used by another process? It's either holding on to references, not freeing resources, or something else that's causing the process to not end when it's being told to close. Fix up that issue and this problem will resolve itself. please try to turn off antivirus and clean the \bin folder, check if it works fine. – Leo Liu Jul 20 '17 at 07:29
  • Error Copying file obj\Debug\.dll to obj\Release\Package\PackageTmp\obj\Debug\.dll failed. Could not find file 'obj\Debug\.dll' – Bhaski Jul 20 '17 at 07:46
  • @Bhaskar, thanks for your reply. Have you ever check if the files "id le-timer.js" and "jq uery-idleTimeout-iframes.min.js" exist in the project after update framework? If they exist, try to remove and re-add. – Leo Liu Jul 21 '17 at 06:55
  • @Leo-MSFT, thank You!!.. iam now able to publish the code. – Bhaski Jul 21 '17 at 12:39
  • @Bhaskar, Glad to know you have resolved your question. How did you solve your problem? Would you mind share us the solution here and mark it as answer. So it is beneficial to other communities who has the same issue? – Leo Liu Jul 21 '17 at 13:15

1 Answers1

0

Here are the steps i followed to solve this issue

  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!!

My issue resolved after following the above steps.

Thanks

Bhaski
  • 11
  • 1
  • 5
  • thanks for sharing your solution here, you could mark it as the answer, so it could help other community members who get the same issues. – Leo Liu Jul 24 '17 at 01:49