diff --git a/packages.config b/packages.config
index 62fb10456a..063cb9442a 100644
--- a/packages.config
+++ b/packages.config
@@ -35,6 +35,7 @@
+
diff --git a/vsintegration/src/FSharp.Editor/ColorizationService.fs b/vsintegration/src/FSharp.Editor/ColorizationService.fs
index f9990bedcb..7a2610613e 100644
--- a/vsintegration/src/FSharp.Editor/ColorizationService.fs
+++ b/vsintegration/src/FSharp.Editor/ColorizationService.fs
@@ -140,7 +140,7 @@ type internal FSharpColorizationService() =
| Some(options) ->
let defines = CompilerEnvironment.GetCompilationDefinesForEditing(document.Name, options.OtherOptions |> Seq.toList)
if sourceTextTask.Status = TaskStatus.RanToCompletion then
- result.AddRange(FSharpColorizationService.GetColorizationData(sourceTextTask.Result, textSpan, None, defines, cancellationToken))
+ result.AddRange(FSharpColorizationService.GetColorizationData(sourceTextTask.Result, textSpan, Some(document.FilePath), defines, cancellationToken))
| None -> ()
, cancellationToken)
@@ -153,7 +153,8 @@ type internal FSharpColorizationService() =
let options = CommonRoslynHelpers.GetFSharpProjectOptionsForRoslynProject(document.Project)
let! sourceText = document.GetTextAsync(cancellationToken) |> Async.AwaitTask
let! parseResults = FSharpChecker.Instance.ParseFileInProject(document.Name, sourceText.ToString(), options)
- let! checkResultsAnswer = FSharpChecker.Instance.CheckFileInProject(parseResults, document.Name, 0, textSpan.ToString(), options)
+ let! textVersion = document.GetTextVersionAsync(cancellationToken) |> Async.AwaitTask
+ let! checkResultsAnswer = FSharpChecker.Instance.CheckFileInProject(parseResults, document.Name, textVersion.GetHashCode(), textSpan.ToString(), options)
let extraColorizationData = match checkResultsAnswer with
| FSharpCheckFileAnswer.Aborted -> failwith "Compilation isn't complete yet"
diff --git a/vsintegration/src/FSharp.Editor/CommonRoslynHelpers.fs b/vsintegration/src/FSharp.Editor/CommonRoslynHelpers.fs
index 38daaee81e..f0ffc23872 100644
--- a/vsintegration/src/FSharp.Editor/CommonRoslynHelpers.fs
+++ b/vsintegration/src/FSharp.Editor/CommonRoslynHelpers.fs
@@ -18,6 +18,16 @@ module internal CommonRoslynHelpers =
let endPosition = sourceText.Lines.[range.EndLine - 1].Start + range.EndColumn
TextSpan(startPosition, endPosition - startPosition)
+ let GetTaskAction(computation: Async) =
+ // Shortcut due to nonstandard way of converting Async to Task
+ let action() =
+ try
+ computation |> Async.RunSynchronously
+ with ex ->
+ Assert.Exception(ex.GetBaseException())
+ raise(ex.GetBaseException())
+ Action action
+
let GetCompletedTaskResult(task: Task<'TResult>) =
if task.Status = TaskStatus.RanToCompletion then
task.Result
diff --git a/vsintegration/src/FSharp.Editor/CompletionProvider.fs b/vsintegration/src/FSharp.Editor/CompletionProvider.fs
new file mode 100644
index 0000000000..29c6ef0829
--- /dev/null
+++ b/vsintegration/src/FSharp.Editor/CompletionProvider.fs
@@ -0,0 +1,133 @@
+// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+namespace Microsoft.VisualStudio.FSharp.Editor
+
+open System
+open System.Composition
+open System.Collections.Concurrent
+open System.Collections.Generic
+open System.Collections.Immutable
+open System.Threading
+open System.Threading.Tasks
+open System.Linq
+open System.Runtime.CompilerServices
+
+open Microsoft.CodeAnalysis
+open Microsoft.CodeAnalysis.Completion
+open Microsoft.CodeAnalysis.Classification
+open Microsoft.CodeAnalysis.Editor
+open Microsoft.CodeAnalysis.Editor.Implementation.Debugging
+open Microsoft.CodeAnalysis.Editor.Shared.Utilities
+open Microsoft.CodeAnalysis.Formatting
+open Microsoft.CodeAnalysis.Host.Mef
+open Microsoft.CodeAnalysis.Options
+open Microsoft.CodeAnalysis.Text
+
+open Microsoft.VisualStudio.FSharp.LanguageService
+open Microsoft.VisualStudio.Text
+open Microsoft.VisualStudio.Text.Tagging
+open Microsoft.VisualStudio.Shell
+open Microsoft.VisualStudio.Shell.Interop
+
+open Microsoft.FSharp.Compiler.Parser
+open Microsoft.FSharp.Compiler.Range
+open Microsoft.FSharp.Compiler.SourceCodeServices
+
+type internal FSharpCompletionProvider(workspace: Workspace, serviceProvider: SVsServiceProvider) =
+ inherit CompletionProvider()
+
+ static let completionTriggers = [ '.' ]
+ static let declarationItemsCache = ConditionalWeakTable()
+
+ let xmlMemberIndexService = serviceProvider.GetService(typeof) :?> IVsXMLMemberIndexService
+ let documentationBuilder = XmlDocumentation.CreateDocumentationBuilder(xmlMemberIndexService, serviceProvider.DTE)
+
+ static member ShouldTriggerCompletionAux(sourceText: SourceText, caretPosition: int, trigger: CompletionTriggerKind, filePath: string, defines: string list) =
+ // Skip if we are at the start of a document
+ if caretPosition = 0 then
+ false
+
+ // Skip if it was triggered by an operation other than insertion
+ else if not (trigger = CompletionTriggerKind.Insertion) then
+ false
+
+ // Skip if we are not on a completion trigger
+ else if not (completionTriggers |> Seq.contains(sourceText.[caretPosition - 1])) then
+ false
+
+ // Trigger completion if we are on a valid classification type
+ else
+ let triggerPosition = caretPosition - 1
+ let textLine = sourceText.Lines.GetLineFromPosition(triggerPosition)
+ let classifiedSpanOption =
+ FSharpColorizationService.GetColorizationData(sourceText, textLine.Span, Some(filePath), defines, CancellationToken.None)
+ |> Seq.tryFind(fun classifiedSpan -> classifiedSpan.TextSpan.Contains(triggerPosition))
+
+ match classifiedSpanOption with
+ | None -> false
+ | Some(classifiedSpan) ->
+ match classifiedSpan.ClassificationType with
+ | ClassificationTypeNames.Comment -> false
+ | ClassificationTypeNames.StringLiteral -> false
+ | ClassificationTypeNames.ExcludedCode -> false
+ | _ -> true // anything else is a valid classification type
+
+ static member ProvideCompletionsAsyncAux(sourceText: SourceText, caretPosition: int, options: FSharpProjectOptions, filePath: string, textVersionHash: int) = async {
+ let! parseResults = FSharpChecker.Instance.ParseFileInProject(filePath, sourceText.ToString(), options)
+ let! checkFileAnswer = FSharpChecker.Instance.CheckFileInProject(parseResults, filePath, textVersionHash, sourceText.ToString(), options)
+ let checkFileResults = match checkFileAnswer with
+ | FSharpCheckFileAnswer.Aborted -> failwith "Compilation isn't complete yet"
+ | FSharpCheckFileAnswer.Succeeded(results) -> results
+
+ let textLine = sourceText.Lines.GetLineFromPosition(caretPosition)
+ let textLineNumber = textLine.LineNumber + 1 // Roslyn line numbers are zero-based
+ let qualifyingNames, partialName = QuickParse.GetPartialLongNameEx(textLine.ToString(), caretPosition - textLine.Start - 1)
+ let! declarations = checkFileResults.GetDeclarationListInfo(Some(parseResults), textLineNumber, caretPosition, textLine.ToString(), qualifyingNames, partialName)
+
+ let results = List()
+
+ for declarationItem in declarations.Items do
+ let completionItem = CompletionItem.Create(declarationItem.Name)
+ declarationItemsCache.Add(completionItem.DisplayText, declarationItem)
+ results.Add(completionItem)
+
+ return results
+ }
+
+
+ override this.ShouldTriggerCompletion(sourceText: SourceText, caretPosition: int, trigger: CompletionTrigger, _: OptionSet) =
+ let documentId = workspace.GetDocumentIdInCurrentContext(sourceText.Container)
+ let document = workspace.CurrentSolution.GetDocument(documentId)
+
+ match FSharpLanguageService.GetOptions(document.Project.Id) with
+ | None -> false
+ | Some(options) ->
+ let defines = CompilerEnvironment.GetCompilationDefinesForEditing(document.Name, options.OtherOptions |> Seq.toList)
+ FSharpCompletionProvider.ShouldTriggerCompletionAux(sourceText, caretPosition, trigger.Kind, document.FilePath, defines)
+
+ override this.ProvideCompletionsAsync(context: Microsoft.CodeAnalysis.Completion.CompletionContext) =
+ let computation = async {
+ match FSharpLanguageService.GetOptions(context.Document.Project.Id) with
+ | Some(options) ->
+ let! sourceText = context.Document.GetTextAsync(context.CancellationToken) |> Async.AwaitTask
+ let! textVersion = context.Document.GetTextVersionAsync(context.CancellationToken) |> Async.AwaitTask
+ let! results = FSharpCompletionProvider.ProvideCompletionsAsyncAux(sourceText, context.Position, options, context.Document.FilePath, textVersion.GetHashCode())
+ context.AddItems(results)
+ | None -> ()
+ }
+
+ Task.Run(CommonRoslynHelpers.GetTaskAction(computation), context.CancellationToken)
+
+ override this.GetDescriptionAsync(_: Document, completionItem: CompletionItem, cancellationToken: CancellationToken): Task =
+ let computation = async {
+ let exists, declarationItem = declarationItemsCache.TryGetValue(completionItem.DisplayText)
+ if exists then
+ let! description = declarationItem.DescriptionTextAsync
+ let datatipText = XmlDocumentation.BuildDataTipText(documentationBuilder, description)
+ return CompletionDescription.FromText(datatipText)
+ else
+ return CompletionDescription.Empty
+ }
+
+ Async.StartAsTask(computation, TaskCreationOptions.None, cancellationToken)
+ .ContinueWith(CommonRoslynHelpers.GetCompletedTaskResult, cancellationToken)
\ No newline at end of file
diff --git a/vsintegration/src/FSharp.Editor/CompletionService.fs b/vsintegration/src/FSharp.Editor/CompletionService.fs
new file mode 100644
index 0000000000..de2406cd1a
--- /dev/null
+++ b/vsintegration/src/FSharp.Editor/CompletionService.fs
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+namespace Microsoft.VisualStudio.FSharp.Editor
+
+open System
+open System.Composition
+open System.Collections.Concurrent
+open System.Collections.Generic
+open System.Collections.Immutable
+open System.Threading
+open System.Threading.Tasks
+open System.Linq
+
+open Microsoft.CodeAnalysis
+open Microsoft.CodeAnalysis.Completion
+open Microsoft.CodeAnalysis.Editor
+open Microsoft.CodeAnalysis.Editor.Implementation.Debugging
+open Microsoft.CodeAnalysis.Editor.Shared.Utilities
+open Microsoft.CodeAnalysis.Formatting
+open Microsoft.CodeAnalysis.Host
+open Microsoft.CodeAnalysis.Host.Mef
+open Microsoft.CodeAnalysis.Text
+
+open Microsoft.VisualStudio.FSharp.LanguageService
+open Microsoft.VisualStudio.Text
+open Microsoft.VisualStudio.Text.Tagging
+open Microsoft.VisualStudio.Shell
+
+open Microsoft.FSharp.Compiler.Parser
+open Microsoft.FSharp.Compiler.SourceCodeServices
+open Microsoft.FSharp.Compiler.Range
+
+type internal FSharpCompletionService(workspace: Workspace, serviceProvider: SVsServiceProvider) =
+ inherit CompletionServiceWithProviders(workspace)
+
+ let builtInProviders = ImmutableArray.Create(FSharpCompletionProvider(workspace, serviceProvider))
+ let completionRules = CompletionRules.Default.WithDismissIfEmpty(true).WithDismissIfLastCharacterDeleted(true).WithDefaultEnterKeyRule(EnterKeyRule.Never)
+
+ override this.Language = FSharpCommonConstants.FSharpLanguageName
+ override this.GetBuiltInProviders() = builtInProviders
+ override this.GetRules() = completionRules
diff --git a/vsintegration/src/FSharp.Editor/CompletionServiceFactory.fs b/vsintegration/src/FSharp.Editor/CompletionServiceFactory.fs
new file mode 100644
index 0000000000..f6bffa2ece
--- /dev/null
+++ b/vsintegration/src/FSharp.Editor/CompletionServiceFactory.fs
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+namespace Microsoft.VisualStudio.FSharp.Editor
+
+open System
+open System.Composition
+open System.Collections.Concurrent
+open System.Collections.Generic
+open System.Collections.Immutable
+open System.Threading
+open System.Threading.Tasks
+open System.Linq
+
+open Microsoft.CodeAnalysis
+open Microsoft.CodeAnalysis.Completion
+open Microsoft.CodeAnalysis.Editor
+open Microsoft.CodeAnalysis.Editor.Implementation.Debugging
+open Microsoft.CodeAnalysis.Editor.Shared.Utilities
+open Microsoft.CodeAnalysis.Formatting
+open Microsoft.CodeAnalysis.Host
+open Microsoft.CodeAnalysis.Host.Mef
+open Microsoft.CodeAnalysis.Text
+
+open Microsoft.VisualStudio.FSharp.LanguageService
+open Microsoft.VisualStudio.Text
+open Microsoft.VisualStudio.Text.Tagging
+open Microsoft.VisualStudio.Shell
+
+open Microsoft.FSharp.Compiler.Parser
+open Microsoft.FSharp.Compiler.SourceCodeServices
+open Microsoft.FSharp.Compiler.Range
+
+[]
+[, FSharpCommonConstants.FSharpLanguageName)>]
+type internal FSharpCompletionServiceFactory [] (serviceProvider: SVsServiceProvider) =
+ interface ILanguageServiceFactory with
+ member this.CreateLanguageService(hostLanguageServices: HostLanguageServices) : ILanguageService =
+ upcast new FSharpCompletionService(hostLanguageServices.WorkspaceServices.Workspace, serviceProvider)
diff --git a/vsintegration/src/FSharp.Editor/DocumentDiagnosticAnalyzer.fs b/vsintegration/src/FSharp.Editor/DocumentDiagnosticAnalyzer.fs
index 9d81eb880f..082fe51949 100644
--- a/vsintegration/src/FSharp.Editor/DocumentDiagnosticAnalyzer.fs
+++ b/vsintegration/src/FSharp.Editor/DocumentDiagnosticAnalyzer.fs
@@ -39,11 +39,11 @@ type internal FSharpDocumentDiagnosticAnalyzer() =
Diagnostic.Create(descriptor, Location.Create(filePath, correctedTextSpan , linePositionSpan))
- static member GetDiagnostics(filePath: string, sourceText: SourceText, options: FSharpProjectOptions, addSemanticErrors: bool) =
+ static member GetDiagnostics(filePath: string, sourceText: SourceText, textVersionHash: int, options: FSharpProjectOptions, addSemanticErrors: bool) =
let parseResults = FSharpChecker.Instance.ParseFileInProject(filePath, sourceText.ToString(), options) |> Async.RunSynchronously
let errors =
if addSemanticErrors then
- let checkResultsAnswer = FSharpChecker.Instance.CheckFileInProject(parseResults, filePath, 0, sourceText.ToString(), options) |> Async.RunSynchronously
+ let checkResultsAnswer = FSharpChecker.Instance.CheckFileInProject(parseResults, filePath, textVersionHash, sourceText.ToString(), options) |> Async.RunSynchronously
match checkResultsAnswer with
| FSharpCheckFileAnswer.Aborted -> failwith "Compilation isn't complete yet"
| FSharpCheckFileAnswer.Succeeded(results) -> results.Errors
@@ -65,7 +65,8 @@ type internal FSharpDocumentDiagnosticAnalyzer() =
match FSharpLanguageService.GetOptions(document.Project.Id) with
| Some(options) ->
let! sourceText = document.GetTextAsync(cancellationToken) |> Async.AwaitTask
- return FSharpDocumentDiagnosticAnalyzer.GetDiagnostics(document.FilePath, sourceText, options, false)
+ let! textVersion = document.GetTextVersionAsync(cancellationToken) |> Async.AwaitTask
+ return FSharpDocumentDiagnosticAnalyzer.GetDiagnostics(document.FilePath, sourceText, textVersion.GetHashCode(), options, false)
| None -> return ImmutableArray.Empty
}
@@ -78,7 +79,8 @@ type internal FSharpDocumentDiagnosticAnalyzer() =
match FSharpLanguageService.GetOptions(document.Project.Id) with
| Some(options) ->
let! sourceText = document.GetTextAsync(cancellationToken) |> Async.AwaitTask
- return FSharpDocumentDiagnosticAnalyzer.GetDiagnostics(document.FilePath, sourceText, options, true)
+ let! textVersion = document.GetTextVersionAsync(cancellationToken) |> Async.AwaitTask
+ return FSharpDocumentDiagnosticAnalyzer.GetDiagnostics(document.FilePath, sourceText, textVersion.GetHashCode(), options, true)
| None -> return ImmutableArray.Empty
}
diff --git a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj
index 0283842508..9235da55b9 100644
--- a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj
+++ b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj
@@ -55,6 +55,15 @@
Diagnostics\DocumentDiagnosticAnalyzer.fs
+
+ Completion\CompletionProvider.fs
+
+
+ Completion\CompletionService.fs
+
+
+ Completion\CompletionServiceFactory.fs
+
@@ -83,6 +92,8 @@
+
+
$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Threading.14.1.131\lib\net45\Microsoft.VisualStudio.Threading.dll
diff --git a/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj b/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj
index 4eb8f49181..69f97bb918 100644
--- a/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj
+++ b/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj
@@ -65,32 +65,43 @@
$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Designer.Interfaces.1.1.4322\lib\microsoft.visualstudio.designer.interfaces.dll
-
$(FSharpSourcesRoot)\..\packages\RoslynDependencies.Microsoft.VisualStudio.Text.Internal.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Internal.dll
+ True
$(FSharpSourcesRoot)\..\packages\RoslynDependencies.Microsoft.VisualStudio.Platform.VSEditor.$(RoslynVSPackagesVersion)\lib\net46\Microsoft.VisualStudio.Platform.VSEditor.dll
+ True
+
+
+ $(FSharpSourcesRoot)\..\packages\RoslynDependencies.Microsoft.VisualStudio.Platform.VSEditor.$(RoslynVSPackagesVersion)\lib\net46\Microsoft.VisualStudio.Platform.VSEditor.Interop.dll
+ True
$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Threading.14.1.131\lib\net45\Microsoft.VisualStudio.Threading.dll
+ True
$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.Wpf.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.Wpf.dll
+ True
$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Data.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Data.dll
+ True
$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.CoreUtility.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.CoreUtility.dll
+ True
$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Design.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll
+ True
$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).dll
+ True
True
diff --git a/vsintegration/tests/unittests/CompletionProviderTests.fs b/vsintegration/tests/unittests/CompletionProviderTests.fs
new file mode 100644
index 0000000000..74473883ef
--- /dev/null
+++ b/vsintegration/tests/unittests/CompletionProviderTests.fs
@@ -0,0 +1,127 @@
+// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+namespace Microsoft.VisualStudio.FSharp.Editor.Tests.Roslyn
+
+open System
+open System.Threading
+open System.Linq
+
+open NUnit.Framework
+
+open Microsoft.CodeAnalysis.Completion
+open Microsoft.CodeAnalysis.Classification
+open Microsoft.CodeAnalysis.Text
+open Microsoft.VisualStudio.FSharp.Editor
+
+open Microsoft.VisualStudio.FSharp.Editor
+open Microsoft.VisualStudio.FSharp.LanguageService
+
+open Microsoft.FSharp.Compiler.SourceCodeServices
+open Microsoft.FSharp.Compiler.Range
+
+[]
+type CompletionProviderTests() =
+ let filePath = "C:\\test.fs"
+ let options: FSharpProjectOptions = {
+ ProjectFileName = "C:\\test.fsproj"
+ ProjectFileNames = [| filePath |]
+ ReferencedProjects = [| |]
+ OtherOptions = [| |]
+ IsIncompleteTypeCheckEnvironment = true
+ UseScriptResolutionRules = false
+ LoadTime = DateTime.MaxValue
+ UnresolvedReferences = None
+ }
+
+ member private this.VerifyCompletionList(fileContents: string, marker: string, expected: string list, unexpected: string list) =
+ let caretPosition = fileContents.IndexOf(marker) + marker.Length
+ let results = FSharpCompletionProvider.ProvideCompletionsAsyncAux(SourceText.From(fileContents), caretPosition, options, filePath, 0) |>
+ Async.RunSynchronously |>
+ Seq.map(fun result -> result.DisplayText)
+
+ for item in expected do
+ Assert.IsTrue(results.Contains(item), "Completions should contain '{0}'. Got '{1}'.", item, String.Join(", ", results))
+
+ for item in unexpected do
+ Assert.IsFalse(results.Contains(item), "Completions should not contain '{0}'. Got '{1}'", item, String.Join(", ", results))
+
+ []
+ []
+ []
+ []
+ []
+ []
+ []
+ []
+ member this.ShouldTriggerCompletionAtCorrectMarkers(marker: string, shouldBeTriggered: bool) =
+ let fileContents = """
+let x = 1
+let y = 2
+System.Console.WriteLine(x + y)
+"""
+
+ let caretPosition = fileContents.IndexOf(marker) + marker.Length
+ let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, filePath, [])
+ Assert.AreEqual(shouldBeTriggered, triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should compute the correct result")
+
+ []
+ []
+ []
+ member this.ShouldNotTriggerCompletionAfterAnyTriggerOtherThanInsertion(triggerKind: CompletionTriggerKind) =
+ let fileContents = "System.Console.WriteLine(123)"
+ let caretPosition = fileContents.IndexOf("System.")
+ let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, triggerKind, filePath, [])
+ Assert.IsFalse(triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should not trigger")
+
+ []
+ member this.ShouldNotTriggerCompletionInStringLiterals() =
+ let fileContents = "let literal = \"System.Console.WriteLine()\""
+ let caretPosition = fileContents.IndexOf("System.")
+ let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, filePath, [])
+ Assert.IsFalse(triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should not trigger")
+
+ []
+ member this.ShouldNotTriggerCompletionInComments() =
+ let fileContents = """
+(*
+This is a comment
+System.Console.WriteLine()
+*)
+"""
+ let caretPosition = fileContents.IndexOf("System.")
+ let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, filePath, [])
+ Assert.IsFalse(triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should not trigger")
+
+ []
+ member this.ShouldNotTriggerCompletionInExcludedCode() =
+ let fileContents = """
+#if UNDEFINED
+System.Console.WriteLine()
+#endif
+"""
+ let caretPosition = fileContents.IndexOf("System.")
+ let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, filePath, [])
+ Assert.IsFalse(triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should not trigger")
+
+ []
+ member this.ShouldDisplayTypeMembers() =
+ let fileContents = """
+type T1() =
+ member this.M1 = 5
+ member this.M2 = "literal"
+
+[]
+let main argv =
+ let obj = T1()
+ obj.
+"""
+ this.VerifyCompletionList(fileContents, "obj.", ["M1"; "M2"], ["System"])
+
+ []
+ member this.ShouldDisplaySystemNamespace() =
+ let fileContents = """
+type T1 =
+ member this.M1 = 5
+ member this.M2 = "literal"
+System.Console.WriteLine()
+"""
+ this.VerifyCompletionList(fileContents, "System.", ["Console"; "Array"; "String"], ["T1"; "M1"; "M2"])
diff --git a/vsintegration/tests/unittests/DocumentDiagnosticAnalyzerTests.fs b/vsintegration/tests/unittests/DocumentDiagnosticAnalyzerTests.fs
index 6d39515f76..0b690a3c6f 100644
--- a/vsintegration/tests/unittests/DocumentDiagnosticAnalyzerTests.fs
+++ b/vsintegration/tests/unittests/DocumentDiagnosticAnalyzerTests.fs
@@ -34,11 +34,11 @@ type DocumentDiagnosticAnalyzerTests() =
}
member private this.VerifyNoErrors(fileContents: string) =
- let errors = FSharpDocumentDiagnosticAnalyzer.GetDiagnostics(filePath, SourceText.From(fileContents), options, true)
+ let errors = FSharpDocumentDiagnosticAnalyzer.GetDiagnostics(filePath, SourceText.From(fileContents), 0, options, true)
Assert.AreEqual(0, errors.Length, "There should be no errors generated")
member private this.VerifyErrorAtMarker(fileContents: string, expectedMarker: string, ?expectedMessage: string) =
- let errors = FSharpDocumentDiagnosticAnalyzer.GetDiagnostics(filePath, SourceText.From(fileContents), options, true) |>
+ let errors = FSharpDocumentDiagnosticAnalyzer.GetDiagnostics(filePath, SourceText.From(fileContents), 0, options, true) |>
Seq.filter(fun e -> e.Severity = DiagnosticSeverity.Error) |> Seq.toArray
Assert.AreEqual(1, errors.Length, "There should be exactly one error generated")
let actualError = errors.[0]
@@ -51,7 +51,7 @@ type DocumentDiagnosticAnalyzerTests() =
Assert.AreEqual(expectedEnd, actualError.Location.SourceSpan.End, "Error end positions should match")
member private this.VerifyDiagnosticBetweenMarkers(fileContents: string, expectedMessage: string, expectedSeverity: DiagnosticSeverity) =
- let errors = FSharpDocumentDiagnosticAnalyzer.GetDiagnostics(filePath, SourceText.From(fileContents), options, true) |>
+ let errors = FSharpDocumentDiagnosticAnalyzer.GetDiagnostics(filePath, SourceText.From(fileContents), 0, options, true) |>
Seq.filter(fun e -> e.Severity = expectedSeverity) |> Seq.toArray
Assert.AreEqual(1, errors.Length, "There should be exactly one error generated")
let actualError = errors.[0]
diff --git a/vsintegration/tests/unittests/Tests.Build.fs b/vsintegration/tests/unittests/Tests.Build.fs
index 9c870e2eb4..b30b37f700 100644
--- a/vsintegration/tests/unittests/Tests.Build.fs
+++ b/vsintegration/tests/unittests/Tests.Build.fs
@@ -53,7 +53,7 @@ type FauxHostObject() =
interface ITaskHost
// no members
-[][]
+[]
type Build() =
(* Asserts ----------------------------------------------------------------------------- *)
let AssertEqual expected actual =
diff --git a/vsintegration/tests/unittests/Tests.InternalCollections.fs b/vsintegration/tests/unittests/Tests.InternalCollections.fs
index f4c75998bb..0fac842dd6 100644
--- a/vsintegration/tests/unittests/Tests.InternalCollections.fs
+++ b/vsintegration/tests/unittests/Tests.InternalCollections.fs
@@ -8,7 +8,7 @@ open NUnit.Framework
open Internal.Utilities.Collections
-[][]
+[]
type MruCache =
new() = { }
@@ -113,7 +113,7 @@ type MruCache =
Assert.IsTrue(discarded.Value = ["y";"x";"Apple";"Banana"], "Check6")
#endif
-[][]
+[]
type AgedLookup() =
let mutable hold197 : byte [] = null
let mutable hold198 : byte [] = null
diff --git a/vsintegration/tests/unittests/Tests.LanguageService.Completion.fs b/vsintegration/tests/unittests/Tests.LanguageService.Completion.fs
index 3fc1e1b30c..2d603c726b 100644
--- a/vsintegration/tests/unittests/Tests.LanguageService.Completion.fs
+++ b/vsintegration/tests/unittests/Tests.LanguageService.Completion.fs
@@ -24,7 +24,7 @@ module StandardSettings =
let AC x y = AutoCompleteExpected(x,y)
let DC x y = DotCompleteExpected(x,y)
-[][]
+[]
type UsingMSBuild() as this =
inherit LanguageServiceBaseTests()
@@ -7701,7 +7701,7 @@ let rec f l =
// Context project system
-[][]
+[]
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
diff --git a/vsintegration/tests/unittests/Tests.LanguageService.ErrorList.fs b/vsintegration/tests/unittests/Tests.LanguageService.ErrorList.fs
index 88acaf31ef..e06e5d29f2 100644
--- a/vsintegration/tests/unittests/Tests.LanguageService.ErrorList.fs
+++ b/vsintegration/tests/unittests/Tests.LanguageService.ErrorList.fs
@@ -12,7 +12,7 @@ open UnitTests.TestLib.Utils
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
-[][]
+[]
type UsingMSBuild() as this =
inherit LanguageServiceBaseTests()
@@ -910,6 +910,6 @@ but here has type
Assert.AreEqual(1,warnList.Length)
// Context project system
-[][]
+[]
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
diff --git a/vsintegration/tests/unittests/Tests.LanguageService.ErrorRecovery.fs b/vsintegration/tests/unittests/Tests.LanguageService.ErrorRecovery.fs
index 1bf94d1df5..cc95a5dabd 100644
--- a/vsintegration/tests/unittests/Tests.LanguageService.ErrorRecovery.fs
+++ b/vsintegration/tests/unittests/Tests.LanguageService.ErrorRecovery.fs
@@ -12,7 +12,7 @@ open UnitTests.TestLib.Utils
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
-[][]
+[]
type UsingMSBuild() =
inherit LanguageServiceBaseTests()
@@ -266,6 +266,6 @@ type UsingMSBuild() =
// Context project system
-[][]
+[]
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
\ No newline at end of file
diff --git a/vsintegration/tests/unittests/Tests.LanguageService.F1Keyword.fs b/vsintegration/tests/unittests/Tests.LanguageService.F1Keyword.fs
index afb4de9408..a78ccc9ba8 100644
--- a/vsintegration/tests/unittests/Tests.LanguageService.F1Keyword.fs
+++ b/vsintegration/tests/unittests/Tests.LanguageService.F1Keyword.fs
@@ -11,7 +11,7 @@ open UnitTests.TestLib.Utils
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
-[][]
+[]
type UsingMSBuild() =
inherit LanguageServiceBaseTests()
@@ -372,6 +372,6 @@ type UsingMSBuild() =
// Context project system
-[][]
+[]
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
\ No newline at end of file
diff --git a/vsintegration/tests/unittests/Tests.LanguageService.General.fs b/vsintegration/tests/unittests/Tests.LanguageService.General.fs
index ca3d6b3829..264522638e 100644
--- a/vsintegration/tests/unittests/Tests.LanguageService.General.fs
+++ b/vsintegration/tests/unittests/Tests.LanguageService.General.fs
@@ -18,7 +18,7 @@ open UnitTests.TestLib.Utils
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
-[][]
+[]
module IFSharpSource =
[]
@@ -55,7 +55,7 @@ module IFSharpSource =
-[][]
+[]
type UsingMSBuild() =
inherit LanguageServiceBaseTests()
@@ -484,7 +484,7 @@ type UsingMSBuild() =
// Context project system
-[][]
+[]
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
diff --git a/vsintegration/tests/unittests/Tests.LanguageService.GotoDefinition.fs b/vsintegration/tests/unittests/Tests.LanguageService.GotoDefinition.fs
index 32840ed447..f4cc7741cf 100644
--- a/vsintegration/tests/unittests/Tests.LanguageService.GotoDefinition.fs
+++ b/vsintegration/tests/unittests/Tests.LanguageService.GotoDefinition.fs
@@ -14,7 +14,7 @@ open System.Text.RegularExpressions
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
-[][]
+[]
type UsingMSBuild() =
inherit LanguageServiceBaseTests()
@@ -1449,6 +1449,6 @@ type UsingMSBuild() =
// Context project system
-[][]
+[]
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
diff --git a/vsintegration/tests/unittests/Tests.LanguageService.IncrementalBuild.fs b/vsintegration/tests/unittests/Tests.LanguageService.IncrementalBuild.fs
index dc636cef10..41725a204f 100644
--- a/vsintegration/tests/unittests/Tests.LanguageService.IncrementalBuild.fs
+++ b/vsintegration/tests/unittests/Tests.LanguageService.IncrementalBuild.fs
@@ -24,7 +24,7 @@ module internal Vector =
Vector.Demultiplex taskname Identity input
-[][]
+[]
[]
[]
type IncrementalBuild() =
diff --git a/vsintegration/tests/unittests/Tests.LanguageService.NavigationBar.fs b/vsintegration/tests/unittests/Tests.LanguageService.NavigationBar.fs
index 5ed79bf930..0af711e531 100644
--- a/vsintegration/tests/unittests/Tests.LanguageService.NavigationBar.fs
+++ b/vsintegration/tests/unittests/Tests.LanguageService.NavigationBar.fs
@@ -11,7 +11,7 @@ open UnitTests.TestLib.Utils
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
-[][]
+[][]
type UsingMSBuild() =
inherit LanguageServiceBaseTests()
@@ -220,6 +220,6 @@ type UsingMSBuild() =
// Context project system
-[][]
+[]
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
\ No newline at end of file
diff --git a/vsintegration/tests/unittests/Tests.LanguageService.ParameterInfo.fs b/vsintegration/tests/unittests/Tests.LanguageService.ParameterInfo.fs
index 5c91162953..b9fbf9444e 100644
--- a/vsintegration/tests/unittests/Tests.LanguageService.ParameterInfo.fs
+++ b/vsintegration/tests/unittests/Tests.LanguageService.ParameterInfo.fs
@@ -16,7 +16,7 @@ module ParamInfoStandardSettings =
let standard40AssemblyRefs = [| "System"; "System.Core"; "System.Numerics" |]
let queryAssemblyRefs = [ "System.Xml.Linq"; "System.Core" ]
-[][]
+[]
type UsingMSBuild() =
inherit LanguageServiceBaseTests()
@@ -2245,6 +2245,6 @@ We really need to rewrite some code paths here to use the real parse tree rather
// Context project system
-[][]
+[]
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
diff --git a/vsintegration/tests/unittests/Tests.LanguageService.QuickInfo.fs b/vsintegration/tests/unittests/Tests.LanguageService.QuickInfo.fs
index d771aac144..902e23dd6a 100644
--- a/vsintegration/tests/unittests/Tests.LanguageService.QuickInfo.fs
+++ b/vsintegration/tests/unittests/Tests.LanguageService.QuickInfo.fs
@@ -16,7 +16,7 @@ module QuickInfoStandardSettings =
let standard40AssemblyRefs = [ "System"; "System.Core"; "System.Numerics" ]
let queryAssemblyRefs = [ "System.Xml.Linq"; "System.Core" ]
-[][]
+[]
type UsingMSBuild() =
inherit LanguageServiceBaseTests()
@@ -3679,6 +3679,6 @@ query."
// Context project system
-[][]
+[]
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
diff --git a/vsintegration/tests/unittests/Tests.LanguageService.QuickParse.fs b/vsintegration/tests/unittests/Tests.LanguageService.QuickParse.fs
index e4584b89c0..953c0f9371 100644
--- a/vsintegration/tests/unittests/Tests.LanguageService.QuickParse.fs
+++ b/vsintegration/tests/unittests/Tests.LanguageService.QuickParse.fs
@@ -7,7 +7,7 @@ open System.IO
open NUnit.Framework
open Microsoft.VisualStudio.FSharp.LanguageService
-[][]
+[]
[]
[]
type QuickParse() =
diff --git a/vsintegration/tests/unittests/Tests.LanguageService.Script.fs b/vsintegration/tests/unittests/Tests.LanguageService.Script.fs
index 74666c4376..eea41cd603 100644
--- a/vsintegration/tests/unittests/Tests.LanguageService.Script.fs
+++ b/vsintegration/tests/unittests/Tests.LanguageService.Script.fs
@@ -12,7 +12,7 @@ open UnitTests.TestLib.Utils
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
-[][]
+[]
type UsingMSBuild() as this =
inherit LanguageServiceBaseTests()
@@ -1678,7 +1678,7 @@ type UsingMSBuild() as this =
// Context project system
-[][]
+[]
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
diff --git a/vsintegration/tests/unittests/Tests.LanguageService.TimeStamp.fs b/vsintegration/tests/unittests/Tests.LanguageService.TimeStamp.fs
index 05240d4ec0..132a3484b6 100644
--- a/vsintegration/tests/unittests/Tests.LanguageService.TimeStamp.fs
+++ b/vsintegration/tests/unittests/Tests.LanguageService.TimeStamp.fs
@@ -11,7 +11,7 @@ open UnitTests.TestLib.Salsa
open UnitTests.TestLib.Utils
open UnitTests.TestLib.LanguageService
-[][]
+[]
type UsingMSBuild() =
inherit LanguageServiceBaseTests()
@@ -325,6 +325,6 @@ open NUnit.Framework
open Salsa.Salsa
// Context project system
-[][]
+[]
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
\ No newline at end of file
diff --git a/vsintegration/tests/unittests/Tests.ProjectSystem.Configs.fs b/vsintegration/tests/unittests/Tests.ProjectSystem.Configs.fs
index e66d5c3681..9ca7decee2 100644
--- a/vsintegration/tests/unittests/Tests.ProjectSystem.Configs.fs
+++ b/vsintegration/tests/unittests/Tests.ProjectSystem.Configs.fs
@@ -22,7 +22,7 @@ open UnitTests.TestLib.Utils.FilesystemHelpers
open UnitTests.TestLib.ProjectSystem
-[][]
+[]
type Config() =
inherit TheTests()
diff --git a/vsintegration/tests/unittests/Tests.ProjectSystem.Miscellaneous.fs b/vsintegration/tests/unittests/Tests.ProjectSystem.Miscellaneous.fs
index ef9f432569..d1932dec27 100644
--- a/vsintegration/tests/unittests/Tests.ProjectSystem.Miscellaneous.fs
+++ b/vsintegration/tests/unittests/Tests.ProjectSystem.Miscellaneous.fs
@@ -23,7 +23,7 @@ open UnitTests.TestLib.Utils.Asserts
open UnitTests.TestLib.Utils.FilesystemHelpers
open UnitTests.TestLib.ProjectSystem
-[][]
+[]
type Miscellaneous() =
inherit TheTests()
@@ -677,7 +677,7 @@ module Regression5312 =
let icons = extractIcon path true
if icons.Length<>nExpected then failwithf "Expected %d icons in %s" nExpected path // "
-[][]
+[]
type Utilities() =
(*
Simulation of the code found in Xaml editor that we were crashing. The relevent code is pasted below.
diff --git a/vsintegration/tests/unittests/Tests.ProjectSystem.MultiTargeting.fs b/vsintegration/tests/unittests/Tests.ProjectSystem.MultiTargeting.fs
index 314473dfef..0cd5d5815f 100644
--- a/vsintegration/tests/unittests/Tests.ProjectSystem.MultiTargeting.fs
+++ b/vsintegration/tests/unittests/Tests.ProjectSystem.MultiTargeting.fs
@@ -16,7 +16,7 @@ open UnitTests.TestLib.ProjectSystem
open Microsoft.VisualStudio.FSharp.ProjectSystem
-[][]
+[]
type MultiTargeting() =
inherit TheTests()
diff --git a/vsintegration/tests/unittests/Tests.ProjectSystem.Project.fs b/vsintegration/tests/unittests/Tests.ProjectSystem.Project.fs
index 7d634d705b..498e95ab95 100644
--- a/vsintegration/tests/unittests/Tests.ProjectSystem.Project.fs
+++ b/vsintegration/tests/unittests/Tests.ProjectSystem.Project.fs
@@ -22,7 +22,7 @@ open UnitTests.TestLib.Utils.FilesystemHelpers
open UnitTests.TestLib.ProjectSystem
-[][]
+[]
type Project() =
inherit TheTests()
diff --git a/vsintegration/tests/unittests/Tests.ProjectSystem.ProjectItems.fs b/vsintegration/tests/unittests/Tests.ProjectSystem.ProjectItems.fs
index ddb56cd75e..5264eebbca 100644
--- a/vsintegration/tests/unittests/Tests.ProjectSystem.ProjectItems.fs
+++ b/vsintegration/tests/unittests/Tests.ProjectSystem.ProjectItems.fs
@@ -10,7 +10,7 @@ open UnitTests.TestLib.ProjectSystem
open Microsoft.VisualStudio.FSharp.ProjectSystem
-[][]
+[]
type ProjectItems() =
inherit TheTests()
diff --git a/vsintegration/tests/unittests/Tests.ProjectSystem.References.fs b/vsintegration/tests/unittests/Tests.ProjectSystem.References.fs
index aa59bfc288..01bd7e5e0f 100644
--- a/vsintegration/tests/unittests/Tests.ProjectSystem.References.fs
+++ b/vsintegration/tests/unittests/Tests.ProjectSystem.References.fs
@@ -19,7 +19,7 @@ open Microsoft.VisualStudio.Shell.Interop
open Microsoft.Win32
open System.Xml.Linq
-[][]
+[]
type References() =
inherit TheTests()
diff --git a/vsintegration/tests/unittests/Tests.ProjectSystem.RoundTrip.fs b/vsintegration/tests/unittests/Tests.ProjectSystem.RoundTrip.fs
index a34ff99b1b..1b294410bb 100644
--- a/vsintegration/tests/unittests/Tests.ProjectSystem.RoundTrip.fs
+++ b/vsintegration/tests/unittests/Tests.ProjectSystem.RoundTrip.fs
@@ -12,7 +12,7 @@ open UnitTests.TestLib.ProjectSystem
open Microsoft.VisualStudio.FSharp.ProjectSystem
-[][]
+[]
type RoundTrip() =
inherit TheTests()
diff --git a/vsintegration/tests/unittests/Tests.ProjectSystem.UpToDate.fs b/vsintegration/tests/unittests/Tests.ProjectSystem.UpToDate.fs
index b494ac779f..1d6c6fac28 100644
--- a/vsintegration/tests/unittests/Tests.ProjectSystem.UpToDate.fs
+++ b/vsintegration/tests/unittests/Tests.ProjectSystem.UpToDate.fs
@@ -23,7 +23,7 @@ open UnitTests.TestLib.Utils.Asserts
open UnitTests.TestLib.Utils.FilesystemHelpers
open UnitTests.TestLib.ProjectSystem
-[][]
+[]
type UpToDate() =
inherit TheTests()
@@ -380,7 +380,7 @@ type UpToDate() =
|> List.iter (fun (flag, expected) -> testFlag flag expected)
))
-[][]
+[]
type ``UpToDate PreserveNewest`` () =
[]
diff --git a/vsintegration/tests/unittests/Tests.TaskReporter.fs b/vsintegration/tests/unittests/Tests.TaskReporter.fs
index de3bd1c887..6792fb5ef6 100644
--- a/vsintegration/tests/unittests/Tests.TaskReporter.fs
+++ b/vsintegration/tests/unittests/Tests.TaskReporter.fs
@@ -19,7 +19,7 @@ open Salsa.VsMocks
type TextSpan = Microsoft.VisualStudio.TextManager.Interop.TextSpan
type DocumentTask = Microsoft.VisualStudio.FSharp.LanguageService.DocumentTask
-[][]
+[]
type TaskReporter() =
static let err(line) : 'a =
printfn "err() called on line %s with %s" line System.Environment.StackTrace
diff --git a/vsintegration/tests/unittests/Tests.Watson.fs b/vsintegration/tests/unittests/Tests.Watson.fs
index a1c4b12b03..00013946b7 100644
--- a/vsintegration/tests/unittests/Tests.Watson.fs
+++ b/vsintegration/tests/unittests/Tests.Watson.fs
@@ -39,7 +39,7 @@ type Check =
File.Delete("watson-test.fs")
-[][]
+[]
module WatsonTests =
[]
diff --git a/vsintegration/tests/unittests/Tests.XmlDocComments.fs b/vsintegration/tests/unittests/Tests.XmlDocComments.fs
index 44035d9f20..962b84eb47 100644
--- a/vsintegration/tests/unittests/Tests.XmlDocComments.fs
+++ b/vsintegration/tests/unittests/Tests.XmlDocComments.fs
@@ -9,7 +9,7 @@ open Salsa.VsOpsUtils
open UnitTests.TestLib.Salsa
open UnitTests.TestLib.Utils
-[][]
+[]
type XmlDocComments() =
inherit UnitTests.TestLib.LanguageService.LanguageServiceBaseTests(VsOpts = InstalledMSBuildTestFlavour())
// Work around an innocuous 'feature' with how QuickInfo is displayed, lines which
diff --git a/vsintegration/tests/unittests/VisualFSharp.Unittests.fsproj b/vsintegration/tests/unittests/VisualFSharp.Unittests.fsproj
index be283fdd74..f0f3a8361f 100644
--- a/vsintegration/tests/unittests/VisualFSharp.Unittests.fsproj
+++ b/vsintegration/tests/unittests/VisualFSharp.Unittests.fsproj
@@ -52,6 +52,9 @@
Roslyn\Diagnostics\DocumentDiagnosticAnalyzerTests.fs
+
+ Roslyn\Completion\CompletionProviderTests.fs
+
@@ -142,27 +145,43 @@
$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Threading.14.1.131\lib\net45\Microsoft.VisualStudio.Threading.dll
+ True
$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.dll
+ True
$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.Wpf.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.Wpf.dll
+ True
$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Data.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Data.dll
+ True
$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Design.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll
+ True
+
+
+ $(FSharpSourcesRoot)\..\packages\RoslynDependencies.Microsoft.VisualStudio.Text.Internal.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Internal.dll
+ True
+
+
+ $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Language.Intellisense.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Language.Intellisense.dll
+ True
$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).dll
+ True
$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.CoreUtility.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.CoreUtility.dll
+ True
$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Editor.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Editor.dll
+ True
@@ -170,7 +189,6 @@
$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Designer.Interfaces.1.1.4322\lib\microsoft.visualstudio.designer.interfaces.dll
-
True
diff --git a/vsintegration/tests/unittests/app.config b/vsintegration/tests/unittests/app.config
index 186d8418e1..d9bf62e939 100644
--- a/vsintegration/tests/unittests/app.config
+++ b/vsintegration/tests/unittests/app.config
@@ -30,6 +30,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+