Fix for templates with shared projects

When a project is added to the solution, check if it already contains a
reference to a shared project, and in that case, properly initialize the
reference.

Fixes bug #19663 - Templates do not understand how to reference Shared
Asset Projects
Fix msbuild builder issue

Improve the code that reads the reference to the remote builder.
It avoids connection issues when the system writes something
unexpected in stderr.