VS Live Las Vegas 2018 Day 3: What’s New in Visual Studio 2017 for C# developers

This session introduced us to some new features that are introduced in Visual Studio 2017.

Here are some key takeaways for me from the session that was presented. But I was so much excited about the changes that I did visit the Visual Studio site for more information

Code Style Enforcement: This includes the open source file format EditorConfig that assists developers to configure and enforce formatting and code style conventions to achieve consistent, more readable codebases. For more information refer to this blog.

Unit Testing: Some of these features might be available only in Enterprise Edition.

  • Generate unit tests for your code with IntelliTest: This feature explores your .NET code to generate test data and a suite of unit tests. For every statement in the code, a test input is generated that will execute that statement. A case analysis is performed for every conditional branch in the code. The developers can easily see which tests are failing and can add code to fix it. This is enterprise feature only. You can explore the steps here.
  • Live Unit Testing: As developer is developing their application, the live unit testing runs any impacted unit tests in the background and provides the results in VS IE in real-time. This is VS Enterprise edition only. For configuration and setting it up please review the steps here.
  • UI Testing: This helps the developer to verify that the whole application, including its user interface is functioning correctly by automating tests that drive your application through its user interface. This is Enterprise Edition only. In order to create the UI tests please refer to this Microsoft Documentation.

Writing Code: 

  • Intellisense: Exploring the new APIs is faster now and the developer can narrow down the set of values by category. The Quick Info tool tips lets the developer inspect API definitions, and squiggly lines lets the developer know about issues.
  • Navigating code: This was amazing. This has always been an issue when you want to search for certain things in large code base. Now VS helps the developer to find the code with the kind of item to look for. For example if you are looking for certain type, you can start the search with t and then space and then the word. This narrows the search results to types only.
  • Fix issues quickly: The light bulb icons help to identify and fix common coding issues.
  • Variable naming suggestions: As you are typing VS IDE will provide suggestions for variable naming for objects.
  • Unreachable code is faded out. Even if you have some using statements and are not used in the code then it will fade out.
  • Ctrl+D duplicates the line you are on. In the past you had to do Ctrl+C and Ctrl+P. Be aware that Ctrl+D does not copy it to clipboard.
  • Now you are allowed to go to the definition of an object even in a compiled library. It does provide you a legal statement that the developer needs to accept.

FxCop Analyzer: Identifies performance improvements by analyzing the source code. This is available as extension to VS 2017 or through Nuget Package. The extension is named Microsoft Code Analyzer and Nuget Package is Microsoft.CodeAnalysis.FxCopAnalyzers

Roslyn Analyzer: This is a code name for Analyzers that are powered by .NET Compiler Platform. This can produce warnings in the developers code as they are typing and using Nuget packages.

Shortcuts:  Lot of shortcut keys were shown. Here is a complete list of shortcuts –

Overall very nice introduction to some of the new features. I would definitely recommend visiting the Visual Studio site to get into more details.

Leave a comment

Posted by on March 14, 2018 in Visual Studio


Tags: , , , ,

VS Live Las Vegas 2018 Day 2

The reason I decided to attend this conference was due to the various fields it is covering through the 6 days.

On Day 2 I had the opportunity to attend Add Intelligence to your solutions with AI, Bots and More. 

Here are some key takeaways for me from the session that was presented –

Microsoft’s World View: Microsoft has a new view of Mobile-First + Cloud-first. Microsoft expects 75% of enterprise and ISV development will include AI or ML in at least one product by 2018. Cognitive Systems & AI Revenues Forecast to be $46 Billion in 2020. The view also includes various Agents & Bots, Natural & Conversational user interfaces, Mixed Reality, Artificial Intelligence, Advanced Analytics & workflows and Internet of various things.

Microsoft AI Comprises of : 

  • Data + AI Platform: This includes Microsoft Cognitive Services, Microsoft Bot Framework, Machine Learning – Deep Learning and Infrastructure + Analytics in big data stores.
  • Intelligent Agents: Cortana is a prime example of an intelligent agent. It knows the user, knows about their work + life and knows the world. It currently has over 1000+ skills and knowledge.
  • Business Solutions: For example Partner Ecosystem
  • Intelligent Apps: For example, Office 365, Skype, Dynamics 365, Teams, Presentation Translator (see next key point)

Presentation Translator: I was very much impressed with the demo of Presentation Translator. Presentation Translator is an Office add-in for PowerPoint that enables presenters to display live, translated subtitles. As you speak, the add-in allows you to display subtitles directly on your PowerPoint presentation in any one of more than 60 supported text languages. Additionally, up to 100 audience members in the room can follow along with the presentation in their own language, and on their own phone, tablet, or computer. If you are interested in downloading the presentation translator please visit the Microsoft Garage: Presentation Translator site.

