Your project needs to be build with MSBuild in order to run the analysis itself. You probably have legacy website project with no csproj file.
To workaround this, either migrate your project to normal web project with csproj file, or add artificial csproj file that includes all sources from that directory and add that to your solution.