How to set MONO_PATH on OSX System.Data.SqlClient.SqlException (remote SQLServer db)

431 Views Asked by At

Scenario: I run xsp4 --port 9000 from the command line in the directory of my .net app.

I navigate to localhost:9000 and see this: When I navigate to local host I get this.

Back on the console I see this:

Path '/Default.aspx' built successfully, but a compilation exception has been thrown for other files:
Compiler errors:
(0,0) : warning CS1685: The predefined type `System.Runtime.CompilerServices.AsyncStateMachineAttribute' is defined multiple times. Using definition from `mscorlib.dll'
(0,0) : error : /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous warning)
(0,0) : error : /Users/liveclass/Documents/changeyourenergy/Bin/System.Runtime.dll (Location of the symbol related to previous warning)
(0,0) : warning CS1685: The predefined type `System.Runtime.CompilerServices.CallerMemberNameAttribute' is defined multiple times. Using definition from `mscorlib.dll'
(0,0) : error : /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous warning)
(0,0) : error : /Users/liveclass/Documents/changeyourenergy/Bin/System.Runtime.dll (Location of the symbol related to previous warning)
(0,0) : warning CS1685: The predefined type `System.Runtime.CompilerServices.CallerLineNumberAttribute' is defined multiple times. Using definition from `mscorlib.dll'
(0,0) : error : /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous warning)
(0,0) : error : /Users/liveclass/Documents/changeyourenergy/Bin/System.Runtime.dll (Location of the symbol related to previous warning)
(0,0) : warning CS1685: The predefined type `System.Runtime.CompilerServices.CallerFilePathAttribute' is defined multiple times. Using definition from `mscorlib.dll'
(0,0) : error : /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous warning)
(0,0) : error : /Users/liveclass/Documents/changeyourenergy/Bin/System.Runtime.dll (Location of the symbol related to previous warning)

Exception thrown:
System.Web.Compilation.CompilationException: : /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous warning)
...

I tried:

  • Seeing if there is a MONO_PATH issue in case mono is using .net4.5 as opposed to 4.0 like I want. I noticed this issue here, but am unable to figure out how to set the MONO_PATH correctly on a Mac (as I haven't used one since 1986). The instructions seem to apply to ubuntu.
  • I noticed that there is a mono --config FILE option, however, I can't seem to find anything in the latest docs that tells me how to create a config file and actually use the option.
  • Running export MONO_MANAGED_WATCHER=disabled based on this article. This fixed a different issue.
0

There are 0 best solutions below