Today had a customer who was facing warning: RC4005/C4005 after installing VS2013 Update 3. They also had installed the Windows 8.1 SDK. Any new project created in the IDE showed these symptoms so this was not caused by existing code.
It turned out that his include file settings in project properties was causing this. It was missing a critical include…
We added above include as illustrated below and the warnings (RC4005/C4005) went away…
DataRepeater is great control to display data from a table/view, as the name says repeats bunch of fields from a dataset on every row. Follow these simple steps to get started working with this control…
Make sure you’ve got the datasets in place: Press Shift + Alt + D or View –> Other Windows –> Data Sources. See below screenshots of my Northwind dataset…
Drag and drop an instance of data repeater onto your win forms or a container control. Resultant form will look as follows…
Please note you’ve got to have the right version of DataRepeater in order for it to get displayed on the form designer surface.
Drag and drop fields from your data set onto this data repeater’s surface. Note that every field dropped on to data repeater will be a pair of control (Label followed by text field or any other control if the option is provided, in my case picture control). I’ve got the following fields dropped on to the control…
The size of the control at runtime will be the same as the one you’ve given on the designer, unless you’ve docked the control. Scrollbar’s will be provided by the control to scroll through the rows of data.
Now if I run the form this is what I see. You can scroll through as well. Quick way to display data on a form.
DataRepeater supports some other features as well, please go through the documentation to know more. Enjoy!
[Edited post for Visual studio 2017, I had written this post for Visual Studio 2013]
Visual Studio 2017 comes with a new feature called “Debug Managed Memory” this feature also allows to compare managed memory usage across two dumps. Read on…
This is how you would open a .net 4.5 memory dump in Visual Studio…
So for the purpose of this blog I’ve created memory dumps of a managed application that consumes high memory: memtest.exe. I’ve collected three memory dumps…
For demo purpose I’m opening MemTest (3).dmp ‘first’ as shown in the above screenshot. So once you open the dump in Visual studio this is how Visual Studio will look like…
Check out mouse cursor location in the above screenshot. Click on this option. You’ll see following dialog pop up….
Following which you’ll see the following screen…
This report will show the most number of objects on heap. If you noticed; the largest objects in my case are ArrayLists and second one is MemTest.Form1. This report will also show you the roots to an object, similar to gcroot in WinDbg.
Further in the above screenshot, I’ve highlighted an item in red. That option allows us to compare multiple dumps.
The resultant report will show you the diff view between the two dumps. For demo I’m comparing MemTest (3).dmp with MemTest.dmp. MemTest (3).dmp was collected after memtest.dmp was collected so you should ideally see a positive diff between the two dumps since memory usage increased in MemTest(3).dmp. Please see screenshot…
Now you’ll see that, new columns has been added to this report, for e.g. “Count Diff.”, ‘Size Diff (Bytes)” etc. The bottom table shows you the “Reference Count Diff.” as well.
Really cool feature! Comparing managed memory has been never easier. Please note this feature is only enabled for.net memory dumps that use .net 4.5.
[Update: This article is relevant for Visual Studio 2019/2017/Others as well]
Where’s the Visual Studio 2013 Visual Basic PowerPack?
Note the VisualBasic PowerPack is not part of Visual Studio 2013 install, it comes as separate MSI. The download link for Visual Basic Powerpack for Visual Studio 2013 is hard to find online as well. I found the link from our internal support article.
Back in Nov 2012, in Visual Studio 2012 Update 1 a new feature named Code Map was introduced in Ultimate edition. The feature allowed visualization of relationships in code. Here’s a short video that will help you understand the concept behind Code Map.
Beginning Visual Studio 2012 Update 2, Microsoft has extended Code Map with debugging support allowing us to visualize code relationship as you step through the code in debugging session. Consider the Windows Phone code below where on a button click event a call is made to a web service to request population for Pakistan. Once the result is obtained a confirmation message is shown to the user. However during testing we identified that the confirmation message is shown before the response is actually retrieved so we’ll debug the code with Code Map to evaluate the issue.
Code Map: How To?
To explore Code Map debugging feature, set the breakpoint on Button click handler and as soon as the breakpoint is hit, bring forth the code map window by either of following,
– By selecting Code Map button from toolbar
– Choosing Show Call Stack on Code Map from Debug menu
While many of you like creating XAML using our visual tools, many prefer creating XAML in the code editor as well. Your feedback was heard loud and clear and we have taken a crack at the top XAML editor feature requests in Visual Studio 2013. This blog post describes the new editor features in detail and how you can use them!
IntelliSense for Data Binding
IntellISense for properties of the current data context is now available in binding expressions. In order for the editor to resolve the properties we require the data context to be specified on the view and not set in code-behind. If you choose to specify the DataContext in code-behind you can set the design-time DataContext in the view and we will able to piggyback off that for resolving properties in binding expressions.
Furthermore for getting binding IntelliSense in resources like data templates which may be defined in external resource dictionaries you can either choose to set the design time DataContext on the data template or if you navigate to the data template using Go To Definition (F12) we will do the work required to copy the right DataContext over. It saves you from having to explicitly set the design time DataContext on the data template.
IntelliSense with resolved DataContext
IntelliSense with design time DataContext
As you can see both ways of setting the DataContext result in the exact same intelliSense.
I’m excited to announce the Release Candidate of Visual Studio 2013, .NET Framework 4.5.1 and Team Foundation Server 2013! The release is available for download now on the Visual Studio product website and is a “go-live” release. Starting today, developers can also download Windows 8.1 RTM via their MSDN and TechNet subscriptions.
The RC release is the next big step toward the release of Visual Studio 2013. Today I am also excited to announce that Visual Studio 2013 will RTM at Windows 8.1 GA and the Visual Studio 2013 Virtual Launch will be held on November 13th, 2013! Available online around the world, more details can be found on the virtual launch event on the events page.
Trying out the Bits
The Visual Studio 2013 RC can be installed on top of the Visual Studio 2013 Preview or side-by-side with Visual Studio 2012. Please note that Windows Store app development with Visual Studio 2013 RC requires Windows 8.1 RTM, which is available to MSDN and TechNet subscribers, starting today. (Visual Studio 2013 RC does not support Windows 8.1 Preview or Windows Server 2012 R2 Preview.) For Windows Azure developers, the VS 2013 RC supports the same July Azure SDK (version 2.1) as the VS 2013 Preview.
Visual Studio 2013 contains great new features for developers across all Visual Studio languages and platforms. I talked about many of the new features in my post on the Visual Studio 2013 Preview in June. Features like synchronized settings, peek definition in the editor, UI responsiveness tools for XAML and HTML apps, async debugging, and Azure Mobile Services integration provide enhancements across a wide range of developer scenarios.
Today, I’ll take a look at a few of the features that are new to the Visual Studio 2013 RC release. For even more on Visual Studio 2013 RC, check out the “What’s New” page.
One of my favorite improvements in Visual Studio 2013 RC is the enhancements to the XAML editor. Developers are authoring XAML for many of our platforms, from WPF to Silverlight to Windows Phone to Windows Store.
In the RC, we’ve added IntelliSense for Data Binding to the XAML editor. This works with a DataContext defined in the markup, or with a design-time DataContext for cases where the context is provided in code-behind.
We’ve also added support for Go To Definition for Resources, Bindings, Properties and XAML Elements. For example, if you Go To Definition on a Resource: