For me, I had some references that were causing this to happen. I removed microsoft.owin.cors and added only the following three owin related dependencies:
then did a "clean" and a "rebuild", the correct IAppBuilder linked and the build error went away.