Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm getting an error saying " The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft'(are you missing an assembly reference?).

Below is the complete code in sqlDatabaseSetup.cs -

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.Common;
using Microsoft.Data.Tools.Schema.Sql.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Shop
{
[TestClass()]
public class SqlDatabaseSetup
{

[AssemblyInitialize()]
public static void InitializeAssembly(TestContext ctx)
{
// Setup the test database based on setting in the
// configuration file
SqlDatabaseTestClass.TestService.DeployDatabaseProject();
SqlDatabaseTestClass.TestService.GenerateData();
}

}
}

Similar errors are appearing against "TestClass" & "AssemblyInitialize".

What I have tried:

What shall I do ? Is there any .dll file that needs to be installed?
Posted
Updated 19-Aug-17 22:13pm

1 solution

Add a reference in your project to the Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll - that's why the error says "are you missing an assembly reference?"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900