-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failure loading Import from csproj #888
Comments
Hi! FWIW, you should use omnisharp-win-x64-net64.zip. The .NET Core version of OmniSharp won't be able to run the tasks and targets required to process a .NET Framework project like a WebApplication, since those tasks are intended to be run on Desktop CLR. I don't believe the .NET Core version of MSBuild will even be able to locate the extensions path (as you noted above). I'm interested in learning why the .NET Framework version of OmniSharp crashes with omnisharp-emacs. @razzmatazz, is this a known issue? |
@DustinCampbell Also, someone has reported this problem (of Emacs crashing on Windows) on Slack some time bfore, I think.. Probably not @jfmcbrayer; — I am not that sure what goes about in emacs (host for omnisharp-emacs) when it crashes on Windows. I am not using one myself (I am on macOS) and couldn't replicate the problem when I tried. @jfmcbrayer — could you report Emacs crash to omnisharp-emacs repo? |
Actually, that is already OmniSharp/omnisharp-emacs#260, which I didn't see before. |
@jfmcbrayer I found the cause for emacs host crash on Windows:
Basically when launching a Windows binary emacs will try to sniff it out to check if it is a console app or regular Windows app, or a cygwin exe, etc... and it appears that .NET binaries compiled for x64 trigger that code to crash on a NULL deref somewhere when parsing PE directory on the executable. The solution is to use the Otherwise I think this issue can be closed |
Ahah! omnisharp-install-server does not seem to work on Windows yet. But I will install the x86 binary. Thanks for finding the cause. Perhaps this needs to be added to the documentation before it is closed? |
@jfmcbrayer could you check why omnisharp-install-server does not work for you? I would really like to have it working for everyone.. I have just (yesterday) added an implementation of omnisharp-install-server for Windows (that requires PowerShell v5 to be installed, though it — present by default on Windows 10, and must be installed manually on 7+). It is available on melpa (not on stable.melpa.org, though): Can you paste the contents of I think I mentioned the issue with 64bit binaries on emacs/windows in README.md for this project site, it should be there.. Or did I miss something? |
It's just that my omnisharp-emacs is not that up-to-date. Did not update from melpa this morning.
|
@jfmcbrayer it should there already by now.. |
Just wanted to check in on this issue. Has everything been addressed? Can we close this now? |
@DustinCampbell emacs crash should be resolved, don't know about the other issue with failed Import; @jfmcbrayer ? |
The failed import was due to using the wrong OmniSharp package to avoid the emacs crash. So I think it can be closed, though some documentation might be a good idea. |
the standard install procedure via |
Possibly related to #202.
I'm having a problem with loading an MSBuild solution (a .NET MVC 5 project, .sln file and .csproj files generated by VS 2015).
I am running v1.20.0 of omnisharp-roslyn, from the build omnisharp-win-x64-netcoreapp1.1.zip (I should possibly be using omnisharp-win-x64-net46.zip, but it crashes emacs when loaded by omnisharp-emacs).
It is choking on this line in SolutionDir/ProjectDir/Project.csproj:
Producing this error:
omnisharp-emacs is then not able to complete anything, nor find any usages, etc. Removing the line from the .csproj makes everything work, but VS 2015 will add it back whenever it opens it. Omnisharp is clearly looking for that target on the wrong path, but why?
Correct path should be
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\WebApplications\Microsoft.WebApplication.targets
I'm not 100% sure whether this is an actual omnisharp-roslyn bug, or if I'm simply doing something wrong in an obscure way. I can work around this by setting the environment variable MSBuildExtensionsPath32, but is it possible for there to be a sensible default? Or does that break cross-platform usage?
The text was updated successfully, but these errors were encountered: