It seems that the references in the release versjon of the sample project point to an older version of most (all?) bineries (dll's).
The references in the sample project points to versions "5.1.281.0" (located in "C:\Program Files\EPiServer\5.1.281.0").
The version of the dll's contained in the sample project itself are of a newer version "5.1.422.4".
To get the PublicTemplates project to compile I had to change (at least some of) these references to the last version of the bineries.
I'm having the same problem. I previously installed RC3, and then I upgraded to RC4 on one site. My project references now go to binaries in the C:\Program Files\EPiServer\5.1.358.4 folder. No 5.1.422.4 folder was created upon installation. Perhaps any release candidates should be uninstalled first? There is nothing about this in the installation instructions.
The error I get when trying to compile the project is:
'EPiServer.Web.UrlRewriteProvider' does not contain a definition for 'IsFurlEnabled'
As a quick fix to get the project compiling is as mentioned setting all the "EPiServer.xxxx" project references in VS to point to the dll's copied to the PublicTemplates project's bin folder.
Btw: It also seems that the dll's of the correct(last) versjon is found under "C:\Program Files\EPiServer\Binaries\[separate folders for each dll]"...