What I need to do is extract the filename from %%f so I can create the correct dll name.
for %%f in (*.asmx.cs) do (
echo %%f
cmd /c C:\windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /t:library /r:%assemblies% %compileoptions% /out:bin/%%f.dll %%f
)