diff options
author | Kirill Osenkov <github@osenkov.com> | 2019-01-12 04:34:46 +0300 |
---|---|---|
committer | Kirill Osenkov <github@osenkov.com> | 2019-01-12 04:34:46 +0300 |
commit | b5a5eba664a33ea4bd6dec874f13aaa63b8d4453 (patch) | |
tree | 2a10be3f4374b3a346920b3598086ad7046e3290 /main/msbuild | |
parent | e9646f8c329f9f4132263bc46e38a6d329f9bcdd (diff) |
Fix Windows build.
Force reference Microsoft.VisualStudio.Platform.VSEditor.dll because the NuGet package is authored in such a way that the reference isn't added automatically (it has an explicit empty ref\net46 folder).
However we do reference quite a few types from the Windows consolidated package (that are otherwise defined in MS.VS.Text.Data.Util.dll).
Also the Accessibility.dll started getting added on Windows as a result of the above package and a few Roslyn enums called Accessibility now fail to compile. Remove the unneeded reference.
Diffstat (limited to 'main/msbuild')
-rw-r--r-- | main/msbuild/ReferencesVSEditor.Windows.props | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/main/msbuild/ReferencesVSEditor.Windows.props b/main/msbuild/ReferencesVSEditor.Windows.props index bf45e8f639..775f39fda1 100644 --- a/main/msbuild/ReferencesVSEditor.Windows.props +++ b/main/msbuild/ReferencesVSEditor.Windows.props @@ -9,4 +9,17 @@ <PackageReference Include="Microsoft.VisualStudio.Platform.VSEditor" Version="$(NuGetVersionVSEditor)" PrivateAssets="$(ReferencesVSEditorPrivateAssets)" />
</ItemGroup>
+ <!-- The consolidated package is authored in a way to avoid adding it to the C# compiler (ref\net46 is empty).
+ However we do reference quite a few of the types from the package on Windows, so we need to be able to
+ reference it. Currently it gets added to ReferenceCopyLocalPaths but not to _ReferencesFromNuGetPackages.-->
+ <ItemGroup>
+ <Reference Include="$(NuGetPackageRoot)Microsoft.VisualStudio.Platform.VSEditor\$(NuGetVersionVSEditor)\lib\net46\Microsoft.VisualStudio.Platform.VSEditor.dll" />
+ </ItemGroup>
+
+ <Target Name="FixReferences" AfterTargets="ResolveNuGetPackageAssets" BeforeTargets="CoreCompile" Condition="$(OS) == 'Windows_NT'">
+ <ItemGroup>
+ <Reference Remove="Accessibility" />
+ </ItemGroup>
+ </Target>
+
</Project>
\ No newline at end of file |