A recent mention of PostSharp reminded me of this:
Last year where I worked, we were thinking of using PostSharp to inject instrumentation into our code. This was in a Team Foundation Server Team Build / Continuous Integration environment.
Thinking about it, I got a nagging feeling about the way PostSharp operates - it edits the IL that is generated by the compilers. This bothered me a bit.
I wasn't so much concerned that PostSharp would not do its job correctly; I was worried about the fact that this was the first time I could recall hearing about a tool like this. I was concerned that other tools might not take this into account.
Indeed, as we moved along, we did have some problems stemming from the fact that PostSharp was getting confused about which folder the original IL was in. This was breaking our builds. It appeared to be due to a conflict with the MSBUILD target that resolves project references. The conflict appeared to be due to the fact that PostSharp uses a temp directory to store the unmodified versions of the IL.
At any rate, I didn't have StackOverflow to refer to back then! Now that I do, I'd like to ask you all if you know of any other tools that edit IL as part of a build process; or whether Microsoft takes that sort of tool into account in Visual Studio, MSBUILD, Team Build, etc.
Update: Thanks for the answers.
The bottom line seems to be that, at least with VS 2010, Microsoft really should be aware that this sort of thing can happen. So if there are problems in this area in VS2010, then Microsoft may share the blame.