CUDA 5 and Visual Studio 2010 intellisense error - visual-studio-2010

I have installed CUDA 5 toolkit (32 and 64 bit as that seemed to work) and have made a CUDA runtime project in VS 2010, it compiles fine and runs but I get a red line under the call to the CUDA function.
It isn't a massive deal but it is a little annoying, is there any way to remove this? I'm guessing it is some project setting or some such but I have no idea and neither does Google.
I have attached a screenshot so you know what I am talking about.
Thanks for reading this, I appreciate it.
Kevin

From a combination of the answers above (thank you) I have the answer to this question just in case anyone else stumbles upon it.
Basically this is not a compile error, or even an error at all. It is a problem with intellisense and from what I can see, nothing can be done about it, just have to live with it, or hope that one day they add a little more support.
The <<< >>> is the problem and is not correct C++ syntax according to intellisense which favours the C++ compiler. However that code it compiled by the CUDA compiler which intellisense couldn't give a damn about.
I could probably go into more depth about it but read the above comments and search this site as suggested and you will understand.

Related

VB6 Decompiling Problems

I got to decompile a VB6 dll, got a decompiler (actually tried 4 of them), even paid for a pro license, but of course I ran into a problem: the retrieved code doest even look like the previous one and it looks like a lot of information is lost. I do understand it's a one way road, but maybe someone could technically explain to me why VB6 compiled dll loses some info in machine code which cannot be retrieved later on in the decompilation process?
This is not possible to do unless the code was compiled with the option to compile to P-Code. For example, if you look at http://www.vb-decompiler.org/ it clearly says that it will only work with the P-Code.
The issue is that VB6 by default will compile to machine code which doesn't translate to VB6. You may be able to get the UI back because this is not code, but aside from that you are out of luck.

Installing a Custom Visual Studio Language Service

