Wednesday, October 26, 2005

VS.Net Tip(s) of the Day

I came across some cool tips for use inside VS.Net.

1. A Cool feature of VS.NET is its ability to launch multiple projects and have a debugger attached to them. If I have an application which is using .NET Remoting, so I have a remoting host, which is an exe, I have a client who’s is going to launch remote objects. Also I’m going to have them in separate exes. I can normally run only 1 Exe at a time within the same solution. And so typically what I have to do is after I launch the client I have to go to the host and explicitly start the host to get the second exe I need to work with and then the two are actually going to be talking with each other.
Now this is kind of tedious. What I can do instead is I could go to the solution properties, select multiple startup projects and select the projects I want to start, in which case I want to start the host and I want to start the client. I can even change the order in which the client or the host are going to be started. Now when I click okay if I click the go button VS.NET is going to launch the two exes and it’s going to attach itself to them so I’m going to have the same debug session for both exes. Very handy and useful when dealing with multiple exes.


2. If I try to compile a new project and deliberately add some compilation errors to i. After trying to build, If I look at the task list I'm going to see that the errors of compilation is being added as a task for me to fix. I can also explicitly go and add a task in my task list. Now you can also do // and type to do. And it turns out that to do is a recognized token by VS.NET and the moment you say to do it would add that line to the task list. And you can actually your own constants and your own token to the task list. If you go to tools, options, task list you can add your own custom Task List. Having your own custom task list will be helpful when you’re looking for other things to do in your project you don’t have to literally do a search in all files and look for to dos. Just look at the task list, it will show you all the things you need to do.

3. In C# only there’s something called pre and post build action. This allows you to run a command line before and after a build. I want to do some pre and post-build action in that class library. So if I go to the project properties I have build Events. This command line, the pre-build defense is going to be executed before the build starts. A typical thing to do in the prebuild is to do a clean build, meaning remove all bin folders. A post-build allows you to run something after the build. A typical thing you want to do is you’re going to maybe install this class library in the GAC on every build.

I read these tips from an MSDN article by Jual Lowy the Great(yup ... a Software Legend too). I found it very useful.

1 comment:

Anonymous said...

http://markonzo.edu can you do thi for me, ashley furniture price [url=http://jguru.com/guru/viewbio.jsp?EID=1536072]ashley furniture price[/url], tfphs, allegiant air verdict [url=http://jguru.com/guru/viewbio.jsp?EID=1536075]allegiant air verdict[/url], eyjwtwy, pressure washers info [url=http://jguru.com/guru/viewbio.jsp?EID=1536078]pressure washers info[/url], ctoisfe, dishnetwork blog [url=http://jguru.com/guru/viewbio.jsp?EID=1536080]dishnetwork blog[/url], qstxdms, adt security preview [url=http://jguru.com/guru/viewbio.jsp?EID=1536076]adt security preview[/url], xohgtpb,

Loading...