Showing posts with label visual studio 2005. Show all posts
Showing posts with label visual studio 2005. Show all posts

Saturday, February 27, 2010

Autodiagrammer – Visual Studio Class Diagram generation tool

 

For one of my projects I was trying to use the Visual Studio Class diagram to quickly generate class diagram to understand the existing design. The VS IDE kept giving errors on not being able to generate class diagram. So I was searching for a 3rd party Free class diagram generating tool and found “Autodiagrammer”.

Sacha Barber has done an excellent job coding this tool, it uses reflection and hence you can run this on compiled dot net projects and it will generate a beautiful class diagram and even align it for you.

You can download it from Code project here

refelctor_Addin

Saturday, March 07, 2009

unrecognized tag prefix or device filter ‘asp’

 

You have possibly landed on my blog because you got this error when you were trying to compile your project in Visual studio 2005 and are going mad trying to find a solution. So was I :)

You would be getting this error if you had used Master Pages in your project.

That is open your masterpagename.master markup and you would see that under the <head> tag or where ever you had used <asp:contentplaceholder > tags you will notice that the “asp” is underlined in red and the error you get in your Error list is

“Unrecognized tag prefix or device filter ‘asp’”.

The solution is simple, close all the currently open pages in visual studio , how to do that easily would be click on any one open page and right click on the file name example “Default.aspx.cs” and say “Close all but this” and then close the current file too (right click close)

Then search your PageMaster.master and open it in IDE (either design or source view) and try to compile now.

If you have nested master pages try to open all those and compile, it should compile easily without errors.

This may sound stupid but that is how it works !!!!!

Friday, May 11, 2007

Visual Studio 2005 Tips & Tricks #1 - Automatically format the code

Visual Studio 2005 Tips & Tricks - Automatically format the Code

I have seen many managers pay more attention to how code is written (mainly to alignment, spacing and indendation), even previous programming languages like FORTRAN 77 & COBOL 65 had particular column numbers where we need to code exactly.

But mainly coding is formated to make it more readable and to look neat for another developer to read and to try to understand.

But most of the developers do not align their code properly making it worse to read and understand, though this is not a new feature in VS2005 it is one of the essential features for any IDE to possess and here it is. Note: It is also present in VS2003, and other famous editors like homesite etc but many developers do not use it and still we see poorly aligned code making it hard to read.

Open the IDE, go to Edit >> Advanced >> Format Document, and
the source and code behind is automatically formated and aligned very neatly with indendation.



Read more tips coming soon on my blog.

Tale of a .Net Component

Most of dot net books or articles on the web are task based, meaning they explain a method or a property or a small task and explain how to do it and the entire MSDN is something similar.

It is very rare to find a full fledged project implementation or a book which explains how to code a project, from scratch to rollout and updates.

If we look at real life that is what one expects, the best practices how to seperate layers of code, when to write components vs when to write controls, how to reuse code, but there were few implementations in the past like the pet shop project where an entire project was given as download for enthusiastic developers to learn. That is how i coded my first dot net project not by learning from a book or from msdn but by looking at the code of a sample dot net project provided by microsoft.

Today was the last post of a 5 part series explaining from scratch how to write a dot net component, i liked this article a lot and hence am posting it on my blog.

Tale of a .Net Component - Part 1 (Explains the requirement & the design)
http://www.devsource.com/article2/0,1895,2095440,00.asp

Tale of a .Net Component - Part 2 (Explains the class design)
http://www.devsource.com/article2/0,1895,2097685,00.asp

Tale of a .Net Component - Part 3 (Properties creation)
http://www.devsource.com/article2/0,1895,2099681,00.asp

Tale of a .Net Component - Part 4 (Depth in to code)
http://www.devsource.com/article2/0,1895,2104404,00.asp

Tale of a .Net Component - Part 5 (Testing & Rollout)
http://www.devsource.com/article2/0,1895,2111753,00.asp

The author of this excellent series is Peter Aitken (author of more than 40 books), http://www.pgacon.com/default.htm

I am sure any developer would love to read such articles.

Wednesday, February 21, 2007

Classic ASP (not ASP.Net) code debugging with VS Dotnet IDE 2005

I am not sure how many developers would need this but i needed it badly, i think i am the only one doing ASP coding and ASP.Net 2.0 coding at the same time :) So having used the 2005 IDE, you feel like your hand is broken when you go back to do classic ASP coding for old maintenance projects, where only way to debug is Response.Write but imagine how it would be if you can set breakpoint in classic ASP code and step in, step out F11, F10, Shift F11, F5 wouldn't it be great.

So i started my googling to find a solution which would make my daily coding life better and i was able to do it.

So here i am sharing my experience, "How to debug classic ASP using VS Dot net IDE 2005"

1) You need not have a sln or a project file, you can even open one single ASP file and debug it from top to bottom,
2) Open your ASP file in VS Dot net IDE 2005, then open IE and browse the page, this is done so that the ASP rendering process (IIS server but not aspnet_wp.exe, not w3wp.exe but dllhost.exe comes in to task manager),
3) Go to your default web site in IIS or your virtual directory >> right click properties >> home directory >> configuration >> Debugging tab >> in the debugging flags section,
check - Enable ASP server-side script debugging

In the script error messages section, check send detailed ASP error messages to client. (as shown in picture below).


4) Now comes the important step, open your vsdotnet ide 2005, and open the single ASP page and click Debug >> Attach to process >> check the check box [ ] show processes from all users, then look for a process called dllhost.exe Type = x86, Script and the username running it is YOURPCNAME\IWAM_YOURPCNAME.


Click Attach and wait for few minutes and click ok, now go back to your ASP page place a break point and then refresh the IE, and you should see it stops at the breakpoint.

Happy Debugging ASP :)

Friday, November 17, 2006

More more more code samples :)

I remember the pepsi ad, "Yeh Dil Maange more!!" meaning, "this heart demands more" in Hindi (National language of India).

Similarly more code samples from .Net Framework 3.0

http://www.microsoft.com/downloads/details.aspx?FamilyID=22B58B6C-8F98-40D0-880D-C3339C5DA01E&displaylang=en&mg_id=10049

Overview
The Windows SDK samples for .NET Framework 3.0 include samples for .NET Framework 2.0, Windows Communication Foundation, Windows Presentation Foundation, Windows Workflow Foundation, and Cross Technology samples. These samples can be downloaded from here or are available when the Windows SDK is installed locally.