Microsoft Cognitive Services: This gives your apps a human side. This includes

  • Vision: From faces to feelings,understand images and video.
  • Speech: Hear and speak.
  • Language: Process text, understand intent.
  • Knowledge: Tap into rich knowledge amassed from the web, academia or your own data.
  • Search: Access web pages, images, videos and news

Customization: If you are interested in customizing any of the models, you can do so with the following services –

  • Custom Vision Service: You can upload a few labeled images and the custom vision service will perform the work for you. This is still in preview mode. You can find more information here.
  • Custom Speech Service: Custom Speech Service is a cloud-based service that provides users with the ability to customize speech models for Speech-to-Text transcription. You can find more information here.
  • Language Understanding Intelligent Service (Luis): A machine learning-based service to build natural language into apps, bots, and IoT devices. Quickly create enterprise-ready, custom models that continuously improve. You can find more information here.
  • Custom Decision Service: This service is available in preview mode. As per Microsoft – This new service will help you create intelligent systems with a cloud-based contextual decision-making API that will adapt with experience. You can find more information here.
  • Bing Custom Search: Utilize Bing Custom Search to build a search that fits your needs with powerful ranking, a global-scale search index, and document processing. You can find more information here.

Microsoft Bot Framework: The user can communicate with the bot by typing, talking or tapping on certain item. A Bot comprises of

  • Rest Endpoint: This will be basically your code written in C#
  • Platform Services: Your C# code will integrate these services.
  • Intelligent Tools
  • Bot Builder SDK

Bot Channels: A channel is the connection between the bot framework and communications app. The channels include popular services like Cortana, Facebook messenger, Kik and Slack. Skype and Web Chat are preconfigured for the developers.

DevOps: Even though this was not directly related to the session it was a good introduction to the DevOps goals and how to accomplish the continuous value delivery. If you are interested in knowing how Visual Studio TFS assists with this please click here.

Tools required to build a Bot: 

  • Visual Studio 2015 or 2017
  • C# Templates available for download. This requires .NET framework 4.6 or newer. .NET core is not currently supported.
    • Bot application Template –
    • Bot controller Template –
    • Bot dialog Template –
  • Bot Builder SDK –
  • Bot framework Emulator –


  • Local debugging with VS and emulator
  • Can use ngrok for full URL
  • Debugging in Azure is made possible with remote debugging. This requires Visual Studio 15.4.x.

How to Build Conversational experiences:

  • Language Understanding.
  • Dialog – Conversational flow between bot and user.
  • Language generation: Spoken, display strings for the agent.
  • User Experience: Cards on-screen or speech-out for given term in a conversation.
  • Business Logic: Business rules that will help direct conversational flow.

My take on where our organization could utilize this –

In our organization we do have a help desk that serves around 1500 employees. We have a lot of 3 party softwares that are used in our day-to-day business. There are a lot of times when the end-user calls the help desk to resolve minor issues. Sometimes they just email the help desk and the help desk creates a ticket. The ticket is picked up by some help desk technician. The technician in turn goes through their knowledge base articles and either forwards them the article or helps them with following the instructions in the article. This does take time and resource away from the help desk department when they could be assisting with bigger issues in the firm. Our management is also trying to hit a target on how quickly the help desk has been able to resolve the issues.

So, if we develop a Bot that is integrated with our Skype for business that would be extremely helpful. The conversation could be started by the end-user and based on the conversation between the user and the Bot the business logic will direct the end-user to the appropriate knowledge base article. If the Bot is unable to resolve the issue then it will open help ticket for the help desk to answer it.

In short, it was a great session presented by Brian Randell and it gave me some ideas to explore on.


Tags: , , , , , , ,

VS Live Las Vegas 2018 Day 1

This week I have the opportunity to attend the VS Live Conference Las Vegas 2018 being held at Ballys Las Vegas from March 11th to March 16th. The conference is divided into Pre-Conference Hands-On Labs, Pre-Conference Workshops and Breakout sessions.

On Day 1 I had the opportunity to attend “From 0-60 in a day with Xamarin and Xamarin.Forms” presented by Roy Cornelissen & Marcel de Vries.

Here are some key takeaways from the session that was presented –

Testing your Xamarin App: Xamarin does allow you to test your apps in the Xamarin Test Cloud. Please refer to This link will provide you a list of devices that can be tested. As per the website, there are around 3410 devices on which you can test your app on. Android has around 1551 devices and iOS has around 1859 devices. You can automate your testing. Microsoft has created a framework called Calabash that can automate and test any iOS or Android app, native or hybrid, from the UI level down. You will need to create an account on Visual Studio App Center Test since this is the next generation of Xamarin Test Cloud. Please refer to the Visual Studio App Center for more information.

Architecting Mobile Apps: There are multiple approaches that are in place for building mobile apps.

  • Silo Approach: This is the current way of building apps using the preferred languages. For iOS Objective C, for Android Java and for Windows (if anyone is still using Windows Phone :)) is C#. The issue with this approach is –
    • No Shared Code
    • Many languages & development environments.
    • Multiple Teams.
  • Write Once, Run Anywhere: In this approach you can build your code using Lua, JavaScript, ActionScript or HTML + CSS and this can be used on any platform. The issues with this approach –
  • Xamarin’s ApproachThis allows the developers to write your code in C# and can be used on any platform. The base line is that C# utilizes the base system libraries and each platform has their unique libraries to access the unique APIs. This approach helps with –
    • Shared C# code.
    • 100% native API access
    • High Performance

Native Performance: Each platform has different way of compiling the apps.

  • Xamarin.iOS: Utilizes full Ahead of Time (AOT) compilation to produce an ARM binary for Apple’s App Store.
  • Xamarin.Android: Takes advantage of Just In Time (JIT) compilation on the Android device.

Debugging your App: 

  • iOS: For this you do need Apple Computer running iOS. You need to use the following instructions for debugging your app  –
  • Android – You can download Visual Studio Emulator for Android from this link. In the session, we did face some issues with the emulator not starting. I have blogged on how I fixed the emulator issue on my laptop. But I also did set up my Galaxy S8 to debug the app since the instructors recommended device for debugging the app as an efficient way. You can follow the instructions at to setup your android device for debugging.

Xamarin Forms: You can build native UIs for iOS, Android and Windows from a single, shared C# codebase.

  • So whats included –
    • 40+ Pages, layouts and controls.
    • coding done with XAML.
    • Two way data binding
    • Navigation
    • Animation API
    • Dependency Service
    • Messaging Center
    • Native UI from shared code.
  • Required Components
    • Application: This provides initialization for the application. Common events that are handled – OnStart, OnSleep and OnResume.
    • Pages: Represents a single screen to display.

Shared Code: So far, developers had 2 options on deciding what to choose for shared code –

  • Shared Projects – with conditional compilation and source code sharing across platforms.
  • Portable Class Library – additional project in solution that is referenced by platform specific projects
  • .NET Standard Project – .NET standard is a specification of .NET APIs that can be used and are available on all .NET implementations (including Xamarin platform projects like iOS, Android or UWP). It is quite similar to PCL, but it’s easier to use and has more classes available from BCL. If you are interested in knowing whether it is time to move from PCL to .NET standard please refer to this link.

The session did provide me enough information to play around with building my first mobile app someday soon. 🙂

Next: Add Intelligence to your solutions with AI, Bots and More.


Tags: , , , , , , , , , ,

Visual Studio Emulator for Android won’t start

When you try to start a Android emulator from Visual Studio Emulator for Android list –










After the emulator starts you might experience the following error –









The fix is very easy. All you need to do is go to Control Panel\Network and Internet\Network Connections. In this find the Adapter for vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch) and enable it.




Now if you try to start the android emulator it should work fine.


Leave a comment

Posted by on March 13, 2018 in Xamarin, Visual Studio



Find the w3wp process for SharePoint Debugging

Often we need to debug our SharePoint solution and we are often presented with multiple w3wp processes running and it is really difficult to figure out which process to attach for the debugger.

Following is the command that will list all the processes and which web application pool it is using. Open command prompt as administrator and go to the inetsrv folder under C:\Windows\System32.

appcmd list wp

Find your application pool and then you will have the Process ID.

Happy Programming.

Leave a comment

Posted by on October 16, 2015 in Uncategorized


Resource Capacity Planning Report issue with old dates on Project Server 2013

Issue: Recently faced an issue with a client regarding Project Server 2013 Resource Capacity Planning Report. The client had some old projects uploaded and they wanted to view the resource capacity and allocated hours for last few months. They were only able to see information for one last month only.

Solution: The solution has two steps –

  1. Central Administration changes –
    1. In SharePoint Central Administration, click Application Management.
    2. On the Application Management page, in the Service Application section, click Manage Service Applications.
    3. On the Service Applications page, click the Project Application Service that contains the Project Web App instance for which you want to access the Resource Capacity settings.
    4. On the Manage Project Web Apps page, click the drop-down menu for the PWA instance for which you want to access the Resource Capacity settings, and click Manage.
    5. On the Server Settings page, in the Operational Policies section, click Additional Server Settings.
    6. On the Additional Server Settings page, in the Resource Capacity Settings section, for Active capacity view, enter the following:
      1. In the Months behind field, enter the number of months in the past that you want resource data to be calculated from. I changed it to 12.
      2. In the Months ahead field, enter the number of months in the future that you want resource data to be calculated from. Kept the default to 12.
    7. Click Save.
    8. You will have to run the timer job Project Server: Resource Capacity Refresh job for Project Server Service Application for getting the report refreshed with old dates.
  2. Open the ResourceCapacityPlanning Report in excel.

Click on Data -> Connections.


On Connections Select Project Server – Resource Capacity and click Properties


On Properties Window click on Definition Tab.


On Definition Window check the Command Text column


The SQL Command text should look like –
(SELECT ResourceName from MSP_EpmResource_UserView where MSP_EpmResource_UserView.ResourceUID = MSP_EpmResourceByDay_UserView.ResourceUID) as [ResourceName],
MSP_EpmResourceByDay_UserView.ResourceUID as [ResourceUID],
ISNULL(AssignmentTable.AllocatedCapacity,0) as [AllocatedCapacity],
MSP_EpmResourceByDay_UserView.Capacity as [ResourceCapacity],
DATENAME(month, MSP_EpmResourceByDay_UserView.TimeByDay) as [Month],
YEAR(MSP_EpmResourceByDay_UserView.TimeByDay) as [Year],
(SELECT [RBS] from MSP_EpmResource_UserView where MSP_EpmResource_UserView.ResourceUID = MSP_EpmResourceByDay_UserView.ResourceUID) as [RBS]
SUM(MSP_EpmAssignmentByDay_UserView.AssignmentCombinedWork) as [AllocatedCapacity],
ON MSP_EpmAssignment_UserView.AssignmentUID = MSP_EpmAssignmentByDay_UserView.AssignmentUID
AND MSP_EpmAssignment_UserView.ProjectUID = MSP_EpmAssignmentByDay_UserView.ProjectUID
AND MSP_EpmAssignment_UserView.TaskUID = MSP_EpmAssignmentByDay_UserView.TaskUID
MSP_EpmAssignmentByDay_UserView.TimeByDay BETWEEN
) AS AssignmentTable
ON AssignmentTable.ResourceUID = MSP_EpmResourceByDay_UserView.ResourceUID
AND AssignmentTable.TimeByDay = MSP_EpmResourceByDay_UserView.TimeByDay
(MSP_EpmResourceByDay_UserView.TimeByDay > CONVERT(DATETIME, DATEADD(month, – 2, CURRENT_TIMESTAMP), 102))
AND (MSP_EpmResourceByDay_UserView.TimeByDay < CONVERT(DATETIME, DATEADD(month, 6, CURRENT_TIMESTAMP), 102))

Find all instances of CONVERT(DATETIME, DATEADD(month, – 2, CURRENT_TIMESTAMP), 102)) and change the -2 to the months you are interested in going back. There are two instances. I have bolded the text in the SQL above. The client was looking for 3 months back so I changed it to –


Save the file and now your report should pull the appropriate data.


Downloading InfoPath XML file as XML File through C# Program

If you have ever tried downloading XML form from the Forms library through code you might have realized that the downloaded file is no longer XML. 

Here is the code –

using (WebClient client = new WebClient())
client.Credentials = CredentialCache.DefaultCredentials;
string strXMLFile = “<siteURL>” + item.Url;
string strPath = @”D:\\” + listName + “\\” + item.Title;
client.DownloadFile(strXMLFile, strPath);

If you try the above code then you will be presented a HTML document but not the actual XML. In order to get around this issue you just need to add the parameter ?NoRedirect=true. What this actually tells the server is not to send the information to the forms server to be formatted. This just downloads the XML as it is. If you try the NoRedirect Parameter on IE then it will ask you where to download the file.

So, my final code looks like –

using (WebClient client = new WebClient())
client.Credentials = CredentialCache.DefaultCredentials;
string strXMLFile = “<siteURL>” + item.Url?NoRedirect=false;
string strPath = @”D:\\” + listName + “\\” + item.Title;
client.DownloadFile(strXMLFile, strPath);

I hope this helps someone 🙂

Leave a comment

Posted by on January 16, 2014 in Uncategorized