Sunday, September 22, 2013

C# woes - "call is ambiguous between the following methods" - identical methods

September 22, 2013 Posted by Jason Irwin , No comments

Oh the irony. An ambiguous message about ambiguous methods. As you'll notice, the conflicting method names are the exact same:

Error 48 The call is ambiguous between the following methods or properties: 'Ecommerce.Core.Helpers.DateTimeHelpers.Verify(System.DateTime?)' and 'Ecommerce.Core.Helpers.DateTimeHelpers.Verify(System.DateTime?)' C:\Ecommerce\Ecommerce.Core\Helpers\DateTimeHelpers.cs 9 24 Ecommerce.Core

The issue here was that my Ecommerce.Core project was referencing itself. Yes, you heard that right. At first I assumed I was responsible but upon closer inspection it looks like Visual Studio or a Visual Studio plugin was responsible for automatically adding the reference...

I removed the reference and, voila, the error (actually hundreds of errors for various methods) disappeared. I don't mean this in a cynical way, but I would legitimately like to know if there are any valid use cases for a project referencing itself.

Tuesday, September 3, 2013

Sublime Text 3, SublimeREPL and CLISP

September 03, 2013 Posted by Jason Irwin , No comments

You may get the following file not found error when attempting to combine CLISP (I installed via MacPorts, but I'm guessing this works the same for homebrew...) with SublimeREPL in Sublime Text 3 on OSX.

FileNotFoundError(2, "No such file or directory: 'clisp'")

Essentially, you need to tell SublimeREPL where to find the CLISP binaries. Simply add the following line to your SublimeREPL user configuration file (Sublime Text->Preferences->Package Settings->SublimeREPL->Settings - User)

"default_extend_env": {"PATH": "{PATH}:/opt/local/bin"}