Skip to content

Commit

Permalink
Merge branch 'dev15.1.x' into use-explicit-labels-dev15.1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mmitche committed Mar 6, 2017
2 parents 13ff940 + 2ba6d5d commit 9611186
Show file tree
Hide file tree
Showing 9 changed files with 434 additions and 415 deletions.
6 changes: 3 additions & 3 deletions build/Targets/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

<PropertyGroup>
<!-- This is the assembly version of Roslyn from the .NET assembly perspective. It should only be revved during significant point releases. -->
<RoslynAssemblyVersionBase Condition="'$(RoslynAssemblyVersion)' == ''">2.0.0</RoslynAssemblyVersionBase>
<RoslynAssemblyVersionBase Condition="'$(RoslynAssemblyVersion)' == ''">2.1.0</RoslynAssemblyVersionBase>
<!-- This is the file version of Roslyn, as placed in the PE header. It should be revved during point releases, and is also what provides the basis for our NuGet package versioning. -->
<RoslynFileVersionBase Condition="'$(RoslynFileVersionBase)' == ''">2.0.0</RoslynFileVersionBase>
<RoslynFileVersionBase Condition="'$(RoslynFileVersionBase)' == ''">2.1.0</RoslynFileVersionBase>
<!-- The release moniker for our packages. Developers should use "dev" and official builds pick the branch
moniker listed below -->
<RoslynNuGetMoniker Condition="'$(RoslynNuGetMoniker)' == ''">dev</RoslynNuGetMoniker>
<RoslynNuGetMoniker Condition="'$(OfficialBuild)' == 'true'">rc5</RoslynNuGetMoniker>
<RoslynNuGetMoniker Condition="'$(OfficialBuild)' == 'true'">beta1</RoslynNuGetMoniker>
<!-- This is the base of the NuGet versioning for prerelease packages -->
<NuGetPreReleaseVersion>$(RoslynFileVersionBase)-$(RoslynNuGetMoniker)</NuGetPreReleaseVersion>

Expand Down
1 change: 1 addition & 0 deletions src/Tools/MicroBuild/publish-assets.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ try
{
"dev15.0.x" { }
"master" { }
"dev_pilchie_Fix389698" { }
default
{
if (-not $test)
Expand Down

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Host;
using Microsoft.VisualStudio.ComponentModelHost;
using Microsoft.VisualStudio.LanguageServices.ProjectSystem;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
using Roslyn.Utilities;

namespace Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem
{
internal partial class VisualStudioWorkspaceImpl : IVsSolutionLoadEvents
{
int IVsSolutionLoadEvents.OnBeforeOpenSolution(string pszSolutionFilename)
{
return VSConstants.S_OK;
}

int IVsSolutionLoadEvents.OnBeforeBackgroundSolutionLoadBegins()
{
return VSConstants.S_OK;
}

int IVsSolutionLoadEvents.OnQueryBackgroundLoadProjectBatch(out bool pfShouldDelayLoadToNextIdle)
{
pfShouldDelayLoadToNextIdle = false;
return VSConstants.S_OK;
}

int IVsSolutionLoadEvents.OnBeforeLoadProjectBatch(bool fIsBackgroundIdleBatch)
{
_foregroundObject.Value.AssertIsForeground();
GetProjectTrackerAndInitializeIfNecessary(ServiceProvider.GlobalProvider).OnBeforeLoadProjectBatch(fIsBackgroundIdleBatch);
return VSConstants.S_OK;
}

int IVsSolutionLoadEvents.OnAfterLoadProjectBatch(bool fIsBackgroundIdleBatch)
{
_foregroundObject.Value.AssertIsForeground();
GetProjectTrackerAndInitializeIfNecessary(ServiceProvider.GlobalProvider).OnAfterLoadProjectBatch(fIsBackgroundIdleBatch);
return VSConstants.S_OK;
}

int IVsSolutionLoadEvents.OnAfterBackgroundSolutionLoadComplete()
{
_foregroundObject.Value.AssertIsForeground();
GetProjectTrackerAndInitializeIfNecessary(ServiceProvider.GlobalProvider).OnAfterBackgroundSolutionLoadComplete();
return VSConstants.S_OK;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using Microsoft.Internal.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.Shell;

namespace Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem
{
internal partial class VisualStudioProjectTracker : IVsSolutionWorkingFoldersEvents
internal partial class VisualStudioWorkspaceImpl : IVsSolutionWorkingFoldersEvents
{
void IVsSolutionWorkingFoldersEvents.OnAfterLocationChange(uint location, bool contentMoved)
{
Expand All @@ -14,7 +15,8 @@ void IVsSolutionWorkingFoldersEvents.OnAfterLocationChange(uint location, bool c
}

// notify the working folder change
NotifyWorkspaceHosts(host => (host as IVisualStudioWorkingFolder)?.OnAfterWorkingFolderChange());
GetProjectTrackerAndInitializeIfNecessary(ServiceProvider.GlobalProvider).NotifyWorkspaceHosts(
host => (host as IVisualStudioWorkingFolder)?.OnAfterWorkingFolderChange());
}

void IVsSolutionWorkingFoldersEvents.OnQueryLocationChange(uint location, out bool pfCanMoveContent)
Expand All @@ -27,7 +29,8 @@ void IVsSolutionWorkingFoldersEvents.OnQueryLocationChange(uint location, out bo

// notify the working folder change
pfCanMoveContent = true;
NotifyWorkspaceHosts(host => (host as IVisualStudioWorkingFolder)?.OnBeforeWorkingFolderChange());
GetProjectTrackerAndInitializeIfNecessary(ServiceProvider.GlobalProvider).NotifyWorkspaceHosts(
host => (host as IVisualStudioWorkingFolder)?.OnBeforeWorkingFolderChange());
}
}
}
}
4 changes: 2 additions & 2 deletions src/VisualStudio/Core/Def/ServicesVisualStudio.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
<Compile Include="Implementation\ProjectSystem\MetadataReferences\VisualStudioFrameworkAssemblyPathResolverFactory.cs" />
<Compile Include="Implementation\ProjectSystem\MetadataReferences\VisualStudioMetadataReferenceManager.Factory.cs" />
<Compile Include="Implementation\ProjectSystem\RuleSets\RuleSetEventHandler.cs" />
<Compile Include="Implementation\ProjectSystem\VisualStudioProjectTracker_IVsSolutionWorkingFoldersEvents.cs" />
<Compile Include="Implementation\ProjectSystem\VisualStudioWorkspaceImpl_IVsSolutionWorkingFoldersEvents.cs" />
<Compile Include="Implementation\Extensions\VisualStudioWorkspaceImplExtensions.cs" />
<Compile Include="Implementation\Options\LanguageSettingsPersister.cs" />
<Compile Include="Implementation\ProjectSystem\Interop\IVsUndoState.cs" />
Expand Down Expand Up @@ -550,7 +550,7 @@
<Compile Include="Implementation\ProjectSystem\VisualStudioProjectTracker.cs" />
<Compile Include="Implementation\ProjectSystem\VisualStudioProjectTracker.WorkspaceHostState.cs" />
<Compile Include="Implementation\ProjectSystem\VisualStudioWorkspaceImpl_IVsSolutionEvents.cs" />
<Compile Include="Implementation\ProjectSystem\VisualStudioProjectTracker_IVsSolutionLoadEvents.cs" />
<Compile Include="Implementation\ProjectSystem\VisualStudioWorkspaceImpl_IVsSolutionLoadEvents.cs" />
<Compile Include="Implementation\ProjectSystem\VisualStudioWorkspace.cs" />
<Compile Include="Implementation\ProjectSystem\VisualStudioWorkspaceImpl.cs" />
<Compile Include="Implementation\ProjectSystem\WorkspaceBackgroundWork.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.ProjectSystemShim
<Trait(Traits.Feature, Traits.Features.ProjectSystemShims)>
Public Sub DoNotDeferLoadIfInNonBackgroundBatch()
Using testEnvironment = New TestEnvironment(solutionIsFullyLoaded:=False)
testEnvironment.GetSolutionLoadEvents().OnBeforeLoadProjectBatch(fIsBackgroundIdleBatch:=False)
testEnvironment.ProjectTracker.OnBeforeLoadProjectBatch(fIsBackgroundIdleBatch:=False)
CreateVisualBasicProject(testEnvironment, "TestProject")
testEnvironment.GetSolutionLoadEvents().OnAfterLoadProjectBatch(fIsBackgroundIdleBatch:=False)
testEnvironment.ProjectTracker.OnAfterLoadProjectBatch(fIsBackgroundIdleBatch:=False)

' We should have pushed this project to the workspace
Assert.Single(testEnvironment.Workspace.CurrentSolution.Projects)
Expand All @@ -51,9 +51,9 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.ProjectSystemShim
Using testEnvironment = New TestEnvironment(solutionIsFullyLoaded:=False)
CreateVisualBasicProject(testEnvironment, "TestProject1")

testEnvironment.GetSolutionLoadEvents().OnBeforeLoadProjectBatch(fIsBackgroundIdleBatch:=False)
testEnvironment.ProjectTracker.OnBeforeLoadProjectBatch(fIsBackgroundIdleBatch:=False)
CreateVisualBasicProject(testEnvironment, "TestProject2")
testEnvironment.GetSolutionLoadEvents().OnAfterLoadProjectBatch(fIsBackgroundIdleBatch:=False)
testEnvironment.ProjectTracker.OnAfterLoadProjectBatch(fIsBackgroundIdleBatch:=False)

' We should have pushed the second project only
Assert.Equal("TestProject2", testEnvironment.Workspace.CurrentSolution.Projects.Single().Name)
Expand All @@ -72,10 +72,10 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.ProjectSystemShim
Dim project1 = CreateVisualBasicProject(testEnvironment, "TestProject1")

' Include a project reference in this batch. This means that project1 must also be pushed
testEnvironment.GetSolutionLoadEvents().OnBeforeLoadProjectBatch(fIsBackgroundIdleBatch:=False)
testEnvironment.ProjectTracker.OnBeforeLoadProjectBatch(fIsBackgroundIdleBatch:=False)
Dim project2 = CreateVisualBasicProject(testEnvironment, "TestProject2")
project2.AddProjectReference(project1)
testEnvironment.GetSolutionLoadEvents().OnAfterLoadProjectBatch(fIsBackgroundIdleBatch:=False)
testEnvironment.ProjectTracker.OnAfterLoadProjectBatch(fIsBackgroundIdleBatch:=False)

' We should have pushed both projects
Assert.Equal(2, testEnvironment.Workspace.CurrentSolution.Projects.Count())
Expand All @@ -89,9 +89,9 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.ProjectSystemShim
Dim project1 = CreateVisualBasicProject(testEnvironment, "TestProject1")

' Include a project reference in this batch. This means that project1 must also be pushed
testEnvironment.GetSolutionLoadEvents().OnBeforeLoadProjectBatch(fIsBackgroundIdleBatch:=False)
testEnvironment.ProjectTracker.OnBeforeLoadProjectBatch(fIsBackgroundIdleBatch:=False)
Dim project2 = CreateVisualBasicProject(testEnvironment, "TestProject2")
testEnvironment.GetSolutionLoadEvents().OnAfterLoadProjectBatch(fIsBackgroundIdleBatch:=False)
testEnvironment.ProjectTracker.OnAfterLoadProjectBatch(fIsBackgroundIdleBatch:=False)

' We should have pushed the second project only
Assert.Equal("TestProject2", testEnvironment.Workspace.CurrentSolution.Projects.Single().Name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,9 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.ProjectSystemShim.Fr

Public Sub NotifySolutionAsFullyLoaded()
_monitorSelectionMock.SolutionIsFullyLoaded = True
GetSolutionLoadEvents().OnAfterBackgroundSolutionLoadComplete()
_projectTracker.OnAfterBackgroundSolutionLoadComplete()
End Sub

Public Function GetSolutionLoadEvents() As IVsSolutionLoadEvents
Return DirectCast(_projectTracker, IVsSolutionLoadEvents)
End Function

Public ReadOnly Property ProjectTracker As VisualStudioProjectTracker
Get
Return _projectTracker
Expand Down

0 comments on commit 9611186

Please sign in to comment.