locked
Missing(?) references? RRS feed

  • Question

  • User323983933 posted

    Visual Studio 2015

    Just downloaded a project from TFS after a hard drive crash and restore.

    [IMG]http://i66.tinypic.com/v63m9z.jpg[/IMG]

    There are multiple "Yellow icons" in the references list... does this mean the sources of the references are missing?  I don't know because I can't find a definition as to what the yellow icons mean.

    One such icon is Antlr3.runtime.

    I open NuGet Package manager and it says Installed 3.4.1.9004, latest stable 3.5.0.2

    There is an uninstall option which makes me think it's installed, yet there is a yellow icon.

    I opened package manager and tried Install-Package Antlr -Version 3.4.1.9004

    ...and got this: Package 'Antlr.3.4.1.9004' already exists in project

    So what gives?

    Next I right-clicked the solution in solution explorer, and Restore NuGet Packages.

    Nothing noticeable happened.

    So the reference is "there" but "not there" and there are 119 errors in a solution I know to be working.

    Friday, April 26, 2019 10:11 PM

All replies

  • User1120430333 posted


    There are multiple "Yellow icons" in the references list... does this mean the sources of the references are missing? I don't know because I can't find a definition as to what the yellow icons mean.

    That's what it means is that DLL(s) that were being referenced are no longer in the Bin folder of the project where VS had located them and where Nuget had placed the DLL(s) for the project. Nuget should have a Restore option showing that will restore the missing DLL(s) and set reference to them for the project, which is derived from the Nuget package file that is be part of the VS project that should have been checked-in to TFS as well..

    And if the Restore does not fix the problem, it means that you're going to have to reinstall  the missing DLL as needed by using Nuget..

    Saturday, April 27, 2019 3:39 AM
  • User323983933 posted

    Did you notice that I said:

    Next I right-clicked the solution in solution explorer, and Restore NuGet Packages.

    Is there another option?  Oh and by the way bin is typically not checked in to TFS - should I change that?

    Saturday, April 27, 2019 5:07 AM
  • User1120430333 posted

    Did you notice that I said:

    Next I right-clicked the solution in solution explorer, and Restore NuGet Packages.

    Did you noticed what I said if it didn't work?

    Is there another option?

    Yeah, it's the option I told you about if the package restore didn't work where you are going to have to install all of the missing packages manually using Nuget.

    Oh and by the way bin is typically not checked in to TFS - should I change that?

    I am not talking about the Bin folder. I am talking about the packages.config file that Nuget uses, and if that file is lost becuase you never checked the file into TFS for a given project, then of course, Nuget is not going to restore any packages the project needs that are missing.

    packages.config content for a given project used in Visual Stuido and by Nuget.

    <?xml version="1.0" encoding="utf-8"?>
    <packages>
      <package id="Antlr" version="3.4.1.9004" targetFramework="net461" />
      <package id="bootstrap" version="3.0.0" targetFramework="net461" />
      <package id="CommonServiceLocator" version="1.3" targetFramework="net461" />
      <package id="EntityFramework" version="6.1.3" targetFramework="net461" />
      <package id="jQuery" version="1.10.2" targetFramework="net461" />
      <package id="jQuery.Validation" version="1.11.1" targetFramework="net461" />
      <package id="log4net" version="2.0.8" targetFramework="net461" />
      <package id="Microsoft.ApplicationInsights" version="2.2.0" targetFramework="net461" />
      <package id="Microsoft.ApplicationInsights.Agent.Intercept" version="2.0.6" targetFramework="net461" />
      <package id="Microsoft.ApplicationInsights.DependencyCollector" version="2.2.0" targetFramework="net461" />
      <package id="Microsoft.ApplicationInsights.PerfCounterCollector" version="2.2.0" targetFramework="net461" />
      <package id="Microsoft.ApplicationInsights.Web" version="2.2.0" targetFramework="net461" />
      <package id="Microsoft.ApplicationInsights.WindowsServer" version="2.2.0" targetFramework="net461" />
      <package id="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel" version="2.2.0" targetFramework="net461" />
      <package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net461" />
      <package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net461" />
      <package id="Microsoft.AspNet.Identity.Owin" version="2.2.1" targetFramework="net461" />
      <package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net461" />
      <package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net461" />
      <package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net461" />
      <package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net461" />
      <package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net461" />
      <package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net461" />
      <package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.0" targetFramework="net461" />
      <package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net461" />
      <package id="Microsoft.Net.Compilers" version="1.0.0" targetFramework="net461" developmentDependency="true" />
      <package id="Microsoft.Owin" version="3.0.1" targetFramework="net461" />
      <package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net461" />
      <package id="Microsoft.Owin.Security" version="3.0.1" targetFramework="net461" />
      <package id="Microsoft.Owin.Security.Cookies" version="3.0.1" targetFramework="net461" />
      <package id="Microsoft.Owin.Security.Facebook" version="3.0.1" targetFramework="net461" />
      <package id="Microsoft.Owin.Security.Google" version="3.0.1" targetFramework="net461" />
      <package id="Microsoft.Owin.Security.MicrosoftAccount" version="3.0.1" targetFramework="net461" />
      <package id="Microsoft.Owin.Security.OAuth" version="3.0.1" targetFramework="net461" />
      <package id="Microsoft.Owin.Security.Twitter" version="3.0.1" targetFramework="net461" />
      <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net461" />
      <package id="Modernizr" version="2.6.2" targetFramework="net461" />
      <package id="Newtonsoft.Json" version="6.0.4" targetFramework="net461" />
      <package id="Ninject" version="3.2.0.0" targetFramework="net461" />
      <package id="Ninject.Web.Common" version="3.2.0.0" targetFramework="net461" />
      <package id="Ninject.Web.Common.WebHost" version="3.2.0.0" targetFramework="net461" />
      <package id="Owin" version="1.0" targetFramework="net461" />
      <package id="Unity" version="4.0.1" targetFramework="net461" />
      <package id="Unity.Mvc5" version="1.2.3" targetFramework="net461" />
      <package id="WebActivatorEx" version="2.0" targetFramework="net461" />
      <package id="WebGrease" version="1.5.2" targetFramework="net461" />
    </packages>

    Saturday, April 27, 2019 6:39 AM
  • User323983933 posted

    Sorry, this is just very frustrating and it seems that TFS and/or Visual Studio ought to be able to deal with this without costing me more days of development.

    I thank you for helping:  I just got more frustrated when you said to try something I had already tried.  That's on me, sorry.

    The DLLs seem to be there in the folder structure.  The image attached is the comparison between references in solution explorer and my file system. 

    I was unable to fix as you suggested because the SLN is locked by another user. I tried reinstalling but it just aborts when it finds the sln locked.

    I'll hit that on Monday.

    Also attaching my packages.config.

    (http://i66.tinypic.com/14y0jgm.jpg)

    <?xml version="1.0" encoding="utf-8"?>
    <packages>
      <package id="Antlr" version="3.5.0.2" targetFramework="net452" />
      <package id="bootstrap" version="3.0.0" targetFramework="net472" />
      <package id="EntityFramework" version="6.2.0" targetFramework="net452" />
      <package id="iTextSharp" version="5.5.13" targetFramework="net452" />
      <package id="itextsharp.xmlworker" version="5.5.12" targetFramework="net452" />
      <package id="jQuery" version="1.10.2" targetFramework="net472" />
      <package id="jQuery.Validation" version="1.11.1" targetFramework="net472" />
      <package id="jQuery-datetimepicker" version="2.4.5" targetFramework="net452" />
      <package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net472" />
      <package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net472" />
      <package id="Microsoft.AspNet.Identity.Owin" version="2.2.1" targetFramework="net472" />
      <package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net472" />
      <package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net472" />
      <package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net472" />
      <package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net472" />
      <package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.4" targetFramework="net452" />
      <package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net472" />
      <package id="Microsoft.Net.Compilers" version="1.3.2" targetFramework="net452" developmentDependency="true" />
      <package id="Microsoft.Owin" version="3.0.1" targetFramework="net472" />
      <package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net472" />
      <package id="Microsoft.Owin.Security" version="3.0.1" targetFramework="net472" />
      <package id="Microsoft.Owin.Security.Cookies" version="3.0.1" targetFramework="net472" />
      <package id="Microsoft.Owin.Security.Facebook" version="3.0.1" targetFramework="net472" />
      <package id="Microsoft.Owin.Security.Google" version="3.0.1" targetFramework="net472" />
      <package id="Microsoft.Owin.Security.MicrosoftAccount" version="3.0.1" targetFramework="net472" />
      <package id="Microsoft.Owin.Security.OAuth" version="3.0.1" targetFramework="net472" />
      <package id="Microsoft.Owin.Security.Twitter" version="3.0.1" targetFramework="net472" />
      <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net472" />
      <package id="Modernizr" version="2.6.2" targetFramework="net472" />
      <package id="MvcPdfWriter" version="0.2" targetFramework="net452" />
      <package id="Newtonsoft.Json" version="6.0.4" targetFramework="net472" />
      <package id="Owin" version="1.0" targetFramework="net472" />
      <package id="Respond" version="1.2.0" targetFramework="net472" />
      <package id="Rotativa" version="1.7.4-rc" targetFramework="net452" />
      <package id="WebGrease" version="1.5.2" targetFramework="net472" />
    </packages>


    Saturday, April 27, 2019 8:37 PM
  • User1120430333 posted

    I was unable to fix as you suggested because the SLN is locked by another user. I tried reinstalling but it just aborts when it finds the sln locked.

    That should never happen. The solution that is checked into TFS should be the base version that all developers should be able to do a getlates at anytime and start working with the solution. The developer that has the solution locked on a check-out, it should never be, becuase the developer should be able to Shelve the solution in TFS to persist his or her changes that removes any check-out/lock out conditions  for the solution in the TFS repository. The developer should be bale to do a getlatest on the solution and  do an un-shelve of the shelved solution that will start the code merge process and merge the shelved code changes  into the latest code in the workspace for the solution on the developer's machine.

    The DLLs seem to be there in the folder structure. The image attached is the comparison between references in solution explorer and my file system.

    I suggest that you go back and do a getlates after you get the solution unlocked. It may be that you may have to delete the folder on the machine that the workspace is pointing to and do a getlates and create the folder for the workspace and download the solution again. 

    Sunday, April 28, 2019 9:40 AM
  • User1120430333 posted

    One other thing, just how are making that screen-shot and the arrow pointer stuff?

    Sunday, April 28, 2019 10:23 AM
  • User475983607 posted

    The solution and project files contain file references to source code.  The yellow triangle with an exclamation indicates Visual Studio cannot find the file(s).  This kind of issue happens when you are not mindful of the package references and you check-in solution/project files that are pointing to folders that do not exist on the other dev machines.

    You can always view the solution/project files to figure out where it is looking for the NuGet Packages.  Then either move the packages or change the file references.  If you are on a team, then meet with your other team and figure out a process that will for organizing your code base.

    Sunday, April 28, 2019 1:16 PM
  • User323983933 posted

    OK, I think I get it.  The /packages folder had all the XML and config files, but the DLLs were missing.

    What I need now is a way to add ALL the files under packages, regardless of the ignore settings in the rest of the project.

    I would rather not go through all 36 folders hunting down the dlls and making sure they are added manually

    Tuesday, April 30, 2019 2:27 AM
  • User1120430333 posted

    some_yahoo

    OK, I think I get it.  The /packages folder had all the XML and config files, but the DLLs were missing.

    What I need now is a way to add ALL the files under packages, regardless of the ignore settings in the rest of the project.

    I would rather not go through all 36 folders hunting down the dlls and making sure they are added manually

    Well, you should be able to delete the folder linked to TFS Workspace space on your development machine and simply do a 'getlates',  rebuild the solution in the TFS Workspace on your harddrive and do a compile 'Build' the solution. It should recover everything if the base code  and projects have been checked into TFS properly..

    Think about it, if a new developer joined your team and is working on the project, the developer should be able to do a 'getlatest' on the base projects and code, do a build and be ready to go from that point. The developer should NOT have to run around finding missing DLL(s) that a project or projects needed.

    If the new developer has to go find missing DLL(s) or you have to do this to recover out of your situation, then there is something wrong in how your development team is using TFS.

     I use TFS Express for my personally usage in my home development environment. Just last week, I did a 'getlatest; for a project out of TFS that was not on a laptop machine, compiled it and just took off developing and debugging the solution  on the laptop with no problems.

    Tuesday, April 30, 2019 7:38 AM
  • User633282209 posted

    Just for documentation purpose **for new person with this issue** try this and you will rememberme :D

    If you go to: Tools > NuGet Administrator > Configurations.
    and you have "Allow nuget...." and "automatically check...." cheked.

    The only thing than you have to do is click con the button **"Clear All NuGet Cache(s)"**

    That's it, you don't have to edit manual thinks than can be dangerous, believe me, I use to need to done some of the steps than describe here a lot of time, and try more than 5 steps of the oficial microsoft documentation for that issue you could check it here: https://docs.microsoft.com/es-es/nuget/consume-packages/package-restore#restore-packages-automatically-using-visual-studio

    But just cleaning the cache solve all the problems

    Sunday, January 12, 2020 1:47 PM