The opinions expressed in these materials are my own and are not necessarily those of Microsoft.
Copyright © Microsoft Corporation. All rights reserved. Unless otherwise indicated, all source code provided is licensed under the Microsoft Public License (Ms-PL).
Keyboard: CTRL + ALT + F1 (manage help); CTRL + F1 (view help)Menu: Help -> Manage Help Settings; Help -> View HelpVersions: 2010Published: 12/27/2010Code: vstipTool0120
Work with SharePoint? Then make sure to check out the new SharePoint Developer Team Blog!
So, I have to admit I don't like the new online help in Visual Studio 2010. Not that I think it bad per se but I was just use to the old help system look and feel particularly the contents list:
If you are like me and want to get that classic look and feel back in your help you need to do two things:
First, you will need to set your default help to online help (you will need Internet connectivity to use this feature) by going to Help -> Manage Help Settings then click on "Choose online or local help":
Select "I want to use online help" and click OK:
Using Classic View
Now that you are using online help. Go to Help -> View Help:
In the upper-right corner of the page look for the "Preferences" link and click on it:
Choose "Classic" and click OK:
You are all set! Now you will have help with the old-style contents list:
Keyboard: SHIFT + ALT + NMenu: File -> New Web SiteCommand: File.NewWebSiteVersions: 2008,2010Published: 12/28/2010Code: vstipEnv0058
Did you know you can create Web Applications and Virtual Directories in IIS from inside Visual Studio?
Just go to File -> New Web Site and click on the Browse button:
Choose "Local IIS" and pick a web site you want to create the new item in:
In the upper-right corner of the dialog you will notice buttons:
One creates a Web Application:
The other a Virtual Directory:
You can pick which one you want to create and never have to leave Visual Studio.
Keyboard: CTRL + ALT + SMenu: View -> Server Explorer; Tools -> Connect to DatabaseCommand: View.ServerExplorer; Tools.ConnecttoDatabaseVersions: 2008,2010Published: 12/29/2010Code: vstipTool0121
Server Explorer is the server management tool window that comes with Visual Studio. One of the things you can use this window for is to open data connections:
Data Connections in Other Areas
The data connections you have in Server Explorer can be used in other areas like ADO.NET Entity Data Models:
When you go to create Entity Data Models that are generated from a database you will be able to choose from the data connections you already have or to create a new connection to be added to the list.
Data Connections in Server Explorer
Did you know there is an incredible amount of power and control that is available here? We will look a a couple of them as an example.
At the most basic level you can list out the tables in the database. Additionally, you can RIGHT CLICK on any table and see most of the features you can leverage:
Notice that you can add a new table, create a new query, or just show the data in the table among other tasks.
One of the great database features in Visual Studio is the ability to not only create and edit stored procedures but also step into them as well:
Don't take the Database Connection features in Server Explorer for granted. Explore and try them out for yourself!
Keyboard: CTRL + ALT + SMenu: View -> Server ExplorerCommand: View.ServerExplorerVersions: 2008,2010Published: 12/30/2010Code: vstipTool0122
Work with SharePoint? Then make sure to check out the new SharePoint Developer Team Blog!
I think we take Server Explorer for granted for the most part. It's the tool window that we use for data connections (see vstipTool0121 http://blogs.msdn.com/b/zainnab/archive/2010/12/29/server-explorer-data-connections-vstiptool0121.aspx) and that's pretty much where the experience ends for most people. But why? This unsung hero really does a LOT more if you let it. For example, the Servers section comes with a lot of power that you may not even know existed.
To get started it comes with the local machine already in the list of Servers and you can add additional servers as needed:
Don't be too fooled by the term "Server" as it really means any computer you want to connect to for information. In these examples my "server" is a Windows 7 machine.
Once you have a server that you want then you can start working with tons of features. The Event Logs section is a perfect example. Here is what is on my machine for Event Logs in Server Explorer:
You can use this area to launch the Event Viewer if you need it:
Or take a quick view events in any of the various categories:
Click and Drag Components
The event logs can even be dragged onto a Windows form or component class design surface so you can manipulate them:
NOTE: You can get more information here http://msdn.microsoft.com/en-us/library/84s2c1k0.aspx
Keyboard: CTRL + ALT + SMenu: View -> Server ExplorerCommand: View.ServerExplorerVersions: 2008,2010Published: 12/31/2010Code: vstipTool0123
The Management Classes in Server Explorer give you a view into the system. For example, you can use management classes to see network shares:
You can also RIGHT CLICK on a node and choose "Create" to make a new instance:
Unfortunately, you get a really ugly and unfriendly dialog box to use when you do this:
One better way to work with the Management Classes is to RIGHT CLICK and generate classes:
This will give you a class you can leverage in code to work with:
The management classes can also be dragged onto a Windows form or component class design surface so you can manipulate them:
Most of you know I don’t “do” advertisements for the most part. I try to keep the blog clean but there is always the exceptional item that comes up that I feel really benefits readers. The Claudio Lassala Virtual Brown Bag sessions are that exception. I know Claudio personally and he is just awesome. Not only that he is awesome without the ego which is extremely rare these days. Make sure to check out his Brown Bag Sessions here:
A friend of mine, Rob Bagby, has started a training company that has some great stuff! Here is an example:
Every application we write accesses data from a database and in most of these apps, we want to work with our data as objects. In smaller, one-off apps, our object model can look very similar to our data model. However, in most cases, our object model looks vastly different.
We used to spend a lot of time writing "plumbing" code that allowed us to fetch data, materialize it as objects, as well as save changes to our objects back to the database. That should be a thing of the past. There are a host of technologies today that encapsulate this functionality and more: NHibernate, Entity Framework 4, LINQ to SQL, LLBLGen, etc. Entity Framework 4 is Microsoft's long-term solution in this space.
EF4 exposes a massive amount of features and services. Off the top of my head, some of these include the ability to:
EF4 handles all of these things and much more. But with all of these features comes complexity. The Entity Framework is huge and takes a large time commitment to understand… until now. Rob Bagby, a former teammate of mine, has released an online training class called "Understanding Entity Framework 4". In just a few short days, you can be exploiting the Entity Framework in your applications. If you are interested, Rob has given me a coupon code to distribute that will discount the price of the training from $499 to $299. The code is: UGYAOHI8 . Good luck!
For those that have been with me for a while this will be familiar territory: we have blog issues going on. It appears that in early December (possibly earlier) there were some problems with comments not getting posted and other weirdness. Now it looks like my redirect for http://blogs.msdn.com/VisualStudioTips has gone awry. We are currently trying to get the problem fixed and hopefully will have things put back in order soon.
In the meantime, if you submitted a comment and it didn’t get published just know I wasn’t blowing you off. Feel free or try to post the comment again and shoot me an email to let me know you posted it (firstname.lastname@example.org) so I can make sure it gets posted. I never edit or stop comments unless they are spam links or have excessive cursing, etc… So 99.99% of all comments should get posted. Always let me know if you don’t see your comment get posted within 24 hours.
To make it easy for developers to make sure they’re getting all the latest technical information around developing SharePoint solutions, the SharePoint, Visual Studio and Office User Assistance teams have decided to combine their blogging efforts into the SharePoint Developer Team Blog. Think of it as your one-stop shop for developer-centric SharePoint information, straight from the product teams and user assistance folk responsible for SharePoint Foundation, Server, SharePoint Online, and the SharePoint development tools in Visual Studio.
Here’s what you can expect from this blog going forward:
· Detailed technical information on SharePoint development, such as walkthroughs and code samples, from the people who designed those product features and tools
· Early, first-look versions of content being prepared for publication to MSDN
· Cross-posts and pointers to SharePoint-centric developer content on other specialized blogs
· Announcements of interest to SharePoint developers, such as content updates, service releases, or developer events.
So we’re hoping you’ll subscribe, and pass the following easy-to-remember URL on to your SharePoint developer friends and colleagues:
And if there are particular things you’d like to see covered or discussed, by all means leave them a comment.
Happy New Year everyone! Wow, what a difference a year makes! When I started this series a year ago it was inconceivable to me that I would wind up doing a post every day for 365 days consecutively. But here we are a year later. A lot has happened in the past year. So I thought I would touch on the big things that have impacted me this year:
I decided to take on the Visual Studio Tips and Tricks from Sara Ford. Back when we discussed it I thought it would be very easy to just redo her old tips in VS2010 and come up with some new ones along the way. I was very wrong on that score. Every single tip has been revamped in some way and, as you have seen, there are tons of new tips that were never in the original set from Sara. It has definitely been interesting given the daily pace and the injection of new or updated information in the tips body of work.
Sara and I signed a book deal and are almost finished submitting the chapters to the publisher (MS Press). We weren’t even sure a new book was a good idea at first but realized that there was so much changed information that it seemed to make sense. Sara is making sure the tips work with VS2005 and writing two chapters on Extensions. I am responsible for the rest of the book (around nine chapters) and coming up with a new format to convey the information more quickly and easily. We are working very hard to make sure the book is worth adding to your library.
As I am sure everyone knows by now, Sara left Microsoft a few months ago. She has gone to a great new job and, I am happy to say, it has had no impact on our timeline for delivering the book. She and I have become good friends and her dedication to the community is beyond compare. I expect we will be collaborating on more great things going forward.
Another interesting thing that happened was you made this blog the number one blog among all the Evangelists in the Unites States. I knew people liked the content but really didn’t understand the true popularity until I was told about the ranking. Thanks for reading and keeping me honest as we journey together through Visual Studio.
Finally, I have come up with a plan for going forward: I am going to take it a little easier this year and just do one tip a week. I’ve decided that Tuesday is the best day to publish new tips so I’ll call it “Tip Tuesday”. In fact, later tonight, I will put out my first tip for the year and then begin my normal publishing schedule of weekly tips.
Additionally, I have decided to also branch out into videos. Once I get set up, look for me to publish a weekly video on the top tips that have been previously posted. I’m still working out a few kinks so don’t expect the videos until probably late Jan or early Feb. I will, at that time, post videos to get caught up with doing one a week for the year so the first post will be several videos then one a week from then on.
That’s pretty much it. It’s time to begin 2011 and say goodbye to 2010. I hope we all have a great year and can’t wait to see what the next year brings. Keep coding and make sure to hug your Visual Studio today! :)