-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
.../Core/Test/ProjectSystemShim/VisualStudioProjectTests/ProjectSystemProjectFactoryTests.vb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
' Licensed to the .NET Foundation under one or more agreements. | ||
' The .NET Foundation licenses this file to you under the MIT license. | ||
' See the LICENSE file in the project root for more information. | ||
|
||
Imports System.Collections.Immutable | ||
Imports System.Threading | ||
Imports Microsoft.CodeAnalysis | ||
Imports Microsoft.CodeAnalysis.Test.Utilities | ||
Imports Microsoft.CodeAnalysis.Workspaces.ProjectSystem | ||
Imports Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem | ||
Imports Microsoft.VisualStudio.LanguageServices.UnitTests.ProjectSystemShim.Framework | ||
Imports Roslyn.Test.Utilities | ||
|
||
Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.ProjectSystemShim | ||
<[UseExportProvider]> | ||
Public Class ProjectSystemProjectFactoryTests | ||
<WpfFact, WorkItem("https://github.com/dotnet/vscode-csharp/issues/7402")> | ||
Public Async Function ProjectInstantiatedWithCompilationOutputAssemblyFilePathCanBeChanged() As Task | ||
Using environment = New TestEnvironment() | ||
Dim creationInfo = New VisualStudioProjectCreationInfo() | ||
creationInfo.CompilationOutputAssemblyFilePath = "C:\output\project.dll" | ||
Dim project1 = Await environment.ProjectFactory.CreateAndAddToWorkspaceAsync( | ||
"project1", LanguageNames.CSharp, creationInfo, CancellationToken.None) | ||
|
||
Dim projectInSolution = environment.Workspace.CurrentSolution.GetProject(project1.Id) | ||
|
||
Assert.Equal(creationInfo.CompilationOutputAssemblyFilePath, projectInSolution.CompilationOutputInfo.AssemblyPath) | ||
|
||
' Change the path and ensure it's updated | ||
Dim newOutputPath = "C:\output\new\project.dll" | ||
project1.CompilationOutputAssemblyFilePath = newOutputPath | ||
|
||
Dim newProjectInSolution As Project = environment.Workspace.CurrentSolution.GetProject(project1.Id) | ||
Assert.Equal(newOutputPath, newProjectInSolution.CompilationOutputInfo.AssemblyPath) | ||
End Using | ||
End Function | ||
End Class | ||
End Namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters