Visual Studio, GitHub/NuGet source and Symbol server - visual-studio

I use Visual Studio for everyday work and I would like to have similar functions to Rider/ReSharper. Specifically, I was wondering if it was possible to make sure that when I press F12 on a .NET object I see the source code. For libraries downloaded from NuGet it works but not for .NET objects. Also I would like to have the real-time IL code generated by Roslyn.
Thanks everyone for your replies.

Related

Register for COM Interop Always Runs in Visual Studio 2012

I have a solution with several projects that have Register for COM Interop checked.
I have a Visual Basic 6 project that references the resulting TLBs. One issue with VB6 is when it references a dll/tlb, it puts a lock on that file.
Using Visual Studio 2010, unless I'm doing a rebuild or have made a change to one of these interop projects, I can build/run the solution (with the VB6 project open) without it barking that one or more of the assemblies is locked.
However, using Visual Studio 2012, even on a simple build where nothing has changed, apparently it always does the regasm, which makes it impossible for me to debug my VB6 project.
Is this new feature of Visual Studio of running regasm on build something that I can turn off?
EDIT: Allow me to simplify:
Using Visual Studio 2010, I hit Build-->Build Solution and check the output for one of my assemblies that is marked as Register for COM Interop and the file has not changed.
Using Visual Studio 2012, I do Build-->Build Solution and check the same assembly, it has been updated, and does so every time I hit Build Solution.
I want the behavior in Visual Studio 2012 to work the same as it did in 2010.
EDIT (again):
I posted this to Microsoft Connect. If someone answers it there or posts a workaround, I'll urge them to also post the answer here.
I've always encountered problems like this when running VB6 and VS20XX, but I always did a rebuild. My suggestion is to stop using VB6 for testing purposes. I found it was far easier to simply create a testing project and do all of my testing in .NET on my .NET code. This should only require a small amount of set up, but it is well worth it in my opinion.
I know this isn't an answer to your specific question, but it offers an alternative. As far as the problem you are describing, I can't duplicate a change in behavior. I start off with only VS201X open, full solution rebuild, open VB6 and add a reference to an exposed COM DLL. I didn't notice anything unexpected.
Build works fine as long as I haven't changed anything in the COM DLL
Build fails if I changed the COM DLL's code as the file is locked
Rebuild fails as the file is locked

Issues debugging Moles

