VS Code, No code completion for c# code inside cshtml razor - visual-studio-code

Im having a problem with using Visual Studio Code for editing CSHTML files. im using windows. This is ordinary web matrix page not MVC..
#{
MyClass my = new MyClass();
MyClass.
}
No intellisense at all... Am I missing an extension or something..

It's something others have noticed as well. Apparently it's an upcoming feature with no ETA.
david-driscoll:
We'll be adding support to OmniSharp eventually to support Razor, sadly I don't have a specific timeline. This is mainly because it's not a very easy problem to solve, but it is something we want to get working.
https://github.com/OmniSharp/omnisharp-vscode/issues/168
Update: This has been released, and is under active development see: https://github.com/aspnet/AspNetCore.

Related

Is it possible to start a React application from within a Visual Studio Code extension?

See question. I am working within a Visual Studio Code extension that uses the Webview API. I've been searching for any method but can't seem to find one.
Yes, that should be possible. After generating the production build you can load the main page into a Webview and it should work just like in a browser. You have to ship the production build with your extension, of course.

My Visual Studio Code Intellisense is simply not working (Ionic/Angular Project)

Basically The Problem is that i can't get any suggestions. For example i need the angular-features suggestions, the ionic-feature suggestions, TypeScript attribute suggestions and so on. I get suggestions but completely useless ones and ones completely out of context.
So far i tried reinstalling VS Code several times. I also tried changing the suggestion settings but nothing works for me.
Anyone had a similar problem? I really need to fix this it is driving me absolutely nuts.
Intelij is the best and make sure you have the plugin for that language or framework installed and that plugin is enabled for your project. That goes for VS Code and Intelij

How to get Csharp syntax tree from VS Code Extension?

Is it possible to interact with the CSharp syntax tree from my own VS code extension? I have an extension which I made in Visual Studio proper which uses the Roslyn Syntax Tree to do a variety of code editing and sorting tasks and I want to migrate it to VS Code.
My naive assumption is that if I can get access to the OmnisharpServer object by reaching into the Omnisharp VS Code Extension I might be able to pull the relevant information out of there. I can get access to the extension itself by calling:
let csextension = vscode.extensions.getExtension('ms-vscode.csharp')
But the extension itself doesn't expose much so I'm wondering if this is the correct methodology? If so, how do I get access to the running server from my own extension?
The only other strategy I have is to run a .net core exe which uses Roslyn to do the analysis, but this seems to be duplicating a problem which must be solved somewhere in the stack.
I don't think there's any way to do this without going through the Omnisharp VSCode Extension / its extension API (unless perhaps the server implements some custom interface). If an API doesn't already exist, you could consider creating a feature request on the issue tracker?

Is it possible to navigate to assemblies definitions inside Visual Studio Code

I'm using VS Code several days as MonoDevelop replacement in Unity3D on Mac OS. I installed mono via homebrew as suggested to let VS Code to parse system assemblies. Everything works almost great, but I can't navigate definitions that are not part of my code. For example I can't go to definition of System.String or UnityEngine.Vector3 to see methods signatures. MonoDevelop has Assembly browser but I miss it in VS Code. Does anybody know if VS Code has such feature? Maybe I need to setup something for that?
PS: I've posted feature request. If you're interested in this feature vote for it, please.
https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/14698887-implement-net-assembly-browser
It seems VS Code now can do that with the new extension ms-vscode for C# support. Previously it was recommended to use Legacy C# Support for Unity3D. I don't know exactly if this recommendation is still valid, but I tried to uninstall legacy and to install normal one. After some background work OmniSharp parsed my files and now it can open classes from assemblies! Look at this picture, it has open AnimationCurve class as [metadata]!
I'm trying it with Unity3D 5.5.0b2 beta now, so I'm not sure if this will work with production release of Unity3D. By the way I also removed VSCode plugin from dotBunny out of project as Unity3D 5.5 supports Visual Studio Code self.

Problems with IronPython Studio and PictureBox

Right, so I'm having a go at Iron Python Studio as I'm quite familiar with VS2005 and want to try Python with an integrated GUI designer. But as soon as I add a PictureBox I'm in trouble. When running the project I get complaints about BeginInit and soon enough the form designer stops working.
Is this because I'm running .NET 3.5 or some other compatibility issue? Couldn't find anything at the Iron Python Studio site
I'm having the same problem. What you can do is manually remove the BeginInit() and EndInit() calls, it should work fine then.
Have you checked out IronPython Blog on MSDN? You could probably drill down from there and find a definitive answer. If you do, be sure you update your question here!