I've written a new Visual Studio language service for my software studio's internal scripting language following the directions from a very useful article Writing Your First Visual Studio Language Service. I've got my grammar working great, some simple goto cases up and running, and text coloring. I've done my testing both in the Irony GrammarExplorer and the Visual Studio Experimental Hive, and I feel I'm ready to use it normally in visual studio and deploy it out to a few other programmers for some early testing and feedback.
The problem is I don't know how to install the language service. I have this nice little DLL that works in the Experimental Hive, but no clue how to have it running whenever I start up visual studio. I've looked all over the internet and found that particular step is glossed over everywhere I look. Maybe I'm just blind, or it's much easier than I think it to be, but I'd really appreciate it if someone could give me detailed steps on how to install my language service.
Thanks in advance!
After getting the Tumbleweed badge on here I managed to track down the solution. There were a couple important bits people might find useful.
First off a PLK (Package Load Key) is needed. It can be generated here: http://msdn.microsoft.com/en-us/vstudio/cc655795.aspx
Be sure to make sure that all the information you enter is correct, and is entered into the Assembly for the dll.
The PLK is installed by adding to the rsx file for the solution, usually as item 104, and then matching that item number in the ProvideLoadKey attribute in your code.
Next testing the PLK is a bit of a hassle. Tips can be found here: http://msdn.microsoft.com/en-us/library/bb164677%28v=VS.90%29.aspx I highly recommend first using the /noVSIP switch with the experimental hive right from the start. I found using /log doesn't really help, it's much better to use the Package Load Analyzer once you've installed your package and are still having PLK issues.
A more detailed description from the package load analyzer can be done with this command line:
devenv /command tools.analyzepackage /analyzeargs {your GUID} analyzepkg.txt
Once you're satisfied and ready to deploy, there is a tutorial that seemed more buried than it should be over at MSDN http://msdn.microsoft.com/en-us/library/bb458038%28VS.90%29.aspx
One thing that I found was curious with the RegPkg tool found in the VS SDK bin directory was that it would cause my package to load fine in the development solution it existed in, but would not not load in other solutions. There appears to be an extra step to call devenv /setup which I was missing, and this is taken care of in the deploy tutorial I provided in the previous paragraph through the use of a Custom Action.
Anyway I hope this helps someone running through the same process as me.
One other thing that I spent a couple of hours bumping into that the MSDN tutorial doesn't mention: If you're deploying to a 64-bit computer, the instructions as given won't work. After quite a bit of searching, I stumbled across a posting halfway down this forum thread that explains it: http://social.msdn.microsoft.com/Forums/en/vsx/thread/989c5bea-3dd0-4e60-891a-f8f006e1b9a2
The MSDN tutorial says to install your registry keys here and regpkg.exe generates registry keys here as well:
HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\9.0\...
But on 64-bit computers, Visual Studio loads its settings not from there but from here:
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\VisualStudio\9.0\...
Notice that extra "Wow6432Node" in there; the registry keys are otherwise identical but for that extra "Wow6432Node" in the path. So on 64-bit machines, you'll either need to use those extended registry keys, or you can install a hybrid 32/64-bit .dll to both sets of registry keys without ill effect. I have a .reg file that installs to both sets of keys, and it works very nicely.
Hope this helps save somebody else some time!
(For what it's worth, I used the "Codebase" mode for regpkg, not the "Assembly" mode.)

Will Microsoft continue supporting C++/CLI?

I've found C++/CLI to be a very powerful language for wrapping C/C++ libraries with .NET.
I believe it's much better than using PInvoke for C for various reasons.
However, when I've upgraded my project to Visual Studio 2010, I've found that it has less support for C++/CLI.
Examples:
Targeting the 3.5 framework with the Visual C++ 2010 compiler is not supported. - Won't be fixed.
No coverage highlighting. - Should be fixed in next version.
No Intellisense - 501921, 459187, 455686. By Design!
Useless CA1811 warning. - Won't be fixed.
Uselss CA1806 warning. - Postponed.
Microsoft claims:
I want to make it clear that while we
can't address this issue, we reduced
support for C++/CLI only due to time
and resource constraints. This is NOT
an indication that we are distancing
ourselves from the technology.
But, C++/CLI never had really good support, and if the current version of VS has less support, what does the future holds?
I doubt anybody has a truly definitive answer, even (for example) Herb Sutter, who works as an architecture on Visual Studio. The problem is simple: Microsoft's direction is determined (largely) by market pressures and customers. If a lot of people complain long and loudly about the problems, Microsoft will probably see fixing them as important -- and see C++/CLI as more important in general. If few people complain, chances are pretty good that they'll assume few people are using C++/CLI, and it'll remain marginalized.
To an extent, I think it's a self-fulfilling prophecy: they never really supported it quite well enough to make it a viable alternative, so it's never gotten a lot of use. That, quickly results in vicious circle of fewer users leading to less development leading to still fewer users...

Is Visual Studio 2010 beta 1 usable?

I saw that Beta 1 of VS2010 was publicly availible.
My question to those of you who has tried it is: does it work good?
Will it cause my computer to blow up in tiny pieces? Will it crash randomly? Will it work with some minor glitches? Or is it just perfect from bottom up?
I'm only coding school- and hobby-stuff, so nothing that someones life depend upon, but i still want software that works. How close to a final product is it? Is it worth trying?
It's a bit slow, and there's no offline MSDN, but it's worth trying IMO. Having said that it's slow, I still use it on my NC10 netbook, so it's clearly not that bad :)
I've got it side-by-side VS2008, and that hasn't caused any problems.
I've seen a couple of glitches (once the keyboard handling went completely wonky) but it's certainly usable. The main question is what you want to get out of trying it - in my case I absolutely need to code against C# 4 to explore the new features. I do most of that from the command line in fact, where the speed of VS obviously isn't an issue, but it's nice to see the VS-specific features as well (like the debug threading views for Parallel Extensions).
It seems more or less usable on the .NET side. The C++ side is a bit more sketchy. On one hand, they've added support for some very nice new C++0x features, on the other, they've broken some absolute fundamentals.
Your plain old main function won't compile in 32-bit with unicode enabled. (Workarounds: Either compile as 64-bit, disable unicode, or rename the function to wmain).
This seems to me to be a strong hint that the C++ side of things is nowhere near release-worthy. I'd probably wait for beta2 before doing any serious work with that.
I would say it is great, but the performance hurts a bit.
Here is an idea for you: Install it into a VirtualPC. Then you can play and not care what it does. You don't like it, delete the VPC image and keep on trucking. That is how I play with Microsoft betas now. I never install them on any real machine - too risky.
Usable: Yes.
Recommended: Not if you'r a touchpad-addict or dislike crashing apps.
I've been trying it for 2 weeks now coding small C#-projects and these are my impressions
Reasons to use 2010:
Looks good
Multi monitor support
I can see myself using the code templating but right now i couldnt find any really useful stuff except for reducing the fontsize of comments.
Zoom in the editor
Select a variable and then press shift+up/down to go to next usage of this variable
Ctrl+, brings up instant search of classes and functions in the entire project. (i've become really addicted to this)
Floating watches for single objects
Reasons to not use 2010:
TOUCHPAD SCROLL DOESN'T WORK IN THE EDITOR!!! (this is reason enough to not upgrade if you are using it on a laptop)
I've had some random app-crashes in the middle of just writing code, once or twice per day maybe.
UI sometimes freezes randomly for about 30seconds and then returns to normal.
It started to use 100% CPU power from one of my cores once when it was minimized in basic editing-mode and i was doing other stuff in other programs, i only noticed it because the fan started to go wild.
Otherwhise it's pretty similar to 2008. I haven't noticed any difference in speed like other people say.
You need to ask yourself: what is the advantage for you in using VS2010 over VS2008? I would suggest that there is no advantage if all you are doing is "school- and hobby-stuff".
I'm still using VS2008 for business related stuff (and, indeed, VC6 for some stuff). I prefer to wait until all the early adopters have tested it (and Microsoft has released at least one service pack after the real product release) before I do their testing for them.
It seems to co-exist with other versions of VS without causing any problems.
Regarding the slowness - it seems to be the UI that is slow, rather than building. Once it's going it doesn't seem much slower on my fast quadcore. I've yet to try it on my laptop.
It's usable enough, the small glitches that I've encounter weren't that bad. However, certain VS extensions(like XNA) don't work in VS2010 at the moment.
It's fun to toy with. Not usable for me, cause re#er does not support it yet (had to install TestDriven .NET which works through keyboard shortcuts only to run my tests).
Gave me an insight how addicted I am. :/
Btw, on Win7, without virtual pc it seemed even faster than vs2008 for me.
VS2010 doesn't yet support mobile device projects, which might or might not matter to you.
VC++ wise - VS2010 has a built-in 64-bit compiler, VS2008 does not.
You can supposedly add 64-bit support to VS2008, but it takes some effort.
I've been using VS 2010 beta (with .NET 4.0 beta) on Windows 7 RC. I've been trying to rewrite parts of a large-scale business application in it to see what can be done with it.
The UI freezes frequently. I'm talking 1-10 minutes between freezes. The UI does not come back, so I'm forced to kill devenv.exe every time it happens. Microsoft probably puts my error reports in their spam folder by now.
For me, VS 2010 beta 1 classifies as unusable. However, it's fast, the new IDE functions are very handy, and it's pretty. I keep coming back to it despite my resolutions to wait for a stable build.

Pascal syntax highlight in Visual Studio?

I'm writing in C# the next generation of an old app originally written in Delphi. I often have to look in the old code and wondered if there's anyway to install Pascal syntax highlighting in the Visual Studio 2008 editor.
TIA.
I'm not an expert but you might want to look at Delphi Prism which seems to combine a Delphi compiler into Visual Studio. It might be overkill however.
http://blog.cumps.be/visual-studio-2008-and-php-coloring/ - maybe this could be adjusted from PHP for delphi/pascal
Planned project:
http://www.codeplex.com/Delphi4VisualStudio - this (one day) will support syntax highlighting (but it seems to be overkill too)
I know the guy working on Delphi4VisualStudio. The project doesn't seem to be active any more, but I know he had syntax highlighting working in the editor. You could always ask him for just that piece.
I could do it in about 1-2 day's work, but I'm busy trying to make ends meet (seriously). Let me know if you want me to do it.
Prior work (showing [almost] only the syntax highlighting):
Edit: Don't mark me down if this isn't allowed - just let me know. I'd seriously do it for free if I had any spare time at all, I just don't right now.
UnrealScript
INI Files
ANTLR grammars
StringTemplate templating language
Chapel

Resources