none
Why does VS 2015 lie when it says a .nupkg file exists in a location that doesn't exist???

    Question

  • We're upgrading a WPF project that we started in VS 2013, to VS 2015. This is a new project, not yet in production. We're using Entity Framework 6.1.3. My colleague did the upgrade. I got it out of TFS and tried to build it. It won't build. It gave me errors about entity framework not being in the solution. I got into NuGet Package Manager to look. There is it, plain as day. EF 6.1.3 is installed in the solution and in that project. But VS 2015 thinks it isn't. But VS 2015 thinks it is. But VS 2015 thinks it isn't. But VS 2015 thinks it is. But VS 2015 thinks it isn't. But VS 2015 thinks it is. But VS 2015 thinks it isn't. But VS 2015 thinks it is. But VS 2015 thinks it isn't. But VS 2015 thinks it is. But VS 2015 thinks it isn't. But VS 2015 thinks it is. But VS 2015 thinks it isn't. But VS 2015 thinks it is. But VS 2015 thinks it isn't. But VS 2015 thinks it is. But VS 2015 thinks it isn't. But VS 2015 thinks it is. But VS 2015 thinks it isn't. But VS 2015 thinks it is. But VS 2015 thinks it isn't. But VS 2015 thinks it is. But VS 2015 thinks it isn't. But VS 2015 thinks it is.

    I gave up trying to make sense out of what VS 2015 thinks or doesn't think. I decided to uninstall it from the solution/project. So that's what I did in NuGet Package Manager. Now, sure enough EF is gone. Only problem is I can no longer install it back into the solution/project. It's now giving me an error that reads:

    TF400024: The change on D:\Src\CoreFramework\packages\EntityFramework.6.1.3\EntityFramework.6.1.3.nupkg cannot be undone because a file already exists at D:\Src\CoreFramework\packages\EntityFramework.6.1.3\EntityFramework.6.1.3.nupkg. The file must be deleted from disk for the undo to succeed.

    But this is an outright lie! There is no D:\Src\CoreFramework\packages\EntityFramework.6.1.3 folder on my system. I've tried looking with both Windows Explorer and PowerShell; there just ain't a D:\Src\CoreFramework\packages\EntityFramework.6.1.3 folder. VS 2015 is certain my problem is in a file in a non-existent folder. How do I fix something when the answer given is so completely wrong?


    Rod

    Tuesday, November 24, 2015 9:37 PM

Answers

  • Hi Rod,

    Since the original project is upgraded from VS2013 to VS2015, and there also has some NuGet packages installed. There may be something "wrong" when upgrading the project.

    You have tried create new WPF project in VS2015 and it works fine. So I suggest you move the original project files to the new project one by one. Then rebuild it in VS2015.

    Best Regards,
    Weiwei

    Thursday, November 26, 2015 1:17 AM
    Moderator

All replies

  • Hi Rod,

    Please create a new project and install the EF to make sure this problem occurs with this specific project or for all projects.

    According to the error message, it seems related to TFS. Please try disconnect to TFS to exclude the effect from TFS.

    If it occurs with a specific project, please create a new project and then remove the project files to the new project.

    If all projects has this problem, please try with following steps to troubleshoot it.

    1. Uninstall and reinstall NuGet Packages Manager through Extensions and Updates window in menu Tools.
    2. Run Visual Studio as Administrator.
    3. Close all third part software, such as antivirus software.
    4. Repair Visual Studio.

    Best Regards,
    Weiwei

    Wednesday, November 25, 2015 7:43 AM
    Moderator
  • Hi Weiwei,

    I've started a new WPF project in VS 2015. Then the only thing I did was added EF 6.1.3 to it. I tried compiling it and it compiled fine. I ran it and it ran fine.

    So does this suggest that there's something "wrong" with the original project I was writing about yesterday?


    Rod

    Wednesday, November 25, 2015 3:39 PM
  • Hi Rod,

    Since the original project is upgraded from VS2013 to VS2015, and there also has some NuGet packages installed. There may be something "wrong" when upgrading the project.

    You have tried create new WPF project in VS2015 and it works fine. So I suggest you move the original project files to the new project one by one. Then rebuild it in VS2015.

    Best Regards,
    Weiwei

    Thursday, November 26, 2015 1:17 AM
    Moderator
  • It lies Because such folder exists in TFS.
    You need to check in (This will delete the folder from TFS) and then try again.
    • Edited by liorlevi1974 Monday, January 18, 2016 12:08 PM
    • Proposed as answer by liorlevi1974 Monday, January 18, 2016 12:39 PM
    Monday, January 18, 2016 12:07 PM
  • It lies Because such folder exists in TFS.
    You need to check in (This will delete the folder from TFS) and then try again.
    Does that mean it exists somewhere on the TFS server?

    Rod

    • Proposed as answer by Alex Beynenson Wednesday, July 05, 2017 12:50 PM
    • Unproposed as answer by Alex Beynenson Wednesday, July 05, 2017 12:50 PM
    Tuesday, January 19, 2016 3:34 PM
  • For me something dependent was in "Pending changes" that confliced
    Tuesday, April 19, 2016 12:52 PM
  • That may have been. Its now some months ago, I've also applied Update 2 for VS 2015, which seems to have resolved an unrelated problem but may have also benefitted this.

    Rod

    Tuesday, April 19, 2016 2:12 PM
  • Thanks, it worked :)

    Mircea

    Saturday, May 07, 2016 4:35 PM