I’m using visual studio 2008 and moles version 0.93. Everything works well except when I try to debug any test that uses a Moled type. The test skips all my breakpoints. And I get the following message in the output window:
Unable to attach. Check for one of the following.
The application you are trying to debug uses a version of the Microsoft .NET Framework that is not supported by the debugger.
The debugger has made an incorrect assumption about the Microsoft .NET Framework version your application is going to use.
The Microsoft .NET Framework version specified by you for debugging is incorrect
Please see the Visual Studio .NET debugger documentation for correctly specifying the Microsoft .NET Framework version your application is going to use for debugging.
If I try debbuger.Break () I get a message: "No symbols are loaded for any call stack frame. The source code cannot be displayed."
I’m in a crunch right now chasing an issue with one our main components and it has been a pain (like I need novocaine) trying to figure anything out without being able to step through the code.
I want to take advantage of mole's "smooth debugging experience". However, I can't seem to get the debugger to attach at all.
Thanks,
Bzz
See the solution to this issue here:
http://social.msdn.microsoft.com/Forums/en/pex/thread/91c08bf4-3260-458c-a221-91f030a75499
I had this problem when I moved a project from Visual Studio 2010 to Visual Studio 2008. Here's what I did to fix it.
Close Visual Studio. Navigate to the Debug/bin location. Delete the following files:
*.vshost.exe
*.vshost.exe.config
*.vshost.exe.manifest
Open the solution. Goto the project Settings. Under the Application Target Framework, select a framework lower than the one you are working with (you'll set it back later). Visual Studio will close and re-open your project automatically. Then set the Target Framework back to the original version you were working with. Rebuild all, and debugging will work properly.

Extending the extension manager

I want to extend the extension manager in Visual Studio 2010. I'd rather know if that is at all possible before I get into it, but am unable to find anything about it.
All the extensibility options I've read about mention nothing about being able to actually change the function of an existing VS2010 tool like the extension manager.
I'd appreciate any relevant links.
There are no supported interfaces for extending the Extension Manager in Visual Studio 2010.
What specifically did you have in mind though? Perhaps there's some other way you can accomplish what you're trying to do...

No IntelliSense for C++/CLI in Visual Studio 2010?

I just moved from Visual Studio 2008 to Visual Studio 2010 (final) and noticed one major flaw:
When I try to use AutoComplete in a C++ source file for managed C++, a small note in the footer appears:
IntelliSense for C++/CLI is not available
Uh, has IntelliSense for C++/CLI been dropped from Visual Studio 2010? Is there any way to get this back? It is rather useful...
You are correct. Unfortunately it has been dropped. You can check this opened issue on Microsoft's Connect website.
I'll just quote them for the sake of the answer:
Unfortunately in this release we had to cut the intellisense support for C++/CLI due to time constraints. If you want to get some intellisense like quick info and memberlist on the native classes you can get it by choosing no /clr support in the project properties.
About getting back intellisense, your best chances for now are using third-party tools like VA Assist for example. I've tried it with Visual Studio 2008 and its IntelliSense is a whole lot better than the default one.
It is available again in Visual Studio 2012.
If you want to get IntelliSense back, install Visual Assist X from Whole Tomato Software. Here you can get a 30-days trial to check the intellisense.
According to the Visual C++ Team Blog, C++/CLI Intellisense will be in the next version of Visual Studio, but not in a service pack for VS2010. That blog post also gives some detail as to what went wrong and led to this sad state.
I don't know if you can use this settings but it work for me. I only check the Common Language RunTime Support for the cpp files that use it. I do not check it for the whole project and I've got intellisense for all the files that don't use the CLI.
Yes! you can enable the IntelliSence, but in a tricky way. Follow these instructions:
Go to your project properties. (Right click on your project name in
Project Explorer, and select Properties. or simply Alt + Enter)
From Configuration Properties, select General
In the right-hand section, find "Common Language Runtime Support"
and change it to "No Common Language Runtime Support".
Click the OK Button.
Now the IntelliSence is working. But a problem is an error when you compile your code! (The error is: error LNK1123: failure during conversion to COFF: file invalid or corrupt)
You can simply go back to Project Properties an change Common Language Runtime Support to "Common Language Runtime Support, Old Syntax (/clr:oldSyntax)".
Good luck.
This solution is only if you don't want Common Language Runtime
It worked for me in VS2010
Go to Project Propreties > Configuration Properties > General > Common Language Runtime Support and set it to No Common Language Runtime Support.
This will work fine just after hitting Apply button.
As mentioned you could install some paid software such as "Visual Assist X from Whole Tomato Software".
or
You could use open source tools that contain intellisense*, one such tool is Qt Creator 3.3.1 (opensource). You have two options, either setup your entire project with Qt to compile using VS2010 compiler, or use Qt to link to your source files and compile with VS2010. You write your code in Qt, save, flip windows to vs2010 and compile and debug.
When changes are saved in Qt, vs2010 will automatically reload the source file in the project and you can compile.

Visual Studio 2008 Plug-in / Add-in development - Getting Started

In relation to this stackoverflow question, how would I go about creating my own Visual Studio 2008 plug-in?
I've checked the Visual Studio Developer Centre on MSDN, but the amount of info is overwhelming. There are loads of project types, and I don't even know where to start.
Where should I start looking if I want to write something which meets the following requirements:
A plug-in that runs like a "service" in Visual Studio, and is able to poll Visual Studio for information, and handle Visual Studio events.
The info I'd like to access from VS are things like, what projects are currently open, who has them open, and other solution/project file based info.
The events I'd like to be able to handle are things like, the opening/closing/editing/creating/deleting of Solutions / Projects / individual files.
I'd also like to be able to handle any interaction with VS on a per solution basis. So, I'd like to handle any interaction with files, even code editing, but also, just other interaction, like with the menus, or just the IDE itself.
As well as these, I'd also like to be able to store data somewhere. Where is this usually done? Can I add Metadata to the Solution file? Or, does it make sense to save this info to a small local instance of a database, that is somehow attached to the solution..?
I just need a push in the right direction, is any of this possible? What part of the Visual Studio Developer Centre should I focus on? What APIs should I check out?
cheers!
An add-in can do most of that. There's a template in VS2008 for creating a base add-in.
I have an add-in that you can download that hooks into the solution/project load events etc - it is free and comes with source code ( http://www.huagati.com/projectloader/download/huagatiprojectloader.zip ). This particular add-in detects when projects/solutions are loaded and pre-loads referenced assemblies to work around a CLR bug that can cause VS2008 to crash. Anyway, the source code for it shows how to detect some of the events you're looking for.
Other than that, the definitive resource on add-in development and all the little quirks and tricks involved is Carlos Quintero's blog ( http://msmvps.com/blogs/carlosq/ ) and the "howto" article series on his website ( http://www.mztools.com/resources_vsnet_addins.aspx ).
Craig Skibo's blog ( http://blogs.msdn.com/craigskibo/ ) also has some useful tips.
You want:
Visual Studio Extensibility Developer Center
VSX Forum
Visual Studio 2008 SDK
Professional Visual Studio Extensibility by Keyvan Nayyeri
Buy the book, if nothing else.

Resources