| Profil von philPhil Harvey's .NET SpaceBlogListen | Hilfe |
|
|
04 Oktober Talking about: Allocation ProfilerThis tool is great at working out why your tiny .NET utility is using 80MB of memory! It lets you graphically see what objects have been allocated and quickly see where your memory leaks are. Of course, the CLR should control this sort of thing, surely? Having to use this tool breaks any contract of trust a developer should have with the CLR. If you are having memory leak problems even after garbage collection then somewhere in your code you must have references to instances of objects that you have long forgotten about! Either that, or *anything* to do with unmanaged code (COM Interop, Win32) Quote GotDotNet User Sample: Allocation Profiler 16 Juni Develop Managed Outlook Add-ins with VSTO 2005Yes! Visual Studio 2005 has a decent way of creating managed Outlook Add-ins!! If only I had this stuff 12 months ago my life would be so much simpler. Still, at least the future looks bright for new Outlook projects I might undertake. Microsoft has unveiled VSTO (Visual Studio Tools for Office). Follow the link below to find out all about it. Quote Srinath Vasireddy - Online journal : Develop Managed Outlook Add-ins with VSTO 2005 28 April Rick Strahl blogger geniusRick Strahl has one of the best .NET web logs around (RSS). Just to let you know. But if you didn't know that already, then shame on you. I like to read it when I'm bored, he has great technical insight into .NET issues we all understand. 18 April Set file permissions from an Installer custom actionA common task for using an Installer action in your Visual Studio deployment project would be to change the file access permissions on some of the files you have just installed. Currently, the .NET framework does not provide any mechanism for managing access rights on files - although this will change in version 2.0 (Whidbey). In the mean time, there's a download at gotdotnet.com called Win32Security (Download Now). This community library lets you manage file security attributes on NTFS file systems. Download and build the project, and reference it to your Installer custom action class. The following code sample will add the "All Access" privilege to the ASPNET user on the web.config file. If you are new to installer custom actions I strongly suggest you read this article before trying to understand the code below.
Installer custom action class to set the file permissions on the web.config file using System; namespace InstallDemo.Installer /// <summary> public override void Install(IDictionary stateServer) if (configFile.Exists) Dacl dacl = secDesc.Dacl; dacl.AddAce ( secDesc.SetDacl(dacl);
16 Februar Talking about .NET Tools: Ten Must-Have Tools Every Developer Should Download Now -- MSDN Magazine, July 2004James Avery points out a list of tools every .NET developer should have. I'm using a couple of them and will certainly will try and use a few more. Does anyone use NAnt? Why should I use it instead of Visual Studio to build my projects? Quote .NET Tools: Ten Must-Have Tools Every Developer Should Download Now -- MSDN Magazine, July 2004 01 Februar Unit Testing and Code CoverageApologies for not posting over the past few weeks. I have been giving the blog a rest to see how google indexes and links to it. The results are interesting and I will comment on them at a later date. Recently I have got into Unit Testing in a big way. The idea behind Unit Testing is that you write code as individually testable functions and methods, and write a series of automated tests to guarantee they are working properly. If your tests all execute successfully, then your application should in theory work properly. You can then change the test environment, try about with different configurations, and make sure your automated tests consistently succeed. Unit Testing can be used to implement a test driven development methodology. When designing a class, you design a series of tests that the class should be able to perform. You then write the class to pass these tests. Testdriven.com has lots of information and resources on the test driven methodology. From their FAQ, the advantages of test driven development are:
Tools for Unit Testing in .NET
Code Coverage The tools for code coverage analysis in .NET are NCover and NCoverGui. The proper use of these tools is a complex topic and Howard van Rooijen has an excellent tutorial at his blog.
I fully recommend test driven development. If you have never tried it, download these tools and try them out on a small project. Happy testing! 21 Dezember C#/VB .NET Coding Guidelines From Iridium SoftwareI found a good document over at Iridium Software discussing coding standards for both C# and VB.NET. At over 100 pages it covers a lot of ground, focusing on C# and VB.NET issues in equal depth. This is great because many other standards documents out there seem to focus much more on the C# side of things. It’s an easy read with straight-to-the-point bullets and easy to follow code samples. It’s more of a recommendation than a strict code of practice. I don’t agree with everything, as I’m sure neither will FXCop. If you or your company don’t have any specific coding standards to follow it’s a good place to start, and if you find a couple of hours over the Christmas break I’d definitely recommend the read.
14 Dezember A .NET CPUA startup company has made a CPU with a tiny CLR and a subset of the .NET CF. Its looks pretty sweet. You can buy a pack which contains a CPU and an interface to hook it into Visual Studio for about 500 USD. I want one. I don't what I'd do with it. Probably turn various household appliances into autmoton battle-bots. Who wants to toaster-war, .NET style? Quote Teeny module runs new ".NET Embedded" software stack 08 Dezember Cached Http Requests in .NETThe WebClient class, found in the System.Net namespace in the .NET framework, is an easy way to get data from http servers into your .NET apps. Until recently I used it a lot for downloading configuration files and graphics for some smart client applications. However, it has a fatal flaw in which is it does not have a mechanism for caching data. This can make applications unnecessarily slow in certain situations. A solution to perform cached http requests in .NET is to use unmanaged calls to WinInet.dll. This library uses the same cache mechanism that Internet Explorer uses. The following class demonstrates how to download an http file in .NET using unmanaged calls to WinInet.dll. Imports System.Text The following code shows how to use the WinInet class to perform an http request. Dim httpReader As New WinInet 02 Dezember Get current method details via reflectionSometimes its handy to know details about the current executing method. For example, you may want to pass the current method name to a logging procedure without hardcoding it. System.Reflection.MethodBase.GetCurrentMethod gives you that detail!
|
|
|