Skip to content

Commit

Permalink
Enable transitive project references
Browse files Browse the repository at this point in the history
When moving to the new SDK I initially disabled transitive project
references because it was causing issues building our VSIX projects. Had
some time this week to sit down and work through the problem which comes
down to the VSIX indirectly referencing a multi-targetted project. This
is a known bug in the SDK that can be worked around by doing the
following:

- Explicitly referencing the project
- Using AdditionalProperties to specify the TF to use
- Using Name to work around inability of VSSDK to infer Name

The SDK bug is here.

dotnet/sdk#433
  • Loading branch information
jaredpar committed Nov 16, 2017
1 parent ceda6ce commit aca53cb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
16 changes: 0 additions & 16 deletions build/Targets/DisableTransitiveReferences.targets

This file was deleted.

1 change: 0 additions & 1 deletion build/Targets/Imports.targets
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@

<Import Project="GenerateAssemblyInfo.targets" Condition="'$(ProjectLanguage)' == 'CSharp' OR '$(ProjectLanguage)' == 'VB'" />
<Import Project="GenerateInternalsVisibleTo.targets" />
<Import Project="DisableTransitiveReferences.targets" Condition="'$(RoslynProjectType)' == 'Vsix' AND '$(RoslynSdkProject)' == 'true'" />

<ItemDefinitionGroup>
<VSIXSourceItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@
<ProjectReference Include="..\TestUtilities\VisualStudioIntegrationTestUtilities.csproj">
<Name>VisualStudioIntegrationTestUtilities</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Test\Utilities\Portable\TestUtilities.csproj">
<!-- https://github.com/dotnet/sdk/issues/433 -->
<AdditionalProperties>TargetFramework=net461</AdditionalProperties>
<Name>TestUtilities</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<VSIXSourceItem Include="$(OutputPath)Microsoft.Diagnostics.Runtime.dll" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
<ProjectReference Include="..\..\Workspaces\Remote\ServiceHub\ServiceHub.csproj">
<IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup%3b</IncludeOutputGroupsInVSIX>
</ProjectReference>
<ProjectReference Include="..\..\Test\Utilities\Portable\TestUtilities.csproj">
<!-- https://github.com/dotnet/sdk/issues/433 -->
<AdditionalProperties>TargetFramework=net461</AdditionalProperties>
<Name>TestUtilities</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<NuGetPackageToIncludeInVsix Include="Nerdbank.FullDuplexStream" />
Expand Down

0 comments on commit aca53cb

Please sign in to comment.