Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub/fix programmatic rename #6179

Merged
merged 13 commits into from
May 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@
<Private>false</Private>
</ProjectReference>
</ItemDefinitionGroup>

</Project>
4 changes: 4 additions & 0 deletions build/import/HostAgnostic.props
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@
<PackageReference Include="Microsoft.VisualStudio.Validation" />
<PackageReference Include="Microsoft.VisualStudio.Threading" />
<PackageReference Include="Microsoft.VisualStudio.ProjectSystem.Analyzers" />

<!-- VS MEF -->
<PackageReference Include="Microsoft.VisualStudio.Composition" />

<!-- Roslyn -->
<PackageReference Include="Microsoft.VisualStudio.LanguageServices" />
<PackageReference Include="Microsoft.CodeAnalysis" />
<PackageReference Include="Microsoft.CSharp" />

<!-- Analyzers-->
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" />
Expand Down
7 changes: 4 additions & 3 deletions build/import/Packages.targets
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<!-- VS SDK -->
<PackageReference Update="Microsoft.VSSDK.BuildTools" Version="16.7.2" />
<PackageReference Update="Microsoft.VisualStudio.ComponentModelHost" Version="16.0.198-g52de9c2988"/>
<PackageReference Update="Microsoft.VisualStudio.Composition" Version="16.1.8"/>
<PackageReference Update="Microsoft.VisualStudio.Composition" Version="16.4.11"/>
<PackageReference Update="Microsoft.VisualStudio.Data.Core" Version="9.0.21022" />
<PackageReference Update="Microsoft.VisualStudio.DataDesign.Common" Version="16.0.28321-alpha"/>
<PackageReference Update="Microsoft.VisualStudio.Data.Services" Version="9.0.21022" />
Expand Down Expand Up @@ -99,9 +99,10 @@
<PackageReference Update="Microsoft.VisualStudio.ProjectSystem.Analyzers" Version="16.7.232-pre" />

<!-- Roslyn -->
<PackageReference Update="Microsoft.VisualStudio.LanguageServices" Version="3.2.0-beta4-19359-03" />
<PackageReference Update="Microsoft.CodeAnalysis" Version="3.2.0-beta4-19359-03" />
<PackageReference Update="Microsoft.VisualStudio.LanguageServices" Version="3.7.0-2.20256.8" />
<PackageReference Update="Microsoft.CodeAnalysis" Version="3.7.0-2.20256.8" />
<PackageReference Update="Microsoft.VisualStudio.IntegrationTest.Utilities" Version="2.6.0-beta1-62113-02" />
<PackageReference Update="Microsoft.CSharp" Version="4.7.0" />

<!-- Analyzers -->
<!-- Note: analyzers from github.com/dotnet/roslyn-analyzers are built together and share the same version -->
Expand Down
2 changes: 1 addition & 1 deletion build/import/VisualStudio.props
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<PackageReference Include="Microsoft.VisualStudio.Telemetry" />
<PackageReference Include="Microsoft.VisualStudio.Utilities" />
<PackageReference Include="NuGet.SolutionRestoreManager.Interop" />
<PackageReference Include="NuGet.VisualStudio" />
<PackageReference Include="NuGet.VisualStudio" />
</ItemGroup>

<!--
Expand Down
1 change: 0 additions & 1 deletion build/import/Workarounds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@
<FileWrites Include="$(IntermediateOutputPath)$(TargetName).latest.pkgdef" Condition="Exists('$(IntermediateOutputPath)$(TargetName).latest.pkgdef')"/>
</ItemGroup>
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@
<Target Name="Build" DependsOnTargets="ResolveProjectReferences">
<MakeDir Directories="$(IntermediateOutputPath)" ContinueOnError="True" />
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ Namespace Microsoft.VisualStudio.Editors.PropertyPages
Return True
End If

If typeMember.ContainingAssembly.Equals(compilation.Assembly) OrElse typeMember.ContainingAssembly.GivesAccessTo(compilation.Assembly) Then
If SymbolEqualityComparer.Default.Equals(typeMember.ContainingAssembly, compilation.Assembly) OrElse typeMember.ContainingAssembly.GivesAccessTo(compilation.Assembly) Then
Return True
End If
End If
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ public StartupObjectsEnumGenerator(Workspace workspace, UnconfiguredProject proj
public async Task<ICollection<IEnumValue>> GetListedValuesAsync()
{
Project project = _workspace.CurrentSolution.Projects.First(p => PathHelper.IsSamePath(p.FilePath, _unconfiguredProject.FullPath));
Compilation compilation = await project.GetCompilationAsync();
Compilation? compilation = await project.GetCompilationAsync();

IEntryPointFinderService entryPointFinderService = project.LanguageServices.GetService<IEntryPointFinderService>();
IEnumerable<INamedTypeSymbol> entryPoints = entryPointFinderService.FindEntryPoints(compilation.GlobalNamespace, SearchForEntryPointsInFormsOnly);
IEntryPointFinderService? entryPointFinderService = project.LanguageServices.GetService<IEntryPointFinderService>();
IEnumerable<INamedTypeSymbol>? entryPoints = entryPointFinderService?.FindEntryPoints(compilation?.GlobalNamespace, SearchForEntryPointsInFormsOnly);
IEnumerable<string> entryPointNames = entryPoints.Select(e => e.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat.WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle.Omitted)));

return entryPointNames.Select(name => (IEnumValue)new PageEnumValue(new EnumValue { Name = name, DisplayName = name })).ToArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Microsoft.VisualStudio.ProjectSystem.VS.Rename
{
internal sealed partial class Renamer
internal partial class RenamerProjectTreeActionHandler
{
private sealed class UndoScope : IDisposable
{
Expand Down
Loading