public static void ClassInitialize(TestContext testContext) { MessageFilter.Register(); Type type = System.Type.GetTypeFromProgID("VisualStudio.DTE.15.0"); object inst = System.Activator.CreateInstance(type, true); dte = (EnvDTE80.DTE2)inst; dte.Solution.Open(Path.GetFullPath(@"../../artifacts/tsconfig/Tsconfig.sln")); solution = dte.Solution; settings = new MockSettings(); }
public static void ClassInitialize(TestContext testContext) { // This is the official fix for the unused parameter warning IDE0060. Nice. // https://github.com/dotnet/roslyn/issues/35063#issuecomment-484616262 _ = testContext; MessageFilter.Register(); Type type = Type.GetTypeFromProgID("VisualStudio.DTE.15.0"); object inst = Activator.CreateInstance(type, true); dte = (EnvDTE80.DTE2)inst; dte.Solution.Open(Path.GetFullPath(@"../../artifacts/bad-tslint-json/bad-tslint-json.sln")); solution = dte.Solution; settings = new MockSettings(); }
protected void Initialize(string solutionPath) { MessageFilter.Register(); Type type = Type.GetTypeFromProgID("VisualStudio.DTE.15.0"); object inst = Activator.CreateInstance(type, true); dte = (EnvDTE80.DTE2)inst; var test = (EnvDTE.DTE)inst; //test. dte.Solution.Open(Path.GetFullPath(solutionPath)); solution = dte.Solution; settings = new MockSettings() { UseTsConfig = false }; WebLinterPackage.Settings = settings; WebLinterPackage.Dte = dte; }