none
VisualStudio2015: Asp.net projects run fine but lose metadata file on git upload/download

    Question

  • I am having a rather frustrating issue with the Team git server.

    I have a project running on my machine.  I am able to open up my web page and access all pages, buttons, tabs, etc.  I cloned it to a team repository for my boss to view my code and work on it with me and neither of us can get it to run after cloning it to our machines.

    We both come up with the following errors:

    "Metadata file 'XYZ' could not be found

    and

    This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. 


    I have tried all the metadata file not found fixes I can find to no avail. 

    Also, the NuGet package(s) missing on my computer makes no sense to me since the program runs on my computer, just not after cloning it from the Visual Studio team foundation server.  Despite this, I did do the Nuget Package Restore but that also had no affect.

    Tuesday, August 30, 2016 6:56 PM

All replies

  • Hi jgbowers,

    According to the error message, please make sure the two options have been checked in the following screenshot (Tools->Options->NuGet Package Manager). And you could also add NugGet Package manually by clicking Package Source in the following screenshot.

    After you have done above settings and the issue occurs again. The following thread which has the similar issue as you. You could refer to some replies of Avi Tumer, Ben Wilde, Pratik Shah, JSK and so on. I think their replies he may be helpful for you.

    Reference:

    http://stackoverflow.com/questions/20490857/visual-studio-getting-error-metadata-file-xyz-could-not-be-found-after-edi

    Sincerely,

    Oscar


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Wednesday, August 31, 2016 9:17 AM
    Moderator
  • Both are checked and unfortunately I have already gone through every solution on that page with no positive results.

    It appears that the issue has to do specifically with team explorer, as the exact same code runs perfectly fine on the same machine outside of the repository and team explorer environment.
    Wednesday, August 31, 2016 2:52 PM
  • Hi jgbowers,

    In my side VS2015 update3, I have created a project with NuGet packages and upload it to Team git server. And in other computer I have cloned the project and run it without any problems.

    Does this issue appear in different computer? You could clone the project in a different computer and to observe whether this issue occurs.

    You could create a new simple project with NuGet package, and upload to Team git server. Then clone this project in a different computer to observe whether this issue appeared again. If yes, this may be related to the tools of VS, I think you should repair your VS and try again.

    If not, this may be related to your project or repository of git. I suggest you could copy this project outside of the repository and open it again to observe whether has the same issue.

    If possible you could give me a link of your project, then I clone your project in my side to observe whether has the same issue.

    Sincerely,

    Oscar


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Thursday, September 01, 2016 8:01 AM
    Moderator
  • It is indeed happening on other machines.

    I was hoping to avoid repairing VS, everytime I have repaired VS2015 across 4 different machines it either breaks VS or breaks the machine.  
    I had to wipe my personal laptop because repairing VS broke the control panel and internet explorer.

    Took me about 2 weeks to get VS2015 working at all on any machine.  Maybe I will just buy a network drive and split up version updates of my work in different dated folders.
    Thursday, September 01, 2016 3:05 PM
  • Hi jgbowers,

    Just my last reply, you could create a new project and commit to Team Git Service then clone it in a different computer. Please refer to the following steps:

    1). Create a new web project;

    2). Add NuGet packages to it;

    3). Commit to Team Git Service;

    4). In a different computer, clone this project, and run it to observe whether has issues.

    Above steps will help us to exclude the reasons caused by VS.

    Please feel free to let me know you latest result.

    Sincerely,

    Oscar


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    • Proposed as answer by qing__Moderator Monday, September 05, 2016 9:25 AM
    • Marked as answer by qing__Moderator Thursday, September 08, 2016 3:24 AM
    • Unmarked as answer by jgbowers Thursday, September 08, 2016 3:00 PM
    • Unproposed as answer by jgbowers Thursday, September 08, 2016 3:00 PM
    Friday, September 02, 2016 9:53 AM
    Moderator
  • Hi jgbowers

    Have you tried the steps from my last reply? Because which could help us to judge this issue caused by the specify project or Visual Studio.

    If possible, would you please share me a detailed step that could help us to repro your issue in my side? Or you could give me a project sample that could help us to repro this issue in my side. Thank you very much.

    Sincerely,

    Oscar


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Friday, September 09, 2016 11:28 AM
    Moderator
  • Identical issues with different projects.  Same two errors but different file names and paths.

    Done with a few different files and on 3 different machines.


    I've officially spent more time trying to get Visual Studio and it's functions working than I have programming.
    And the documentation could use extensive work.  A lot of the tutorials for how to use the TFS and Git are along the lines of "The settings look like this, go to them." Without any indication of how to get to them.

    -Example-

    Tutorial:
    http://prntscr.com/chbkh0

    Actual:
    http://prntscr.com/chbkvn

    Monday, September 12, 2016 11:25 PM
  • Yes, since I have pulled from it through multiple computers I have obviously connected the git project.
    • Edited by jgbowers Tuesday, September 13, 2016 2:47 PM
    Tuesday, September 13, 2016 2:46 PM
  • I don't believe you actually read my question/problem.
    Wednesday, September 14, 2016 2:54 PM
  • Hi jgbowers,

    Sorry for misunderstanding your issue before. I have deleted my wrong reply.

    I look into your this reply:

    >>And the documentation could use extensive work.  A lot of the tutorials for how to use the TFS and Git are along the lines of "The settings look like this, go to them." Without any indication of how to get to them.

    -Example-

    Tutorial:
    http://prntscr.com/chbkh0

    Actual:
    http://prntscr.com/chbkvn

    I have looked the screenshot your shared. I understand that you can't find the Repository Settings UI. So I add a reply about it.

    OK, that's my fault. And for your original issue,  I have escalated your case and try to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

    Sorry again.

    Best Regards,

    Lake Xiao

    Thursday, September 15, 2016 1:46 AM
    Moderator
  • Hi jgbowers,

    Do you have a .gitignore file in your git repository to control what files should be commited and what files should be ignored? If yes, can you share the rules in that file? And also, did you commit the nupkg package files into git repository? 

    Tuesday, September 20, 2016 3:17 AM