forked from dotnet/roslyn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
install servicehub json files in common7/servicehub folders (dotnet#3…
…4563) * moved files * opt-in to new "serviceOverride": true support and refactor directory structure to share json files with devdiv insertion projects * added swr for servicehub json files. * delete projects not needed * moving to auto generated service.json approach * made json file included in vsix * generate swr file * address PR feedbacks and remove duplications except vsix manifest * use relative path in json file * share duplicated string to multiple csproj * fix swr package name * PR feedbacks
- Loading branch information
1 parent
f09ab5f
commit 3f6afea
Showing
16 changed files
with
136 additions
and
126 deletions.
There are no files selected for viewing
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
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,57 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. --> | ||
<Project> | ||
<!-- | ||
The inclusion of this file will cause *.servicehub.service.json files to be created. and these json files contain configuration for the servicehub on how it | ||
should configure our services in servicehub process | ||
--> | ||
<ItemGroup> | ||
<ServiceHubService Include="roslynCodeAnalysis" ClassName="Microsoft.CodeAnalysis.Remote.CodeAnalysisService" /> | ||
<ServiceHubService Include="roslynRemoteHost" ClassName="Microsoft.CodeAnalysis.Remote.RemoteHostService" /> | ||
<ServiceHubService Include="roslynSnapshot" ClassName="Microsoft.CodeAnalysis.Remote.SnapshotService" /> | ||
<ServiceHubService Include="roslynRemoteSymbolSearchUpdateEngine" ClassName="Microsoft.CodeAnalysis.Remote.RemoteSymbolSearchUpdateEngine" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<GetVsixSourceItemsDependsOn>$(GetVsixSourceItemsDependsOn);GenerateServiceHubConfigurationFiles</GetVsixSourceItemsDependsOn> | ||
</PropertyGroup> | ||
|
||
<Target Name="CalculateServiceHubConfigurationFiles"> | ||
<ItemGroup> | ||
<_ServicesWithBitness Include="@(ServiceHubService)" FileSuffix="" HostSuffix=".x86" HostIdSuffix="32" /> | ||
<_ServicesWithBitness Include="@(ServiceHubService)" FileSuffix="64" HostSuffix="" HostIdSuffix="" /> | ||
|
||
<_JsonFile Include="$(IntermediateOutputPath)%(_ServicesWithBitness.FileName)%(_ServicesWithBitness.FileSuffix).servicehub.service.json"> | ||
<Content> | ||
<![CDATA[{ | ||
"host": "desktopClr%(_ServicesWithBitness.HostSuffix)", | ||
"hostId": "RoslynCodeAnalysisService%(_ServicesWithBitness.HostIdSuffix)", | ||
"hostGroupAllowed": true, | ||
"serviceOverride": true, | ||
"entryPoint": { | ||
"assemblyPath": "$(ServiceHubAssemblyBasePath.Replace('\', '\\'))Microsoft.CodeAnalysis.Remote.ServiceHub.dll", | ||
"fullClassName": "%(_ServicesWithBitness.ClassName)", | ||
"appBasePath": "%VSAPPIDDIR%", | ||
"configPath": "%PkgDefApplicationConfigFile%" | ||
} | ||
} | ||
]]> | ||
</Content> | ||
</_JsonFile> | ||
</ItemGroup> | ||
</Target> | ||
|
||
<Target Name="GenerateServiceHubConfigurationFiles" | ||
DependsOnTargets="CalculateServiceHubConfigurationFiles" | ||
BeforeTargets="CreateVsixContainer" | ||
Inputs="$(MSBuildProjectFullPath)" | ||
Outputs="@(_JsonFile)"> | ||
|
||
<WriteLinesToFile File="%(_JsonFile.Identity)" Lines="%(_JsonFile.Content)" Overwrite="true"/> | ||
|
||
<ItemGroup> | ||
<FileWrites Include="@(_JsonFile->'%(Identity)')"/> | ||
<VSIXSourceItem Include="@(_JsonFile->'%(Identity)')" /> | ||
</ItemGroup> | ||
</Target> | ||
</Project> |
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
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
57 changes: 57 additions & 0 deletions
57
src/Setup/DevDivVsix/ServiceHubConfig/Roslyn.VisualStudio.Setup.ServiceHub.csproj
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,57 @@ | ||
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. --> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net472</TargetFramework> | ||
<RoslynProjectType>Custom</RoslynProjectType> | ||
|
||
<!-- VS Insertion --> | ||
<TargetVsixContainerName>Roslyn.VisualStudio.Setup.ServiceHub.vsix</TargetVsixContainerName> | ||
<VisualStudioInsertionComponent>Microsoft.CodeAnalysis.LanguageServices</VisualStudioInsertionComponent> | ||
|
||
<!-- ServiceHub AssemblyPath --> | ||
<!-- Path to our servicehub entry point dll in Common7\IDE\CommonExtensions\Microsoft\ManagedLanguages\VBCSharp\LanguageServices (our vsix directory) | ||
relative to Common7\ServiceHub\Services\RoslynCodeAnalysisService where our in-box servicehub.service.json files are --> | ||
<ServiceHubAssemblyBasePath>..\..\..\IDE\$(CommonExtensionInstallationRoot)\$(LanguageServicesExtensionInstallationFolder)\</ServiceHubAssemblyBasePath> | ||
</PropertyGroup> | ||
|
||
<Target Name="_SetSwrFilePath"> | ||
<PropertyGroup> | ||
<_SwrFilePath>$(IntermediateOutputPath)Roslyn.VisualStudio.Setup.ServiceHub.swr</_SwrFilePath> | ||
</PropertyGroup> | ||
</Target> | ||
|
||
<Target Name="_GenerateSwrFile" | ||
AfterTargets="Build" | ||
BeforeTargets="SwixBuild" | ||
DependsOnTargets="_SetSwrFilePath;GenerateServiceHubConfigurationFiles" | ||
Outputs="$(_SwrFilePath)"> | ||
|
||
<ItemGroup> | ||
<_ServiceHubConfigFiles Include="@(ServiceHubService)" FileSuffix="" /> | ||
<_ServiceHubConfigFiles Include="@(ServiceHubService)" FileSuffix="64" /> | ||
<_FileEntries Include='file source="$(IntermediateOutputPath)%(_ServiceHubConfigFiles.FileName)%(_ServiceHubConfigFiles.FileSuffix).servicehub.service.json"'/> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<_Lines> | ||
<![CDATA[use vs | ||
package name=$(MSBuildProjectName) | ||
version=$(VsixVersion) | ||
folder InstallDir:\Common7\ServiceHub\Services\RoslynCodeAnalysisService | ||
@(_FileEntries, '%0d%0a ') | ||
]]> | ||
</_Lines> | ||
</PropertyGroup> | ||
|
||
<WriteLinesToFile File="$(_SwrFilePath)" Lines="$(_Lines)" Overwrite="true"/> | ||
|
||
<ItemGroup> | ||
<FileWrites Include="$(_SwrFilePath)"/> | ||
<SwrFile Include="$(_SwrFilePath)"/> | ||
</ItemGroup> | ||
</Target> | ||
|
||
<Import Project="$(RepositoryEngineeringDir)targets\GenerateServiceHubConfigurationFiles.targets" /> | ||
</Project> |
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
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
11 changes: 0 additions & 11 deletions
11
src/VisualStudio/Setup/roslynCodeAnalysis.servicehub.service.json
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
src/VisualStudio/Setup/roslynCodeAnalysis64.servicehub.service.json
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
src/VisualStudio/Setup/roslynRemoteHost.servicehub.service.json
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
src/VisualStudio/Setup/roslynRemoteHost64.servicehub.service.json
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
src/VisualStudio/Setup/roslynRemoteSymbolSearchUpdateEngine.servicehub.service.json
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
src/VisualStudio/Setup/roslynRemoteSymbolSearchUpdateEngine64.servicehub.service.json
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
src/VisualStudio/Setup/roslynSnapshot.servicehub.service.json
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
src/VisualStudio/Setup/roslynSnapshot64.servicehub.service.json
This file was deleted.
Oops, something went wrong.
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