-
Notifications
You must be signed in to change notification settings - Fork 417
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
Failed to build OmniSharp.Abstractions #418
Comments
Thanks for reporting this, @guardrex . You don't need to remove the framework. Everything is supposed to work right away. I won't be able to repo this failure. But there are a few things you can begin with to solve this issue.
|
@troydai It was a fresh install of I ran |
@troydai It seems to like I'm going to proceed with an attempt to build the whole thing for |
@troydai Doesn't look like it worked out. A few warnings thrown for dep conflicts. There is an error in the OmniSharp Log in VS Code ... [EDIT] In spite of that error, it seems like OmniSharp is working. I get the flame and IntelliSense ... |
For me the original error popped up from a lack of .NET 4.5.1 Reference Assemblies on my system. One recommended solution was to install VS. I found an alternate hack, by installing: https://www.microsoft.com/en-us/download/details.aspx?id=49978 and creating a copy for 4.5.1 of the folder "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1". |
@hal-ler Excellent point. This laptop does not have those ref assemblies and that probably explains it. Is the OmniSharp startup error " When compiling for v4.5.1 without the ref assemblies, is the prior exception behavior "by-design" for a missing .NET 4.5.x framework? |
I have only started playing around with the code recently, so take whatever I say with a grain of salt. I was able to replicate your exception by convincing VS Code that a particular folder is a .NET Core project without a project.json residing within it. Omnisharp then tried to associate the folder with a workspace, but failed. In my case the flame is on, but there is no IntelliSense, only editor suggestion for text (try to type "Console." and all the options should pop up). I suggest looking at your project.json file to see what is causing the issue. |
You are correct: The methods are not appearing with Intellisense. I thought it was working b/c when I opened a couple of code files, I wasn't getting bad ref indicators (squiggles) under method names. It's not performing look-ups, so it is not working. |
I actually don't have a Windows environment without .NET installed. So I didn't test this Environment, my bad. In that case, yes the build failure is due to missing .NET 4.5.1 references. The solution @hal-ler gave will fix this. On Mac and Linux this problem is solved by setting an environment variable: #412. For the other issue, On this note, I think a better error message as well as a choice to ignore entire target framework is a better user experience: dotnet/vscode-csharp#39 |
I see. I don't explicitly want to ref "netstandardapp1.5": {
"imports": [ "dnxcore50", "portable-net45+win8" ]
} Thanks @troydai and @hal-ler. I'm not sure I'll go to the trouble of installing .NET 4.5.1 or not. I might just rough it out for a few more weeks in hopes that VS Code gets baked-in goodness soon. |
@troydai @hal-ler ... yes ... @hal-ler ... thank you much ... your workaround worked for me. I installed the .NET Framework from https://www.microsoft.com/en-us/download/details.aspx?id=49978 I copied the folder ...
to a folder called ...
The My apps targeting
I'm good. Thanks again to both of you for your help. I plan to stop pulling down DNX runtimes now, so let me know if that's going to be a problem. |
@troydai Following our comments at https://github.com/dotnet/cli/issues/1618#issuecomment-191970379
I don't have the
DNX_UNSTABLE_FEED
set on my Win10 laptop. It fully restores, but I ran into this (twice) attempting to build ...[EDIT] Should I attempt to strip the
dnx451
framework out of theproject.json
files and attempt a build ondnxcore50
ornetstandardapp1.5
?The text was updated successfully, but these errors were encountered: