31 Days …. 31 Visual Studio Tips & Tricks from Daily .NET Tips–January 2016 Links

Daily .NET Tips is aiming to sharing useful coding tips and tricks for .NET Developers. This site completely design for sharing Tips and Tricks, useful code snippet which anyone use in daily development work and targeted anything related with .NET.   In this post I am quickly listing down all the tips shared over the month of January 2016


How to Understand the complexity and maintainability of the code ?

Code Metrics is one of the important software measures that give you an insight of your code maintainability and complexity. No one likes over engineered or too complex code.  As a developer when you are writing your code, you must adhere those boundary values of metrics to ensure your code is well written, understandable and maintainable.

Application Insights – Real Time Telemetry for your Cross Platform Application

Application Insights helps us to track applications health in real time. You can track you application availability, performance issues, users session and diagnose crashes faster then ever. It’s provides a real time dashboard  for your app to monitor your application. It is fast, very easy to configure and provide very powerful insights for your application. Not only with a Web Apps or Desktop apps, it supports various other platform like Universal Windows, Windows Phone and other platform like JAVA / J2EE, iOS, Android, Node.Js, Ruby, Python … or you can say it’s is available for ‘almost any apps’ .

JScript Debugger– “Unable to attach the process. Another debugger might be attached to the process” – while application is running from Visual Studio. [ Solution ]

IE Developer toolbar provide us a fantastic and easiest way to debug JavaScript with in browser.  If the web site is hosted on IIS and you are trying  debug JavaScript using IE Developer tool bar, it will work fine if you the correct browser setting for debugging. If you are running your web application directly from visual studio, you might came across the problem of “Unable to attach to the process”  while click on “Start debugging” button in IE Developer toolbar. In this post I am going to talk about the resolution of the same and will also talk about little bit behind the scene.

25 Tips on ASP.NET, C#, MEF, Visual Studio, Profiler – September 2011 Links

Daily .NET Tips is aiming to sharing useful coding tips and tricks for .NET Developers. This site completely design for sharing Tips and Tricks, useful Code Snippet which anyone use in daily development work and targeted anything related with .NET.   This month we have wide range of tips including ASP.NET, C#, MEF, Visual Studio, Profiler etc. In this post I am quickly listing down all the tips which are published over the month September 2011

Install a shared Assembly to the GAC as post build event from Visual Studio

The Global Assembly Cache (GAC) is a Cache for globally available Assemblies. Most of the shared assemblies are installed inside GAC to shared across different applications. The Global Assembly Cache tool (Gacutil.exe) allow us to manipulate the contents of the global assembly cache along with install and un-install Assembly. During the development, we generally  take help of gacutil from command prompt to install or uninstall assemblies into or from GAC. This is a repetitive process, every time you made some changes in your library you might need to deploy it into the GAC. Visual Studio has a nice feature called Pre-Build and Post-Build events. Using these events we execute some specific  commands before or after the build. In this post I am going to show you how we can configure the post build event to deploy an Assembly to GAC.

Not able to view all the running Worker Process in Visual Studio – Process Attach Window – Resolution

This might be a very simple and known to most of us, but I found  it as a query in a discussion forum of one of my article “Debug your ASP.NET Application while Hosted on IIS” which was published at Code Project . Question was regarding list of worker processes in “Process Attach window” of Visual studio. Though all the sites are running properly on IIS, still he was not able to view any processes in “Attach Process Window” while trying to attach a process from Visual Studio.

ASP.NET Internals : Visualizing ASP.NET Page Life Cycle using IntelliTrace

Understanding the ASP.NET Page Life Cycle is an essential knowledge for developing ASP.NET Web Application. When request come from client to server there are many operations performed in backend before sending response to the client. When client request for some information from a web server, request first reaches to HTTP.SYS, which is the kernel level of IIS. HTTP.SYS then send the request to respective  Application Pool. Application Pool then forward the request to worker process to load the ISAPI Extension which will create an HTTPRuntime Object to Process the request via HTTPModule and HTTPHanlder.  Once request passed through the HTPP Pipeline, ASP.NET Page Life Cycle Start.  You will find several articles that describes the What is ASP.NET Page lifecycle, what are the different events fired during page lifecycle.  This post is something different, I will show you how you can see the each and individual Page life cycle events using IntelliTrace

IntelliTrace Log ( .iTrace ) files and Visual Studio 2010 SP 1– Some Hidden Stuff

IntelliTrace debugging  is only available with Visual Studio 2010 Ultimate Edition, which collects debugging information in background and can be used at any point to time to analysis previous debugging data. IntelliTrace collected debugger information into a trace log file (.iTrace ) that can then be opened and debugged using Visual Studio later.  Size of .iTrace was always a concerns, as it’s take huge amount of your hard drive space and IntelliTrace is on by default. So whenever you are doing F5 debugging in Visual studio .iTrace is getting saved and it’s consuming your hard drive.

Well, before moving forward, I must thank to Larry Guger , Program Manager for IntelliTrace features .  Yesterday  I had a discussion with him on IntelliTrace .  During discussion I found there are several changes on IntelliTrace log saving which has been shifted with Visual Studio 2010 SP1. I have already blogged about few of them over here http://bit.ly/f8awhz. But few hidden stuff was missing which I got to know from Larry only.   In this post I am going  to discussed about those changes.

.NET Tips – Links on ASP.NET C# MVC Visual Studio Tips – May 2011

Daily .NET Tips is aiming to sharing useful coding tips and tricks for .NET Developers. This site completely design for sharing Tips and Tricks, useful Code Snippet which anyone use in daily development work and targeted anything related with .NET.  In this post I am quickly listing down all the tips which are posted over the month May 2011.

Enable Scroll Override in Visual Studio

While using Scrolling in Visual Studio IDE, by default it scroll amount is fixed by number of lines. During normal development, when we scroll with in code editor,  the scroll amount by fixed line number is fine. But if you zoom out the editor code, scrolling wont be useful  as though we have changed the code editor zooming, still scrolling is available with fixed line number. To overcome this, you can use “Enable Scroll Override” features.

Few important tips that you should know while using ASP.NET Session

While working with ASP.NET web application you must be familiar with one of most important state management technique “Session”. If you want to do a quick refresh or want to know some thing more, please go ahead and read one of my article “Exploring Session in ASP.NET” published at Code Project. In this post I am going to share some important tips that might be useful.

TOD : Wrapping Code Block and Statements in Visual Studio

In this tips I have explained how you can automatically wrap up code blocks or code statement in Visual Studio. We can use Document formatting to format the whole contents, but that doesn’t wrap single line code block like Properties or not even single line multiple declaration statement.  Let’s consider an example, you are creating a Properties using code snippet and by default it will came up like


But, you want you code to be look like as below


How ? Read Complete Tips

Generic Way to Bind Enum With Different ASP.NET List Controls

In this post I am going to explain how we can bind a Enum with ASP.NET List Controls. These comprise of four different types of control, CheckBoxList, DropDownList, ListBox and RadioButtonList. This is one of the common requirements during development to bind a Enum with List Control and challenge is when we need to bind the both text and value.
Let’s consider we have the blow Enum. Now I am going to bind it with all the above mentioned type List Controls.

Well, One of the easiest way that we can implement is by Enum.GetNames(Type enumType)which retrieves the name list of enumberation  and Enum.GetValues(Type enumType), which returns the list of values for each names .