2

I have a Helper project H, with a config file that is to be used as a shared configSource file from other projects. The code in file (SharedConnectionString.config):

<?xml version="1.0" encoding="utf-8"?>
<connectionStrings>
  <add name="myConn" connectionString="Data Source=MyServer;Initial Catalog=MyDb;Persist Security Info=True;User ID=Username; password=PW;" providerName="System.Data.SqlClient" />
</connectionStrings>

I have a test project A that have it's own App.config and the SharedConnectionString.config added as file link

Config files in project A:

Config files in project **A**

On the App.config I have:

 <connectionStrings configSource="SharedConnectionStrings.config" />

Now, the test project compiles, the unit tests run successfully but the Live Unit Test feature from Visual Studio presents an error:

Live Unit Testing error

I tried the solution in here and here. None of there fixed the problem.

Opened an issue with Microsoft to see if help comes from somewhere..

Fábio
  • 477
  • 5
  • 12

0 Answers0