At this new company I joined there is a very big and huge multi solution product that I'm working on.
So sometimes when I'm looking through the source i have an interface that has an implementation that is within a project in another solution and when I Ctrl-F12 click that interface I get a "The symbol has no implementations." dialog box from Visual Studio, because it can't find the piece of code where the interface is implemented in.
Is there any way of like telling Visual Studio to just look in some specific directory for the code it's looking for without having to put everything into one giant huge solution that makes Visual Studio explode? I tried that btw and Visual Studio exploded.
While debugging the software there's no problem with the navigation because the debug symbols contain the paths to the source and stuff (if I remember that correctly).
I'm also using Resharper so if there's anything that Resharper can do to help there I wouldn't mind either.
Related
Let a "Breakpoints" window (by default opened by Debug>Windows>Breakpoints [ctrl+B, D]) serve as an example. Basically I select few breakpoints in it and I would like to know in my add-in which elements in this window are selected. I am aware that I can get collection of breakpoints in project but I would like to know what elements are selected in "Breakpoints" window.
"Is it possible to get selected items in window or even access its content at all?"
Also I am not sure whenever or not should I post a separate question for this but is there actually a way to capture user activity in IDE like for example capturing an event when user sets (adds) a breakpoint?
Originally I also asked if is it possible to achieve certain things in Visual Studio Express Edition. But this part is irrevelant.
Conclusion:
(after reading jessehouwing's answer)
I guess it is not possible using an Add-ins. Use VSPackages isntead. Also Add-ins are deprecated as of Visual Studio 2013 version.
As mentioned in my comments, what you're trying to accomplish is explicitly prohibited in the Visual Studio Express edition and is a violation of it's license. To extend the product, you need to have at least Visual Studio Professional Edition. many of the extensibility points will actively refuse any communication with 3rd party add-ins.
Almost all the things you're asking are possible using Visual Studio Extensibility once you've installed the professional edition. Products like OzCode show that almost everything is possible. Remember that most features inside visual studio are themselves extensions of the product.
Your question, indeed a whole list of questions, is indeed not the way to ask something on StackOverflow. I can give you some pointers to the documentation, which you've probably already found, and maybe to some open source products that themselves extend parts of Visual Studio that can serve as examples, but from there you'll have to piece something together until you're able to ask more specific questions.
Events you can subscribe to, the breakpoints are a CommandEvents I suspect.
Manipulating windows inside Visual Studio
Projects that extend the debugger that might serve as an example:
PyTools (debugger for Python inside Visual Studio)
Node.js tools for Visual studio (extending the Immediate Window)
But there is no easy answer to your question that fits inside this window. I'd suggest you use a tool like Reflector to look at how Microsoft accomplishes certain things (most of Visual Studio Extensibility is written in .NET anyways) and to look at open source projects that extend visual studio behavior. There are quite a few out there on Codeplex.
I'm not entirely sure what you're trying to accomplish and how it's different from the Breakpoints features inside Visual Studio Professional and up.
I suggest you ask your question in the Visual Studio Extensibility forums over on MSDN, which is in a collaborative forum format, instead of a Q&A format, allowing people to answer your question bit by bit.
I've created a visual studio extension with some nice refactoring features via a Code Refactoring (CodeRefactoringProvider) roslyn project, but there isn't really anything to it in terms of adding tooltips or menu items or doing something on startup.
If I wanted to do something like add a settings menu or tell the user that they're on a trial version, how/when could I even do it? Even though I'm working in a vsix, events don't seem to be exposed anywhere.
Do CodeRefactoringProviders run in a bit of a sandbox? Because I like the way it consumes my class, shows the user a preview and it fits into the editor amazingly, but of course I'd like more control because after all, the root of what you create is a VSIX which can do almost anything in the visual studio environment.
I'm sure I could limit the # of refactorings and show a popup.. but I'm fairly certain people would send death threats.
You can add other elements in just the same way you would in any other vsix in a Roslyn vsix. There are various ways to do this, such as creating a Visual Studio Package, using an ITextViewCreationListener, etc.
One sample that I created showed how to integrate a Tools Options page with a Roslyn code issue at http://code.msdn.microsoft.com/windowsdesktop/Roslyn-Code-Issue-with-84d792dd.
Is there a way to navigate between two Visual Studio Solutions?
For instance, I have two solutions: One with a various utility code and one comprising my actual app. When I hit F12 in the app solution, I am taken to a 'metadata' file, with function definitions only. Ideally, I would like to taken to the file in another instance of Visual Studio with the utility solution open.
Currently, I copy the thing I am seeking a definition on, then switch to the other instance of visual studio and conduct a search. Just curious if there's a faster way of doing this.
Not as far as I know. The only workaround that I know is to add the "utility" project(s) to your app solution. If you don't change them much VS won't try to recompile them all the time, and you'll have access to the code.
Using ReSharper and presumably a combination of the debug PDBs (generated with your Utility class build) then you're able to get right into the source of your libraries using F12 without needing to go to the other instance.
I am a student & am newly introduced to the Microsoft Blend.
Its something really impressive & makes me design happily.
But I am facing a problem: Its fine about the designing part but what about the coding?
Where are we suppose to write the code? I mean how are we to import that file into Visual Studio 2010.
Please do tell me the solution ? I have been looking out for resources nearly everyday.
But its still in vague.
Thanking you.
Expression Blend is a tool meant for designers so it does not really focus much on features for writing code. It is actually designed to inter-operate well with Visual Studio and you should be able to just open any Blend project or solution in Visual Studio and do your coding there.
In fact, I often have both tools open at the same time with the same project open and it makes for a pretty smooth workflow. For example, if I make a change in Blend and then switch to Visual Studio it will prompt me to reload the changes.
If you have Visual Studio installed the easiest way is to click on a file inside the Projects tab and then choose Edit in Visual Studio (see image). Once you do that VS will load the project / solution and open the file for you to edit your file and or add code to it.
Is there a way to tell Visual Studio 2005 to just ignore source control binding when opening a solution? I sometimes need to load a solution for which I don't have access to the source control server, but Visual Studio insists on trying to connect anyway, meaning I have to click "temporarily work offline in disconnected mode" for every project in the solution (of which there are about 20) as it loads. For some reason, it also tries to check each project out immediately after I've told it to work offline, so I have to click past that dialog box too.
As I will never need to edit anything in this solution, is there any way I can open it and have Visual Studio just ignore the fact it has source control bindings in it?
Edit: Ideally, I'd like a way to do this without having to change the project/solution files. They change fairly frequently, so I'd have to redo any changes every time there was a new version (otherwise I'd just unbind them once and it wouldn't be a problem).
Thanks for the replies so far.
The source control bindings are stored in Visual Studio solution file (.sln). For TFS for example, it contains a global section for TFS information and the solution projects added to TFS. You can edit the solution file to remove these bindings manually. I would suggest making a copy of the solution file first. However, I would recommend removing bindins via Visual Studio. Open your solution and go through the offline scenario. Then go to File/Source Control/Change Source Control (VS 2008) to bring up the UI that shows you the source control bindings in your solution. There you can manage the bindings including unbinding them. Once unbound, the next time you open the solution, VS should not have a need to access the source control.
I've been looking for a way to disable Integration between SourceSafe 2005 and Visual Studio 2008. We are forced to use SourceSafe being in a corporate environment and all. SourceSafe is fine on its own if you treat it like a baby. As soon as you try to do anything approaching useful it starts to break. God forbid you try to use the integration with Visual Studio. Being that I didn't want the "Bindings removed" so that it doesn't confuse other devs on the team I needed to be able to tell Studio to ignore the solution and project bindings and continue on it's merry way.
I followed the registry hack suggested in the following post
Removing SourceSafe Integration from Visual Studio 6
Studio did what I wanted...sort of. It removed the SourceSafe integration. However when I opened up a source controlled solution it asked me if I wanted to remove the bindings.
"the projects will be treated as not under source control"
No I don't want you to remove the bindings from the files, I want you to IGNORE them. This dialog pops up every time you open the solution/project file and there is no way around it.
My solution at the moment seems to have worked...for now.
File->Source Control->Change Source Control...->Disconnect
I hope this helps anyone else in the position of having to use SourceSafe but can't remove the bindings from the files themselves. WHY, Microsoft, WHY would you put the bindings in the files themselves?
/rant