10

I am trying to run the example C# code in visual studio for square connect:

https://github.com/square/connect-api-examples/tree/master/connect-examples/v2/csharp_payment

When I open the solution all of the references have a yellow triangle with and exclamation point next to them.

I have tried to restore nuget packages on the solution, uninstall and reinstall some and i can't get the triangles to go away. It won't build for me.

Any ideas? Thanks

J DOE
  • 103
  • 1
  • 4
  • You need to post the relevant code, nobody wants to go through your whole repo to decypher what your issue is. See how to create a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) – Adam May 11 '17 at 00:41

2 Answers2

20

There is a target in their project file that can become problematic when projects are moved between systems.

You can fix the problem with two steps:

  1. Remove the entire <Target Name="EnsureNuGetPackageBuildImports" ..> element at the end of the project file, then reload the project.
  2. Execute an Update-Package -Reinstall in your (NuGet) Package Manager Console.

That should set everything right for your system and re-point to the correct versions of the relevant libraries.

ladenedge
  • 13,197
  • 11
  • 60
  • 117
1

Try to delete packages folder at solution root and rebuild or restore packages again.

Khoa Nguyen
  • 1,056
  • 2
  • 12
  • 20