I tried using System.Device in the Razor view of my C # MVC project. He complained that the link was missing even after I added it to the project. I didn’t have an assembly in my GAC, and for verification I added the bottom dummy line to my global.asax.cs file (and compiled with several debug flags turned on, I would not have thought it was optimized).
new System.Device.Location.GeoCoordinate();
as well as this line in my controller action:
System.Diagnostics.Debug.WriteLine(System.Device.Location.GeoCoordinate.Unknown.IsUnknown);
This was still not done. Finding this solution I checked my GAC, but it wasn’t there (which made sense, but it's good to check). After finding this solution, I marked the link as “Copy local” and the problem disappeared.
Why do I need to mark my link as "Copy local", although I explicitly called the library?
source
share