In my case, I decided I wanted to get rid of the EF 5.x DbContext Generator. I got this error when I selected to add it, but then deleted "Model1.Context.tt" and "Model1.tt" after thinking better of it. Unfortunately for me, I didn't realize that's not all I had to do. When I did another "Build", I got the OP's error.
My next steps: I went to Model1.tt, cleared out $edmxInputFile$
and left it as an empty string and clicked to build the project. This gave me an UnauthorizedException error (which is fine, I didn't want it modifying anything, anyway). I just wanted it to get rid of the original error.
Next, I did some poking around and I found out that my project's ".csproj" file was modified with this:
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
Now I don't think this GUID is going to be the same in all cases of the error, or even everytime anyone adds on the EF 5.x DbContext Generator. But if your .csproj file (NOTE: this is different than your .csproj.user file) has been changed (hopefully it's in source control and you can tell this), you should be able to figure out how. I deleted this section, did a "Build", and got rid of my errors.
If it's not in source control, you can always create a dummy project and compare your .csproj file to that project's file, and do some trial and error by taking out anything that is extra on your .csproj and doing a "Build" (saving things to Notepad, putting them back if it doesn't clear your error). I know this is a helluva way to do it, but at least you won't waste time redoing your entire solution.