[BuildHost] Move RPC contracts to a separate assembly #81643
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: https://github.com/dotnet/roslyn/pull/81577/files?file-filters%5B%5D=.json&file-filters%5B%5D=.cs&file-filters%5B%5D=.txt&file-filters%5B%5D=.csproj#diff-5b690fb7220ca800592067b9ca959ee332ea6455223eab931c526654553aa45c
The extern alias is needed to avoid conflicts between sources linked to BuildHost and Worksapace via MS.CA.Contracts.shproj.
Considered using
Microsoft.CodeAnalysis.EmbeddedAttributebut that has issues - if it's applied on the type that type is not going to be visible in projects (transitively) referencing the project that links the source. Each project would need to reference MS.CA.Contracts.shproj directly and hence we would have N copies of the types. That works for some types, but for not for exchange types likeIReadOnlySet<T>, which need to be the same across all projects that have access to them.