How may I resolve an error "Couldn't find target rules file for target 'ProjectName' when building a project?

Although I don’t know why, it solved my problem perfectly!