Is there a Visual Basic Interactive Window in Visual Studio 2015? - vb.net

Is this possible to have a Visual Basic Interactive window in Visual Studio 2015 like we have for C#?

At the time of writing the original answer to this, VB.net interactive was in the pipeline, but no longer. As this answer had been accepted, I can't delete it, so here it stays :-/

For those who came here from Google, no, there isn't a VB Interactive window in VS 2019 at the time I'm writing this, nor do they plan to implement it.

If you clone the Roslyn repository from GitHub (https://github.com/dotnet/roslyn) one of the projects is called vbi, and you can produce a non-GUI version of C# Interactive (no Intellisense obviously) that does a lot of what C# Interactive does.
From a brief investigation it seems to need each line expressed as a function/method call, e.g., evaluating 3 + 4 gives you an error, but System.Console.WriteLine(3 + 4) displays 7 (you also seem to have to full qualify methods). However you can evaluation System.Math.Pow(2, 7) and get 128 as the answer.
Since it's VB input is case insensitive so system.console.writeline(3 + 4) works.

Related

VB 14 missing from Visual Studio 2015

I have Visual Studio 2015, but can't get the new VB language features to work. Or to show up. It's like the product came without it. The null-coalescing operator doesn't work, read-only auto-properties aren't allowed, etc. This is true even when I set up a brand new project, targeting any version of the framework (which shouldn't matter, but I'm trying everything I can think of).
I've got Resharper 9 installed. Following a suggestion in this question, if I select the project, the VB Language Level dropdown list doesn't show anything more recent than "Visual Basic .NET 12".
There are no LangVersion tags anywhere in the .vbproj files. If I add them it seems to make no difference.
I was under the impression that you didn't have to install anything separately for VB 14, just use VS 2015 and you'll have it (C# 6 actually is available and working in C# projects) but it's not there.
Anybody have any ideas what else I can look for?
It's Resharper.
I'm using Resharper 9.2 Ultimate. Resharper is what's putting all the error messages into the code editor. If I suspend it, all the problems go away, and the code compiles and runs exactly as it should.
I should have taken a cue from the fact that the VB Language Level isn't showing the latest version of VB.
Off to contact technical support.

Intellisense in c++ builder?

I'm very disappointed with c++ builder intellisense, so I'm wonder is there any good intellisense that can be used in c++ builder? Something like visual studio have "Visual assist". My current version of builder is 2010, is the x2 have better intellisense?
I doubt if there is a good C++ compiler...
Code Blocks allows the user to hide all the text within an opening brace and a closing brace.
DevC++ can only give colors to different stuff. And it's really old. I used to use it when I was learning C++ at school.
MS Visual C++ allows the user to hide all the text within a function or class and comments that are longer than one line. This is my personal favorite. But it's a bit heavy for old systems (like my 5 year-old laptop).
If I were you, I'd start testing any compiler I find for some time. This way you can see which one mostly suits you.

SqlClient.SqlDataAdapter.Update() Performs Very Slowly

I am porting VB.Net 2 code (VS 2005) to VB.Net 4 (VS 2010). So far things have been going relatively smooth. However, in testing my new ported code, I came across a strange behavior.
In VS 2005 (.Net 2), I have a DataTable filled with data. I then use a DataAdapter to send updates back to the SQL Server. When I perform the SqlClient.SqlDataAdapter.Update() command, it execute in roughly 4 seconds. The same code, on the same table in VS 2010 (.Net 4) runs in 1 Minute 17 Seconds. This is completely unacceptable. However, I have no clue as to why it is happening. The .Update() method is an internal command, not one that I modified in any way. It does not error out, it's just painfully slow.
Anyone have any ideas?
After many months of working directly with Microsoft...a solution/answer was found.
I don't feel so bad because it took six different Microsoft programmers and almost six months of time to discover the answer. Apparently, Visual Studio 2010's IDE behaves significantly different than it's Visual Studio 2005 counterpart. When running an application in the IDE, VS2010's hook into the running executable actually hinders the applications performance considerably. There is a hidden option (not found in the menu structure) to run the application without the debugger attached. The hotkey is CTRL+F5. When the application is run in this mode, our performance issue vanished. It's such a silly and simple answer...but the two things that make me feel better is that VS2005 did not have this issue, the "run w/o debugger" options isn't listed in the menu at all, and it took six Microsoft programmers to determine this was the issue.
So for anyone else that seems to have this same issue...try CTRL+F5. :-)

Visual Studio Conversion Wizard: Why put it in if it is broken? Whats the point?

I have tried converting many projects from vb.net 2005 to vb.net 2008, and not a single one has ever made it. Why do you think they even bothered to include this tool if it is very clearly broken? I mean, it can convert some code okay, but I can never load Design view properly, and it'll almost never compile without error.
Whats the point in putting in a broken tool? I thought Microsoft products were always backwards-compatible? Do they have any requirements before running the wizard?
Generally projects won't compile because the compiler/language/environment has changed, not because there's anything wrong with the project files.
I typically use vspc to convert project files, but I'm usually converting them from vs2008 to vs2003, which Visual Studio cannot do.
I've never had any trouble with the conversion wizard, but I mostly use C#.
What specific errors do you get?
Also, do you mean from VB6? If so, here's the answer:
VB6 and VB .Net (any version) are quite different. The VB Upgrade Wizard will try to convert what it can, and show you exactly what still needs work.
If the conversion tool is actually broken (I've had mixed success using it in the past, with the success rate being inversely proportional to the overall complexity of the project), then one reason to include it anyway is to convince developers to start new projects using the latest version of Visual Studio, and not to start them with an older version and hope that the upgrade process will be seamless.
I'm not saying this is why Microsoft would include a broken conversion wizard, but you never know. If you'd like me to delete this answer, Mr. Ballmer, just let me know.

An alternative IDE for Sybase Powerbuilder

Does anyone know of an alternative IDE for Sybase Powerbuilder? It feels pretty clunky, after working with VS2008 and Eclipse.
If not, has anyone successfully worked with this language outside the IDE? I'm not against using a simple text editor, but I find edit-import-regenerate-test-export-edit is clunkier than simply using the Powerbuilder editor.
To date, the only tools I have had any success with are:
PowerGen, for builds (with NUnit and CruiseControl.NET)
ConTEXT, which has syntax highlighting for Powerbuilder
PBL Peeper, which has some interesting features not present in the IDE
EDIT: I added a bounty to draw some wider attention to the question. It would be a very nice thing to have, if it exists.
EDIT: Well that was disappointing. The bounty apparently did not cause even 1 new person to look at the question.
None that I'm aware of, although you could probably use a source control tool, edit in your source control repository, and Get Latest Version from the PB IDE to shorten your text editor cycle. Be warned that there are hacks required to edit anything over 128 ASCII. (My guess is that this is to allow everything Unicode to be source controlled in the most restrictive source control tools.)
As Paul said, PB12 is coming with based on the Visual Studio shell, and will include things like collapsible code blocks, Intellisense, etc.... However, for PB12, this will only be used for WPF targets and a few .NET-type targets (like assemblies), last I heard. Win32 targets will continue to use the "classic" IDE.
Good luck,
Terry.
P.S. Thanks for the PBL Peeper compliment.
The PowerBuilder IDE is clunky, but I don't think developing completely outside the PowerBuilder IDE is a good idea. I think there are just too many dependencies right now.
However, the IDE for PowerBuilder 12 will be built using Microsoft's Visual Studio Isolated Shell so it ought to be much better when that is released. Also, I believe they'll be doing away with the PBL format which ought to make source control much easier to work with.
Certainly something to watch.
What I do is right-click the object and edit source. Then I copy the text and paste it into Notepad++ to edit. I copy and paste back to PowerBuilder, then I can save and see any errors. I've got a fairly decent User Defined Language for PowerScript if anyone's interested.
Added:
Please be aware that I've seen the PB Source editor corrupt DataWindows. They were all large DataWindows. To be safe always export DataWindows to edit.
One tool that will most probably make your PB experience way better is Visual Expert, which provides a good source browser. Such a tool should have been integrated into the PB IDE a long time ago, IMHO. Only problem is that it's not free, as opposed to the other tools you mention.
Regarding using external source editors, you can probably take advantage of OrcaScript, which is a scripting language that lets you perform actions such as export and import of PB objects from outside of the IDE. It will require some effort, but you can setup a basic dev env using batch files with ORCA scripts and some additional external tools. However, this setup will lack any visual editing capabilities, which means no (feasible) GUI or DW work. If you're mostly into NVOs, it could work. But then if that's the case, why use PB in the first place?...
I too have heard PB12's use of VS will be limited to some .NET stuff, which will probably benefit only a very small portion of the PB programmers community. I'm afraid the rest of us are stuck with the awful IDE for years to come.
Other than exporting the source and editing it I don't know of another IDE for PB. One problem you may have is that the exported source contains a lot of syntax that is not documented in the manuals. The PB IDE generates this code but there is no support for creating it by hand. I think you are stuck with the PB IDE
In my modest five Years of experiences starting with Powerbuilder 5/6, now using PB 10, I tempt to :
build my own browser from the classdefinition object based on Powerbuilder
tried to use autohotkey in order to open datawindows comfortable (we have several thousands in the project and i am two-finger-driven)
truly investigated in the idea using an external editor/IDE suppoted by an autohotkey script which is undermined by sybase allowing only mouse-click-usage of PB
using Visual Expert which is neither a truly integration in the IDE, nor is really worth in analyzing datwindow/powerscript interaction
ending by build hopes on PB12 Visual Studio, which lacks - depending on compatibility issues - ...
... i came to the conclusion that there will be no chance in improving Powerbuilder to an state-of-the-art language
In my philosophy - I obtained during those years - I distinguish between two types of OOP-oriented languages:
the one that award using object-orientation like C#, Python, Ruby (C++) etc. and very much the Java-Eclipse/Netbeans-Universe does
the other one that punish using object-orientation like Powerbuilder and the old Visual Basic, for example (which is causative the OOP-Idea comes afterwards and is "plugged in").
Especially the demand that all object should always be compiled (regenerated) and that you could't work with ancestors and descandants concurrently makes it painful to use real OOP.
...In memory of the good old Unix(Solaris)/C++ days...
I was researching a replacement solution that would be similar to PowerBuilder and I came across two that caught my eye.
The first was 'React Studio' https://reactstudio.com/ which I found via Alternativeto.net .
And the second was from an ad at the top of some Google searches but it was similar enough and looked good enough at first glance for me to want to take a closer look at it, and it's called 'Servoy' https://servoy.com/ .
Still researching but I currently have React Studio at the top of our list.
The TextPad editor has a syntax definition file for PowerBuilder 6.x contributed by anr#aon.at that I downloaded for free and customized several years ago. It works fine for later versions (including 8), doing keyword color highlighting on PowerScript srx files. Editing large source files in PB could get it to crash so it's usually safer, faster and more convenient to export to srx file, edit outside the IDE then re-import.