Skip to content

Commit

Permalink
Always include Roslyn dependencies for integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed Feb 28, 2023
1 parent 6502ed2 commit 28fa058
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 56 deletions.
1 change: 0 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ stages:
$(_BuildArgs)
$(_PublishArgs)
$(_InternalRuntimeDownloadArgs)
/p:IncludeRoslynDeps=true
name: Build
displayName: Build and Deploy
condition: succeeded()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,115 +7,93 @@
[assembly: ProvideCodeBase(CodeBase = @"$PackageFolder$\Microsoft.VisualStudio.LanguageServer.Protocol.Internal.dll")]
[assembly: ProvideCodeBase(CodeBase = @"$PackageFolder$\Microsoft.VisualStudio.LanguageServer.Protocol.Extensions.dll")]

#if INCLUDE_ROSLYN_DEPS
[assembly: ProvideBindingRedirection(
AssemblyName = "Microsoft.CodeAnalysis",
GenerateCodeBase = true,
OldVersionLowerBound = "4.4.0.0",
OldVersionUpperBound = "4.6.0.0",
NewVersion = "4.6.0.0")]
OldVersionUpperBound = "Current")]
[assembly: ProvideBindingRedirection(
AssemblyName = "Microsoft.CodeAnalysis.CSharp",
GenerateCodeBase = true,
OldVersionLowerBound = "4.4.0.0",
OldVersionUpperBound = "4.6.0.0",
NewVersion = "4.6.0.0")]
OldVersionUpperBound = "Current")]
[assembly: ProvideBindingRedirection(
AssemblyName = "Microsoft.CodeAnalysis.CSharp.Features",
GenerateCodeBase = true,
OldVersionLowerBound = "4.4.0.0",
OldVersionUpperBound = "4.6.0.0",
NewVersion = "4.6.0.0")]
OldVersionUpperBound = "Current")]
[assembly: ProvideBindingRedirection(
AssemblyName = "Microsoft.CodeAnalysis.CSharp.Workspaces",
GenerateCodeBase = true,
OldVersionLowerBound = "4.4.0.0",
OldVersionUpperBound = "4.6.0.0",
NewVersion = "4.6.0.0")]
OldVersionUpperBound = "Current")]
[assembly: ProvideBindingRedirection(
AssemblyName = "Microsoft.CodeAnalysis.EditorFeatures",
GenerateCodeBase = true,
OldVersionLowerBound = "4.4.0.0",
OldVersionUpperBound = "4.6.0.0",
NewVersion = "4.6.0.0")]
OldVersionUpperBound = "Current")]
[assembly: ProvideBindingRedirection(
AssemblyName = "Microsoft.CodeAnalysis.EditorFeatures.Text",
GenerateCodeBase = true,
OldVersionLowerBound = "4.4.0.0",
OldVersionUpperBound = "4.6.0.0",
NewVersion = "4.6.0.0")]
OldVersionUpperBound = "Current")]
[assembly: ProvideBindingRedirection(
AssemblyName = "Microsoft.CodeAnalysis.EditorFeatures.Wpf",
GenerateCodeBase = true,
OldVersionLowerBound = "4.4.0.0",
OldVersionUpperBound = "4.6.0.0",
NewVersion = "4.6.0.0")]
OldVersionUpperBound = "Current")]
[assembly: ProvideBindingRedirection(
AssemblyName = "Microsoft.CodeAnalysis.ExternalAccess.Razor",
GenerateCodeBase = true,
OldVersionLowerBound = "4.4.0.0",
OldVersionUpperBound = "4.6.0.0",
NewVersion = "4.6.0.0")]
OldVersionUpperBound = "Current")]
[assembly: ProvideBindingRedirection(
AssemblyName = "Microsoft.CodeAnalysis.InteractiveHost",
GenerateCodeBase = true,
OldVersionLowerBound = "4.4.0.0",
OldVersionUpperBound = "4.6.0.0",
NewVersion = "4.6.0.0")]
OldVersionUpperBound = "Current")]
[assembly: ProvideBindingRedirection(
AssemblyName = "Microsoft.CodeAnalysis.Features",
GenerateCodeBase = true,
OldVersionLowerBound = "4.4.0.0",
OldVersionUpperBound = "4.6.0.0",
NewVersion = "4.6.0.0")]
OldVersionUpperBound = "Current")]
[assembly: ProvideBindingRedirection(
AssemblyName = "Microsoft.CodeAnalysis.LanguageServer.Protocol",
GenerateCodeBase = true,
OldVersionLowerBound = "4.4.0.0",
OldVersionUpperBound = "4.6.0.0",
NewVersion = "4.6.0.0")]
OldVersionUpperBound = "Current")]
[assembly: ProvideBindingRedirection(
AssemblyName = "Microsoft.CodeAnalysis.Remote.Workspaces",
GenerateCodeBase = true,
OldVersionLowerBound = "4.4.0.0",
OldVersionUpperBound = "4.6.0.0",
NewVersion = "4.6.0.0")]
OldVersionUpperBound = "Current")]
[assembly: ProvideBindingRedirection(
AssemblyName = "Microsoft.CodeAnalysis.VisualBasic.Features",
GenerateCodeBase = true,
OldVersionLowerBound = "4.4.0.0",
OldVersionUpperBound = "4.6.0.0",
NewVersion = "4.6.0.0")]
OldVersionUpperBound = "Current")]
[assembly: ProvideBindingRedirection(
AssemblyName = "Microsoft.CodeAnalysis.Workspaces",
GenerateCodeBase = true,
OldVersionLowerBound = "4.4.0.0",
OldVersionUpperBound = "4.6.0.0",
NewVersion = "4.6.0.0")]
OldVersionUpperBound = "Current")]
[assembly: ProvideBindingRedirection(
AssemblyName = "Microsoft.VisualStudio.Threading",
GenerateCodeBase = true,
OldVersionLowerBound = "17.4.0.0",
OldVersionUpperBound = "17.5.0.0",
NewVersion = "17.5.0.0")]
OldVersionUpperBound = "Current")]
[assembly: ProvideBindingRedirection(
AssemblyName = "Microsoft.VisualStudio.LanguageServices",
GenerateCodeBase = true,
OldVersionLowerBound = "4.4.0.0",
OldVersionUpperBound = "4.6.0.0",
NewVersion = "4.6.0.0")]
OldVersionUpperBound = "Current")]
[assembly: ProvideBindingRedirection(
AssemblyName = "Microsoft.VisualStudio.LanguageServices.Implementation",
GenerateCodeBase = true,
OldVersionLowerBound = "4.4.0.0",
OldVersionUpperBound = "4.6.0.0",
NewVersion = "4.6.0.0")]
OldVersionUpperBound = "Current")]
[assembly: ProvideBindingRedirection(
AssemblyName = "Microsoft.VisualStudio.LanguageServices.CSharp",
GenerateCodeBase = true,
OldVersionLowerBound = "4.4.0.0",
OldVersionUpperBound = "4.6.0.0",
NewVersion = "4.6.0.0")]

