After a few months of using the Paste from Visual Studio plug-in for copying code from VS to Windows Live Writer, I think I’ve found something better for this sort of thing. It’s called Paste as Visual Studio Code and I do like the way it works. The best thing about it is that it’s highly configurable and it does keep the same background you had in VS. If you’re into blogging and you’re using Windows Live Writer and Visual Studio, then you should (a least!) evaluate this plug-in.
ToolsArchive
I”ve started watching MIX sessions and, until now, I can tell you that I’m really impressed with SuperPreview. I’ll be getting the expression tools just to see what it can be done with it (do keep in mind that there’s also a free version for IE).
SVN Codeplex access is down
Just a few weeks ago I was really happy because I was able to start using Tortoise for getting projjects hosted at Codeplex. In these last few days, I just can’t access the damn site through SVN. This is not good, specially if like me, you’re a codeplex user and you don’t want to mess with any of those TFS clients. It looks like I will have to download the MVC code without relying on my beloved Tortoise…Does anyone know what’s going on?
One of the things I’ve been using lately is FxCop. It’s really an interesting tool and I’ve corrected several API problems on my classes after starting using it. In fact, I’ve only found two problems until now:
- Interface explicit implementation
- Incorrect spelling of names
Ok, let’s start by problem number 1. Here’s the code I’m using:
public class Something: ISomething{
void ISomething.DoSomething(){
DoSomething();
}
protected virtual void DoSomething(){
//…
}
}
When FxCop sees this rule, it will automatically report the InterfaceMethodsShouldBeCallableByChildTypes error. The error message says that something like this:
"Explicit method implementations are defined with private accessibility. Classes that derive from classes with explicit method implementations and choose to re-declare them on the class will not be able to call into the base class implementation unless the base class has provided an alternate method with appropriate accessibility. “
Most of the time, I do end up using public implementation method, but sometimes I only want to allow access to that method through the interface. That’s what I’m trying to do in the previous example. Now, if you look at the code, you’ll see that a derived class can customize the behavior of the method by overriding the DoSomething protected method. So, this is one error I don’t like and I tend to classify it as a false positive.
The second problem is even funnier: I’m getting the IdentifiersShouldBeSpelledCorrectly and CompoundWordsShouldBeCasedCorrectly errors. After somme googling, I’ve managed to understand that FxCop ends up using the Office dictionary for checking the words you use in your member names. Well, it happens that my server doesn’t have office installed, so it starts giving me lots and lots of false positives. Looking at the docs,you’ll see that you can add an xml file for adding the allowed and disallowed words.
Since I’m using the command line tool (fxcopcmd),I thought that there should be a way to stop processing some rules. After looking on the docs, I found nothing. So, I’ve decided running the fxcopcmd executable and I’ve found that there is a rid parameter that lets you add or remove rules. So, if you want to remove the annoying spelling rule, you can run something like this:
fxcopcmd –f:myassembly.dll –rid:-”Microsoft.Naming#CA1033” /console
And now you should stop seeing those spelling warnings all over the place.
Codeplex, SvnBridge and Tortoise
PostSharp RTMed…
PostSharp 1.0 is now in RTM. Get it from here.