Как установить MONO_PATH в OSX System.Data.SqlClient.SqlException (удаленная база данных SQLServer)
Сценарий: я бегу xsp4 --port 9000
из командной строки в каталоге моего приложения.net.
Я перехожу к localhost:9000
и увидеть это:
Вернувшись на консоль, я вижу это:
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)
...
Я старался:
- Проверка наличия проблемы MONO_PATH в случае, если mono использует.net4.5, а не 4.0, как я хочу. Я заметил эту проблему здесь, но не могу понять, как правильно установить MONO_PATH на Mac (так как я не использовал его с 1986 года). Инструкции, кажется, относятся к Ubuntu.
- Я заметил, что есть
mono --config FILE
Однако в последнем документе я не могу найти ничего, что говорило бы мне о том, как создать файл конфигурации и как использовать его. - Бег
export MONO_MANAGED_WATCHER=disabled
на основании этой статьи. Это исправило другую проблему.