I had the same problem on my HTC Kaiser, but I found a solution.
I found a program that acts like safe mode on a computer.
So if you install that program and restart in safe mode (you need to select safe mode when you boot), you will be able to install the compact framework 3.5.
Probable some locked files prevent the normal installation.
The program is an evaluation version, limited to 14 days, but since you only need it for the framework, you don't need to keep if you don't want to.
The app: SafeMode 3