How to create SharePoint 2010's site column through Visual Studio 2010? - visual-studio-2010

I was trying to create lists, content type and site columns through Visual Studio 2010. There were options of adding content type and list instance but not of content type. So, I could not figure out how to add site column? What item do I need to add for this and what kind of coding is to be done for the same?

this resources may help you:
Walkthrough: Create a Site Column, Content Type, and List for SharePoint => http://msdn.microsoft.com/en-us/library/ee231593.aspx
You may also try SharePoint Designer 2010 instead of Visual Studio 2010

You can use CAML but I wouldn't recommend it. The better way is using object model and feature event receiver. An complete example is quite long, here is the link http://zhouyupublic.blogspot.co.uk/2012/11/create-site-column-and-content-type.html.My
My recent favorite way to do the same is using PowerShell. But since you ask about how to do it with VS, it is outside the topic here.

Related

How to show all function prototypes of a C++ file in Visual Studio?

I am using Visual Studio 2013 and I want to show all the function prototypes that I have in a file at one glance!
Just promoting my comment to an answer:
you can try extensions like:
VS10x Code Map
Im using it happily for years with different technologies. The only drawback is that it takes a bit to map with huge files.
Alternative is just a class view (ctrl+W,C) panel in Visual Studio, but it's still poor, not very configurable and doesn't show much.

Visual Studio Add-in: How to get selected items in window

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.

How to turn on data compare in Visual Studio?

I am looking to compare two databases using the Data Compare tool in Visual Studio. I've found a number of articles on how to do that, but I cannot get to the Data menu they are referring to in all those articles.
I want to know if there is a way to turn the data compare feature on in VS, so that I can actually see the Data menu and then proceed.
I found that the way to do data compare in Visual Studio 2013 is by using:
Tools->SQL Server->New Data Comparison/New Schema Comparison.

How to toggle certain comments in multiple files in visual studio 2010?

I have an ASP.NET MVC 4 Website with multiple files(controllers) that have actions which accept [RequireHttps]. When I am working locally I want to be able to comment out all of these via a toggle/shortcut. I own CodeRush with Visual Studios 2010. Is this possible to do?
You could do a project-wide search and replace of [RequireHttps] to /*[RequireHttps]*/ or vice versa. You can record these as macros in Visual Studio.
Yes, this is possible. However, this task requires creation of a new CodeRush plug-in.

How Can I add additional functions to Visual Studio's Server Explorer?

I am trying to write simple Visual Studio Add-In for code generation. In my solution explorer window there is a database connection an I want to get table names from this active connection.How can I do this?
Example
This looks to be what you need.
I have done this using DDEX Designer. For more information you can see example from Get data sources, data providers and data connections from a Visual Studio

Resources