我最近安装了Emacs 24.3.1,我在emacs中安装了使用melpa的软件包omnisharp。
但是,在用C#编程时,我看不到omnisharp对Emacs的任何影响。我还需要安装其他的东西吗?还是我在这里做错了什么?
在编译Omnisharp服务器时,我收到以下错误日志:
/home/pratik/OmniSharpServer/OmniSharp.sln (default targets) ->
(Build target) ->
/home/pratik/OmniSharpServer/OmniSharp.Tests/OmniSharp.Tests.csproj (default targets) ->
/usr/lib/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) ->
FindUsages/IntegrationTest.cs(39,27): error CS0584: Internal compiler error: Method not found: 'Nancy.Testing.BrowserResponseExtensions.BodyAsXml'.
FindUsages/IntegrationTest.cs(41,20): error CS1061: Type `object' does not contain a definition for `Length' and no extension method `Length' of type `object' could be found (are you missing a using directive or an assembly reference?)
FindUsages/IntegrationTest.cs(42,19): error CS0021: Cannot apply indexing with [] to an expression of type `object'
FindUsages/IntegrationTest.cs(43,19): error CS0021: Cannot apply indexing with [] to an expression of type `object'
31 Warning(s)
4 Error(s)发布于 2014-08-20 17:55:03
我正在运行与您相同的路径(*nix + emacs + omnisharp)。问题的答案是在OmniSharpServer git页面(https://github.com/nosami/OmniSharpServer)中。您的系统上有mono,所以您必须克隆OmniSharpServerRepository并在shell中执行以下行:
git clone https://github.com/nosami/OmniSharpServer.git
cd OmniSharpServer
git submodule update --init --recursive
xbuild如果xbuild抱怨某些程序集丢失,那么git submodule update --init --recursive就有问题。只要您在底部得到"N错误“消息,您就不会在项目中找到任何二进制文件(exe或dll)。如果您解决了错误,二进制文件应该位于"OmniSharpServer/OmniSharp/bin/Debug“。
您应该在问题中包含完整的编译器输出。如果你还提供了一些关于你的环境的信息,它将更容易帮助你。请在OmniSharpServer目录中执行这一行(我想看看您是否正在查看主分支的最后一个版本,我希望看到您正在使用的mono版本):
git branch -v
mono --version发布于 2015-03-19 21:32:29
我也犯了同样的错误,并注意到有版本冲突。您需要在Ubuntu上安装mono-devel:
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
sudo echo "deb http://download.mono-project.com/repo/debian wheezy main" > /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
apt-get install mono-devel完成后,您应该能够启动服务器:
mono OmniSharp/bin/Debug/OmniSharp.exehttps://stackoverflow.com/questions/24994438
复制相似问题