There have been many suggestions to get this working. I will give you three that worked for me in the order they should be tried.
- Restart your computer. Some of the projects files run in the background. Stop them if you know what they are. Restarting is not necessary just end their tasks) and then try again.
- Go to Solution Explorer, right-click your project go to properties, click Debug, at the bottom there is a check box, click the check box to ‘Enable SQL Server Debugging’.
- Go to Solution Explorer, right-click your project go to properties, click Debug, at the bottom there is a check box, un-check the check box that states ‘Enable the Visual Studio hosting process’.