If the assembly IS referenced, but the error still remains, it must be a caching problem on VS's part, use dotnet build
on project dir via CLI to check if the error is true, if it really is a caching problem, just delete the bin/obj and .vs folders