w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
SSDT Unit Test:. An error occurred while SQL Server unit testing settings were being read from the configuration file

It seems to be that the app.config that is get generated by VS 2013 is empty. I did some research online and lots of try and error and came with the following app.config:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="system.data.localdb"
type="System.Data.LocalDBConfigurationSection,System.Data,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089"/>
    <section name="SqlUnitTesting_VS2013"
type="Microsoft.Data.Tools.Schema.Sql.UnitTesting.Configuration.SqlUnitTestingSection,
Microsoft.Data.Tools.Schema.Sql.UnitTesting, Version=12.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  </configSections>
  <system.data.localdb>
    <localdbinstances>
      <add name="(localdb)ProjectsV12" version="12.0" />
    </localdbinstances>
  </system.data.localdb>
  <SqlUnitTesting_VS2013>
    <DatabaseDeployment
DatabaseProjectFileName="......Database_Project_NameDatabase_Project_Name.sqlproj"
        Configuration="Debug" />
    <DataGeneration ClearDatabase="true" />
    <ExecutionContext Provider="System.Data.SqlClient"
ConnectionString="Data Source=(localdb)ProjectsV12;Initial
Catalog=Database_Name;Integrated Security=True;Pooling=False;Connect
Timeout=30"
        CommandTimeout="30" />
    <PrivilegedContext Provider="System.Data.SqlClient"
ConnectionString="Data Source=(localdb)ProjectsV12;Initial
Catalog=Database_Name;Integrated Security=True;Pooling=False;Connect
Timeout=30"
        CommandTimeout="30" />
  </SqlUnitTesting_VS2013>
</configuration>

Now I get the following error: Failed to deploy database project C:ProjectsDatabase_Project_NameDatabase_Project_NameDatabase_Project_Name.sqlproj. But this seems to be because my database depends on other databases and I need to deploy the other database with my database.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.