How to delete VisualStudio.com project from Windows 8.1 and Visual Studio 2013


More than year ago, I wrote blog post article how to delete project from . I can say this blog post is one of the most visited post, probably because lot of people wanted to delete project but it is not so obvious task.

Today I run in the similar problem with Windows 8.1 OS and Visual Studio 2013 RTM version. In fact when I open Start Screen I wasn’t unable to find icon VS2013 x64 Native Tools Command Prompt, but only command prompt for VS 2012 which is not working because you have no VS2012 installed.

Actually you have to choose Visual Studio Tools folder from Visual Studio 2013 category.

 

Windows Explorer Window is opened.

 

Now select VS2013 x64 Native Tools Command prompt, and follow instruction in the previous blog post from  this link.

Using Dispatcher in Windows 8.1 Store Apps


If we want to inform the user about operation status which is running in the background by callback method, you have to be aware that the callback call is not in the UI thread. In this situation we cannot show Dialog message as ordinary, because we will go in trouble with cross-thread exception.

If we want to run eg. Dialog Message in Windows Store apps to inform user about operation status we need to run a “safe code”. This means we need to call Dispatcher, which cares that all calls related to UI components have to be from the main thread.

Lets assume we have callback method which gets call when user wants to see the payment status. Process of checking payment is not in UI thread, so the callback method of reporting status will also not be in the UI thread. In that situation, any code which touches UI must be executed with Dispatcher.

The following code  shows how to create MessageDialog and show it in Windows Store app, so that the user get information about payment status.

/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void PaymentCheckCompleted(object sender, PaymentEventArgs e)
{
    MessageDialog dlg = null;
    if (e == null)
    {
        dlg = new MessageDialog("Status is NULL", "SMS Provider");
    }
    else if (e.status == PaymentStatus.ok)
    {
        dlg = new MessageDialog("Status is OK", "SMS Provider");
    }
    else if (e.status == PaymentStatus.cancelled)
    {
        dlg = new MessageDialog("Status is CANCELED", "SMS Provider");
    }
    else if (e.status == PaymentStatus.failed)
    {
        dlg = new MessageDialog("Status is FAILED", "SMS Provider");
    }
    else if (e.status == PaymentStatus.pending)
    {
        dlg = new MessageDialog("Status is PENDING", "SMS Provider");
    }
    else
    {
        dlg = new MessageDialog("Status is UNKNOWN", "SMS Provider");
    }

    dlg.Commands.Add(new UICommand("OK"));
    dlg.DefaultCommandIndex = 0;
    dlg.CancelCommandIndex = 0;
    dlg.Options = MessageDialogOptions.None;

    this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => dlg.ShowAsync());

}

The last line in the example above shows how to use Dispatcher, and how to show dialog so that we never see cross-thread exception.

CodeLens amazing feature in VS 2013


Visual Studio 2013 is available few hours ago. The main features are already presented through CTP and RC version. Started from today, MSDN subscribers can download VS 2013, and public availability will be 13th of November this year.

One of the best feature in this release is definitely CodeLens.

CodeLens is new feature in Visual Studio 2013 which provides lot of information through the code editor. It is amazing how UI team from Microsoft design this feature by combining text in code with floating and docking windows. For me, this is the best feature in the last several versions.

In this blog post it will be presents several case when you can use CodeLens to find information specific to you code e.g. Unit test methods, class definitions etc.

Full Power of CodeLens you can feel when you have installed Visual Studio 2013, TFS 2013 and Lync 2013.

As you can see CodeLens uses different services to provide information about your code, people worked on code, communication between developers, and more.

Here is some hints about CodeLens

Enabling CodeLens

You can enable CodeLens in Options dialog. You can also enable specific information provided by CodeLens. Picture below shows CodeLens options.

Reference, Definitions and other information

Reference counter, and other very useful information is integrated in to code editor like picture below. The constructor of every class contains information about reference number, test methods, as well as Code changes, date and time changes, review etc. On picture below you can see reference number and test methods.

 

If you run VS 2013 with TFS 2013 you can get other information like (see picture below taken from Microsoft site) last change author, total changes, review and other information.

If you have installed Lync 2013 you can call directly from code editor other dev. team member. This is amazing feature.

Using Code Lens with CodeMap

You can combine CodeLens with CodeMap, by clicking on the link at the bottom of CodeLens floating window.

Peek Definition

When you right click on some type, now you have a new option called “Peek Definition” which provide developer athoder window inlined within current code edito and shows information about selected type.

In previous action, this option is achieved by showing another window, while current windows was hide. Now you can see information, even you can make some modification if you like, but you current window edition still remain and it is presented all the time. At the edn you can Peek definition promote to standard tab windows if you like. In the nexst cup of picture you can see how it looks like.

Right Click on method:

Choose Peek Definition

Inline windows is present with definition of the method. You can scroll and edit this window. It is like ordinary window. You can use ScrollBar too, in case you need some other information within it. You can promote this windows in to ordinary, by clicking on icon from the Title.

More information you can find .

That was my first impression for this release.

Again Microsoft and Visual Studio team done great job.

Happy programming!