/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj
155 строк
8 KB
Joey Robichaud
Restore EA project references in LanguageServer.csproj (#84663)
28 июл 2026, 23:36
Не верифицирован
28 июл 2026, 23:36
1cbc531
Код
Авторство
О чём код?
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>$(NetVSCode)</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> <ServerGarbageCollection>true</ServerGarbageCollection> <!-- This project is not packed as a .NET tool. The roslyn-language-server thin client is the tool entry point and package; it bundles this project's full published output side-by-side and launches it. See ..\roslyn-language-server\roslyn-language-server.csproj. --> <IsPackable>false</IsPackable> </PropertyGroup> <Import Project="..\LanguageServerPublish.props" /> <ItemGroup Label="Shared daemon connection files"> <!-- Source-shared (linked) with the roslyn-language-server thin client so both compute identical pipe/mutex names and use the same pipe options. Keep these dependency-light and AOT/trim-safe. --> <Compile Include="..\DaemonConnection\*.cs" LinkBase="DaemonConnection" /> </ItemGroup> <ItemGroup> <!-- Include MIBC data if available. This is produced by a separate profiling pipeline for the C# extension, and injected in official builds --> <PublishReadyToRunPgoFiles Condition="'$(VSCodeOptimizationDataRoot)'!=''" Include="$(VSCodeOptimizationDataRoot)\*.mibc" /> </ItemGroup> <Target Name="SetCrossgen2ExtraArgs" BeforeTargets="ResolveReadyToRunCompilers" Condition="'$(PublishReadyToRun)' == 'true'"> <PropertyGroup> <!-- Define extra crossgen2 args. This must be done in a target as TargetName isn't available in evaluation --> <PublishReadyToRunCrossgen2ExtraArgs>$(PublishReadyToRunCrossgen2ExtraArgs);--non-local-generics-module:"$(TargetName)"</PublishReadyToRunCrossgen2ExtraArgs> </PropertyGroup> </Target> <Target Name="AddCrossAssemblyOptimizationSwitch" DependsOnTargets="ResolveProjectReferences" AfterTargets="ResolveProjectReferences"> <!-- We used to use - -opt-cross-module:* as a switch, but inlining code from the runtime led to exposing bugs in crossgen/runtime in not rejecting native code when the inlined code was stale. To avoid customer facing bugs in C# extension, we are now taking the more conservative approach of only inlining code from assemblies in the same "servicing bubble", which we can most closely approximate here by just inlining code in assemblies that come from project references. --> <ItemGroup> <_OptCrossModuleSwitch Condition="'%(_ResolvedProjectReferencePaths.ReferenceOutputAssembly)'=='true'" Include="@(_ResolvedProjectReferencePaths->'--opt-cross-module:%(FileName)')" /> </ItemGroup> <PropertyGroup> <PublishReadyToRunCrossgen2ExtraArgs>$(PublishReadyToRunCrossgen2ExtraArgs);@(_OptCrossModuleSwitch)</PublishReadyToRunCrossgen2ExtraArgs> </PropertyGroup> </Target> <ItemGroup Label="Project References"> <!-- An extern alias is necessary to prevent ambiguity between shared projects linked to both Workspace and BuildHost --> <ProjectReference Include="..\..\Workspaces\MSBuild\Core\Microsoft.CodeAnalysis.Workspaces.MSBuild.csproj" Aliases="MSBuildWorkspaces" /> <ProjectReference Include="..\..\Workspaces\MSBuild\Contracts\Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts.csproj" Aliases="MSBuildWorkspacesContracts" /> <ProjectReference Include="..\Protocol\Microsoft.CodeAnalysis.LanguageServer.Protocol.csproj" /> <!-- Dlls we don't directly reference but need to include to build the MEF composition --> <ProjectReference Include="..\..\Features\CSharp\Portable\Microsoft.CodeAnalysis.CSharp.Features.csproj" /> <!-- Not directly referenced but needed for Razor source generators --> <ProjectReference Include="..\..\Tools\ExternalAccess\RazorCompiler\Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler.csproj" /> <!-- Not directly referenced but needed for Route embedded language features --> <ProjectReference Include="..\..\Features\ExternalAccess\Core\Microsoft.CodeAnalysis.Features.ExternalAccess.csproj" /> <ProjectReference Include="..\ExternalAccess\Core\Microsoft.CodeAnalysis.LanguageServer.ExternalAccess.csproj" /> <!-- Ship the VS Code Razor entrypoint as a real runtime dependency so it participates in the server deps.json. --> <ProjectReference Include="..\..\Razor\src\Razor\src\Microsoft.VisualStudioCode.RazorExtension\Microsoft.VisualStudioCode.RazorExtension.csproj" /> <!-- EA packages that can be removed once unification is complete --> <ProjectReference Include="..\ExternalAccess\CompilerDeveloperSDK\Microsoft.CodeAnalysis.ExternalAccess.CompilerDeveloperSDK.csproj" /> </ItemGroup> <ItemGroup> <PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" /> <PackageReference Include="Microsoft.Extensions.Logging" /> <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" /> <PackageReference Include="Microsoft.Extensions.Logging.Console" /> <PackageReference Include="Microsoft.ServiceHub.Framework" /> <PackageReference Include="Microsoft.TestPlatform.TranslationLayer" /> <PackageReference Include="Microsoft.TestPlatform.ObjectModel" /> <PackageReference Include="Microsoft.VisualStudio.Composition" /> <PackageReference Include="NuGet.ProjectModel" /> <PackageReference Include="System.CommandLine" /> <!-- Ensure we include the sqlite assemblies and their native dependencies in our package to enable persistent storage. --> <PackageReference Include="SQLitePCLRaw.core" /> <PackageReference Include="SQLite3MC.PCLRaw.bundle" /> <PackageReference Include="SQLite3MC.PCLRaw.provider" /> </ItemGroup> <ItemGroup> <InternalsVisibleTo Include="Microsoft.CodeAnalysis.LanguageServer.UnitTests" /> <InternalsVisibleTo Include="Microsoft.CodeAnalysis.LanguageServer.ProcessHost.UnitTests" /> <!-- Only allow C# DevKit to use types from Microsoft.CodeAnalysis.Contracts namespace. The contracts should not introduce breaking changes between versions, because the versions of C# DevKit and C# Extension might not be aligned. --> <RestrictedInternalsVisibleTo Include="Microsoft.VisualStudio.LanguageServices.DevKit" Namespace="Microsoft.CodeAnalysis.Contracts" /> </ItemGroup> <ItemGroup> <RoslynVersionFile Include="$(OutDir)\RoslynVersion.txt" /> <FileWrites Include="@(RoslynVersionFile)" /> </ItemGroup> <ItemGroup> <EmbeddedResource Update="LanguageServerResources.resx" GenerateSource="true" /> </ItemGroup> <Target Name="WriteRoslynVersion" AfterTargets="Build"> <WriteLinesToFile File="@(RoslynVersionFile)" Lines="$(MicrosoftCodeAnalysisVersion)" Overwrite="true" /> </Target> <Target Name="PublishRoslynVersion" AfterTargets="Publish"> <Copy SourceFiles="@(RoslynVersionFile)" DestinationFolder="$(PublishDir)" /> </Target> <!-- Verify that the SymbolPublishingExclusionsFile.txt contains the required entries for the native SQLite library. These don't have symbols we need to publish and they cause symbol check to fail. --> <Target Name="ValidateSymbolPublishingExclusions" BeforeTargets="Build"> <PropertyGroup> <_SymbolExclusionsFile>$(RepoRoot)eng\SymbolPublishingExclusionsFile.txt</_SymbolExclusionsFile> <_ExpectedArm64Entry>tools/$(TargetFramework)/linux-musl-arm64/libsqlite3mc.so</_ExpectedArm64Entry> <_ExpectedX64Entry>tools/$(TargetFramework)/linux-musl-x64/libsqlite3mc.so</_ExpectedX64Entry> </PropertyGroup> <ReadLinesFromFile File="$(_SymbolExclusionsFile)"> <Output TaskParameter="Lines" ItemName="_SymbolExclusionLines" /> </ReadLinesFromFile> <PropertyGroup> <_ExclusionFileContent>@(_SymbolExclusionLines)</_ExclusionFileContent> <_HasArm64Entry>$(_ExclusionFileContent.Contains('$(_ExpectedArm64Entry)'))</_HasArm64Entry> <_HasX64Entry>$(_ExclusionFileContent.Contains('$(_ExpectedX64Entry)'))</_HasX64Entry> </PropertyGroup> <Error Condition="!$(_HasArm64Entry)" Text="SymbolPublishingExclusionsFile.txt is missing required entry: $(_ExpectedArm64Entry). Please add this entry to $(_SymbolExclusionsFile) to exclude the native SQLite library from symbol publishing." /> <Error Condition="!$(_HasX64Entry)" Text="SymbolPublishingExclusionsFile.txt is missing required entry: $(_ExpectedX64Entry). Please add this entry to $(_SymbolExclusionsFile) to exclude the native SQLite library from symbol publishing." /> </Target> </Project>