Sep 132014
 
Please Share...

Issue

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.

Cause

It turned out that his include file settings in project properties was causing this. It was missing a critical include…

$(WindowsSDK_IncludePath)

We added above include as illustrated below and the warnings (RC4005/C4005) went away…

image

Hope this helps save your time. Smile

Please Share...
Aug 052014
 
Please Share...

Do you run into following error when trying to run a VS2013 .net application on Windows XP?

Error: Not a valid Win32 application!

This happens because the application is targeting .net framework 4.5 which is not supported on Windows XP. Target a lower framework to get your application working on XP.

Please Share...
Feb 032014
 
Please Share...

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…

Step 1:

Add a reference to the PowerPack library as shown here: http://ntcoder.com/bab/2013/12/20/visualbasic-powerpack-missing-from-visual-studio-2013/

Step 2:

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…

image

Step 3:

Drag and drop an instance of data repeater onto your win forms or a container control. Resultant form will look as follows…

image

Please note you’ve got to have the right version of DataRepeater in order for it to get displayed on the form designer surface.

Step 4:

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…

image

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.

Step 5:

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.

image

Step 6:

DataRepeater supports some other features as well, please go through the documentation to know more. Enjoy!

Please Share...
Jan 222014
 
Please Share...

Visual Studio 2013 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…

imageimage

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…

  1. MemTest.dmp
  2. MemTest (2).dmp
  3. MemTest (3).dmp

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…

image

Check out mouse cursor location in the above screenshot. Click on this option. You’ll following dialog pop up….

image

Following which you’ll see the following screen…

image

This report will show the most number of objects on heap. If you notice the largest objects in my case are ArrayLists and second one is MemTest.Form1, too many forms. The also shows you the roots to an object.

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 as the memory is increasing. See screenshot…

image

You’ll see that, new columns has been added to this report, for e.g. “Cound 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.

Please Share...
Jan 202014
 
Please Share...

A video presentation on what’s new and cool in Visual Studio 2013 Solution Explorer…

I’ll follow up this presentation with some more presentation on what’s some of the cool things in Visual Studio 2013 just to speed up anyone who’s hopping onto the Visual Studio 2013 wagon.

Please Share...
Dec 202013
 
Please Share...

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.

Download VB Powerpack (direct link to bits): http://go.microsoft.com/fwlink/?LinkId=321343

Steps to Install Visual Studio 2013 Visual Basic PowerPack

Installing Visual Basic Powerpacks

Installing Visual Basic Powerpacks

Please close any open instances of Visual Studio 2013. Once the installation completes and if you still don’t see the Powerpack controls in the toolbox. Do the following.

  1. Open Visual Studio 2013
  2. Open the toolbox. Add a new tab, right click on the toolbox, select “Add Tab”. Name the tab to “Visual Basic PowerPack”
  3. Expand the new “Tab”. Right click in the empty space under the new tab and select “Choose Item”. You’ll see the following dialog popup…

    Adding reference to Visual Basic powerpack

    Adding reference to Visual Basic powerpack

  4. Please give it few minutes to load all items. Please select “.Net Framework Components” tab if its not already selected.
  5. In the filter text box control please type in “Power”. You should see something like this in the above dialog…

    Choose toolbox items

    Choose toolbox items

  6. Check the relevant ones and add them to your toolbox as shown below…

    Adding Filter for powerpack in the Choose toolbox items dialog

    Adding filter for powerpack in the Choose toolbox items dialog

  7. Once you click ok, you should see the following controls added to your toolbox…

    PowerPack controls listed in VS toolbox

    PowerPack controls listed in VS toolbox

  8. In my case I’ve added all powerpack controls to my toolbox.
  9. You might also have to add a reference to this new powerpack library if you still see compilation errors. Be aware that the assembly name has changed as well…

    Adding reference to new powerpack library

    Adding reference to new powerpack library

Conclusion

We’ve had couple of customer’s who report that Visual Basic powerpack is missing from Visual Studio 2013.
http://connect.microsoft.com/VisualStudio/feedback/details/801421/microsoft-visualbasic-powerpacks-vs-dll

Enjoy the powerpack.

Please Share...
Oct 172013
 
Please Share...

Some useful links…

Visual Studio 2013 Available Now!
Visual Studio 2013 Highlights
System Requirements and Platform Compatibility
Known issues for Visual Studio 2013 (Readme)
Known issues for .NET Framework 4.5.1 (Readme)
Known issues for Visual Studio Team Foundation Server 2013 (Readme)
Windows Store is now open for submitting apps targeting Windows 8.1

Please Share...
Oct 022013
 
Please Share...

 

What is Code Map?

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

–       Pressing Ctrl + Shift + `

You’ll see something like this,

More: What is Visual Studio’s 2012 Code Map All About? – Microsoft Pakistan Community Blog – Site Home – MSDN Blogs
More information on code map: http://msdn.microsoft.com/en-us/library/vstudio/dn194476.aspx

Please Share...
Sep 102013
 
Please Share...

 XAML Editor Improvements in Visual Studio 2013 – The Visual Studio Blog – Site Home – MSDN Blogs

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 resolved DataContext

IntelliSense with design time DataContext

IntelliSense with design time DataContextAs you can see both ways of setting the DataContext result in the exact same intelliSense.

More: XAML Editor Improvements in Visual Studio 2013 – The Visual Studio Blog – Site Home – MSDN Blogs

Please Share...
Sep 102013
 
Please Share...

 Announcing the Visual Studio 2013 Release Candidate – Somasegar’s blog – Site Home – MSDN Blogs

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. 

For more details, see the Visual Studio 2013 RC system requirements and platform compatibility site.

New Features in the Visual Studio 2013 RC

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.

XAML Editor

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:

You are taken to the definition of that Resource. 

For much more detail on these improvements, see Harikrishna Menon’s post on the Visual Studio blog: XAML Editor Improvements in Visual Studio 2013.

Announcing the Visual Studio 2013 Release Candidate – Somasegar’s blog – Site Home – MSDN Blogs

Please Share...