[assembly: ProvideCodeBase(CodeBase = @"$PackageFolder$\Microsoft.CodeAnalysis.Workspaces.dll")]
#endif
OldVersionUpperBound = "Current")]
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<IncludeAssemblyInVSIXContainer>false</IncludeAssemblyInVSIXContainer>
<IncludeDebugSymbolsInVSIXContainer>false</IncludeDebugSymbolsInVSIXContainer>
<IncludeDebugSymbolsInLocalVSIXDeployment>false</IncludeDebugSymbolsInLocalVSIXDeployment>
<DefineConstants Condition="'$(IncludeRoslynDeps)' == 'true'">$(DefineConstants);INCLUDE_ROSLYN_DEPS</DefineConstants>

<!-- This extension will be deployed on demand by the integration test harness -->
<DeployExtension>false</DeployExtension>
Expand Down Expand Up @@ -59,7 +58,7 @@
</ItemGroup>

<!-- Reference the Roslyn dependencies so that Preview builds work -->
<ItemGroup Condition="'$(IncludeRoslynDeps)' == 'true'">
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Features" Version="$(MicrosoftCodeAnalysisCSharpFeaturesPackageVersion)" />
<PackageReference Include="Microsoft.CodeAnalysis.EditorFeatures" Version="$(RoslynPackageVersion)" />
<PackageReference Include="Microsoft.CodeAnalysis.EditorFeatures.Wpf" Version="$(RoslynPackageVersion)" />
Expand All @@ -70,7 +69,7 @@
<PackageReference Include="Microsoft.VisualStudio.LanguageServices.Implementation.Symbols" Version="$(Tooling_MicrosoftVisualStudioLanguageServicesPackageVersion)" />
</ItemGroup>

<ItemGroup Condition="'$(IncludeRoslynDeps)' == 'true'">
<ItemGroup>
<VSIXSourceItem Include="$(OutputPath)Microsoft.CodeAnalysis.dll" />
<VSIXSourceItem Include="$(OutputPath)Microsoft.CodeAnalysis.CSharp.dll" />
<VSIXSourceItem Include="$(OutputPath)Microsoft.CodeAnalysis.CSharp.Features.dll" />
Expand Down
13 changes: 1 addition & 12 deletions startvs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,13 @@ Param(
[Parameter(
Mandatory=$false,
HelpMessage="If specified, choose the Visual Studio version from a list before laucnhing. By default the newest and last installed Visual Studio instance will be launched.")]
[Switch]$chooseVS,

[Parameter(
Mandatory=$false,
HelpMessage="If specified, Roslyn dependencies will be included in the Razor extension when deployed.")]
[Switch]$includeRoslynDeps
[Switch]$chooseVS
)

if ($solutionFile -eq "") {
$solutionFile = "Razor.sln"
}

if ($includeRoslynDeps) {
# Setting this environment variable ensures that the MSBuild will see it when
# building from inside Visual Studio.
$env:IncludeRoslynDeps = $true
}

$dotnetPath = Join-Path (Get-Location) ".dotnet"

# This tells .NET Core to use the same dotnet.exe that build scripts use
Expand Down

0 comments on commit 28fa058

Please sign in to comment.