2

When I create a solution, one machine setting up all needed references and then transfer to another machine the references show as missing with a yellow triangle.

I have looked in the .csproj file for the paths and they are relative and seem to be pointing in the exact correct location. However, if I click on one of the missing references, the path field in properties is blank. But on the original machine, the paths shows correctly.

I have tried deleting the .suo file after searching on here and finding that was a possible solution, but most other solutions point toward making sure the .csproj file has relative paths, which it already does.

We are trying to use git as source control, surely we should be able to share projects without restoring references? Can someone please help.

  • Possible duplicate of [Add reference to a downloaded dll in Visual studio and resolve in Github](https://stackoverflow.com/questions/36229567/add-reference-to-a-downloaded-dll-in-visual-studio-and-resolve-in-github) – Diado Aug 11 '17 at 08:04
  • https://stackoverflow.com/questions/36229567/add-reference-to-a-downloaded-dll-in-visual-studio-and-resolve-in-github - I have tried the following, it still dosen't work unfortunately. I did use nuget from the outset. – Iain Graham Aug 11 '17 at 08:08
  • Are the references located in the folder that is checked in? And are you using a .gitignore file? I'm thinking that maybe the referenced dll:s are ignored by git due to something in the gitignore file? – m4ttsson Aug 11 '17 at 08:20
  • The references are in the packages folder, on both the original machine, and the second machine. When drilling down to the actual .dlls you can see they are there on both machines, which is what makes this so confusing. Also the path in the .csproj points to these locations relatively. And regardless the folder structure on both machines is identical. – Iain Graham Aug 11 '17 at 08:27
  • Also there is no git ignore file in use. – Iain Graham Aug 11 '17 at 08:55
  • What happens if you move the packages folder on the original machine and restore and build solution? Maybe an old uninstalled reference still exists somewhere in the csproj and it works on the original machine since nuget don't clear package folder when uninstalling. Maybe this could be of help also: https://stackoverflow.com/questions/37208853/net-2015-references-with-yellow-triangle-for-nuget-packages-on-portable-librari – m4ttsson Aug 11 '17 at 08:56
  • Above comment is only relevant if packages folder is not checked in and is restored on the new computer. – m4ttsson Aug 11 '17 at 08:57
  • This started on the original git clone command, and copying the packages folder over as expected made no difference. Totally baffled! – Iain Graham Aug 11 '17 at 09:00
  • What .net framework does the project target? Maybe it targets a version that is not available on the other machine. If the target framework on the other computer is not one that the references support it could cause yellow triangles to appear. If this isn't the problem I have no idea on how to proceed. :/ – m4ttsson Aug 11 '17 at 09:10
  • Thanks for your help, unfortunately the framework is 4.5.2, which is available on both machines. :/ – Iain Graham Aug 11 '17 at 09:14

1 Answers1

1

I had the same issue if you just un-install the nuget packages and re-install from that point fourth you should not had to do it again, more of a workaround really but at least you only have to do it once.

user3755946
  • 804
  • 1
  • 10
  • 22