1
I had a somewhat curious problem now.
I created a project (Console Application) named Spotifyapi in Visual Studio 2017 and then downloaded the Spotify API in Nuget. When I went to run the code for the first time Visual Studio released the following exception:
System.Typeloadexception was unhandled Message: An unhandled Exception of type 'System.Typeloadexception' occurred in mscorlib.dll Additional information: Could not load type Spotifyapi.Web.Spotifywebapi from Assembly Spotifyapi, Version=1.0.0.0, Culture=neutral, Publickeytoken=null.
So I started searching the Internet and found out right here on Stack(Ask here) a Dll and an Exe cannot contain the same name.
When I checked, the API had the name Spotifyapi.dll. Exactly the same exe name (Spotifyapi.exe)
In the reply the user explains that Visual Studio has already loaded a call in Assembly to Spotify.exe, so it does not locate the dll. But I would like to understand why such a smart IDE doesn’t know that they are different files by extension. Why does this happen? I found it a little curious and would like to know a little more of this "problem".