Make sure we're including the XML assembly in the package
This commit is contained in:
Родитель
034f1d486a
Коммит
339913fc54
|
@ -33,7 +33,7 @@ In order to dogfood the enhanced code analysis, follow these steps:
|
|||
|
||||
First build:
|
||||
|
||||
* Open an administrator developer command prompt and run `msbuild Xamarin.CodeAnalysis.sln /restore /t:configure`
|
||||
* Open an administrator developer command prompt and run `msbuild Xamarin.CodeAnalysis.sln /restore`
|
||||
|
||||
> This is necessary because the extension provides MSBuild targets that need to be symlinked from the
|
||||
> `Exp` hive location to the `VsInstallDir\MSBuild` location, which requires elevation.
|
||||
|
|
|
@ -33,43 +33,25 @@ EndProject
|
|||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A83DFC4B-4270-4A1A-8438-897A8AA61AE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A83DFC4B-4270-4A1A-8438-897A8AA61AE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A83DFC4B-4270-4A1A-8438-897A8AA61AE0}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{A83DFC4B-4270-4A1A-8438-897A8AA61AE0}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{A83DFC4B-4270-4A1A-8438-897A8AA61AE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A83DFC4B-4270-4A1A-8438-897A8AA61AE0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A83DFC4B-4270-4A1A-8438-897A8AA61AE0}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{A83DFC4B-4270-4A1A-8438-897A8AA61AE0}.Release|x86.Build.0 = Release|Any CPU
|
||||
{366C371C-0FCE-4357-87AE-C03F5DB8D47E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{366C371C-0FCE-4357-87AE-C03F5DB8D47E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{366C371C-0FCE-4357-87AE-C03F5DB8D47E}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{366C371C-0FCE-4357-87AE-C03F5DB8D47E}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{366C371C-0FCE-4357-87AE-C03F5DB8D47E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{366C371C-0FCE-4357-87AE-C03F5DB8D47E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{366C371C-0FCE-4357-87AE-C03F5DB8D47E}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{366C371C-0FCE-4357-87AE-C03F5DB8D47E}.Release|x86.Build.0 = Release|Any CPU
|
||||
{BFD12615-4DF8-4141-9A03-1B082457F699}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BFD12615-4DF8-4141-9A03-1B082457F699}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BFD12615-4DF8-4141-9A03-1B082457F699}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{BFD12615-4DF8-4141-9A03-1B082457F699}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{BFD12615-4DF8-4141-9A03-1B082457F699}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BFD12615-4DF8-4141-9A03-1B082457F699}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BFD12615-4DF8-4141-9A03-1B082457F699}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{BFD12615-4DF8-4141-9A03-1B082457F699}.Release|x86.Build.0 = Release|Any CPU
|
||||
{5409EFB9-CF35-47C4-AC27-74A1122132AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5409EFB9-CF35-47C4-AC27-74A1122132AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5409EFB9-CF35-47C4-AC27-74A1122132AF}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{5409EFB9-CF35-47C4-AC27-74A1122132AF}.Debug|x86.Build.0 = Debug|x86
|
||||
{5409EFB9-CF35-47C4-AC27-74A1122132AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5409EFB9-CF35-47C4-AC27-74A1122132AF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5409EFB9-CF35-47C4-AC27-74A1122132AF}.Release|x86.ActiveCfg = Release|x86
|
||||
{5409EFB9-CF35-47C4-AC27-74A1122132AF}.Release|x86.Build.0 = Release|x86
|
||||
{5409EFB9-CF35-47C4-AC27-74A1122132AF}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{5409EFB9-CF35-47C4-AC27-74A1122132AF}.Debug|Any CPU.Build.0 = Debug|x86
|
||||
{5409EFB9-CF35-47C4-AC27-74A1122132AF}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{5409EFB9-CF35-47C4-AC27-74A1122132AF}.Release|Any CPU.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -50,6 +50,44 @@
|
|||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<ReferencePath>
|
||||
<NuGetPackageId></NuGetPackageId>
|
||||
</ReferencePath>
|
||||
<ReferenceCopyLocalPaths>
|
||||
<NuGetPackageId></NuGetPackageId>
|
||||
</ReferenceCopyLocalPaths>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<Target Name="AugmentPackageReferenceAssemblies" Inputs="@(PackageReference)" Outputs="%(PackageReference.Identity)-BATCH"
|
||||
AfterTargets="ResolveAssemblyReferences" DependsOnTargets="ResolveAssemblyReferences">
|
||||
<PropertyGroup>
|
||||
<PackageId>%(PackageReference.Identity)</PackageId>
|
||||
<CopyLocal>%(PackageReference.CopyLocal)</CopyLocal>
|
||||
<Private>%(PackageReference.Private)</Private>
|
||||
<IncludeInVSIX>%(PackageReference.IncludeInVSIX)</IncludeInVSIX>
|
||||
<NewMetadata>$(CopyLocal)$(Private)$(IncludeInVSIX)</NewMetadata>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(NewMetadata)' != ''">
|
||||
<NuGetReferencePath Include="@(ReferencePath)" Condition="'%(NuGetPackageId)' == '$(PackageId)'">
|
||||
<CopyLocal Condition="'$(CopyLocal)' != ''">$(CopyLocal)</CopyLocal>
|
||||
<Private Condition="'$(Private)' != ''">$(Private)</Private>
|
||||
<IncludeInVSIX Condition="'$(IncludeInVSIX)' != ''">$(IncludeInVSIX)</IncludeInVSIX>
|
||||
</NuGetReferencePath>
|
||||
<ReferencePath Remove="@(NuGetReferencePath)" />
|
||||
<ReferencePath Include="@(NuGetReferencePath)" />
|
||||
|
||||
<NuGetReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths)" Condition="'%(NuGetPackageId)' == '$(PackageId)'">
|
||||
<CopyLocal Condition="'$(CopyLocal)' != ''">$(CopyLocal)</CopyLocal>
|
||||
<Private Condition="'$(Private)' != ''">$(Private)</Private>
|
||||
<IncludeInVSIX Condition="'$(IncludeInVSIX)' != ''">$(IncludeInVSIX)</IncludeInVSIX>
|
||||
</NuGetReferenceCopyLocalPaths>
|
||||
<ReferenceCopyLocalPaths Remove="@(NuGetReferenceCopyLocalPaths)" />
|
||||
<ReferenceCopyLocalPaths Include="@(NuGetReferenceCopyLocalPaths)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Import Project="GenerateInternalsVisibleTo.targets" />
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
<PropertyGroup>
|
||||
<Dev>$(VisualStudioVersion.Substring(0, 2))</Dev>
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
<Platforms>AnyCPU;x86</Platforms>
|
||||
<Platforms>x86</Platforms>
|
||||
<Platform>x86</Platform>
|
||||
|
||||
<RootNamespace>Xamarin.CodeAnalysis</RootNamespace>
|
||||
|
||||
<IncludeDebugSymbolsInVSIXContainer>true</IncludeDebugSymbolsInVSIXContainer>
|
||||
<IncludeDebugSymbolsInLocalVSIXDeployment>true</IncludeDebugSymbolsInLocalVSIXDeployment>
|
||||
<DefaultIncludeOutputGroupsInVSIX>BuiltProjectOutputGroup;DebugSymbolsProjectOutputGroup;GetCopyToOutputDirectoryItems;SatelliteDllsProjectOutputGroup</DefaultIncludeOutputGroupsInVSIX>
|
||||
<DefaultIncludeOutputGroupsInVSIX>BuiltProjectOutputGroup;BuiltProjectOutputGroupDependencies;DebugSymbolsProjectOutputGroup;DocumentationProjectOutputGroup;GetCopyToOutputDirectoryItems;SatelliteDllsProjectOutputGroup</DefaultIncludeOutputGroupsInVSIX>
|
||||
|
||||
<TargetVsixContainerName>Xamarin.CodeAnalysis.vsix</TargetVsixContainerName>
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
|||
<!-- For inclusion in the VSIX install path, we don't want the .targets -->
|
||||
<AdditionalProperties>ExcludeTargets=true</AdditionalProperties>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Xamarin.CodeAnalysis\Xamarin.CodeAnalysis.csproj">
|
||||
<ProjectReference Include="..\Xamarin.CodeAnalysis\Xamarin.CodeAnalysis.csproj" Condition="$(CI)">
|
||||
<AdditionalProperties>BuildReference=false</AdditionalProperties>
|
||||
<Name>Xamarin.CodeAnalysis</Name>
|
||||
<BuildProject>false</BuildProject>
|
||||
|
@ -105,15 +105,6 @@
|
|||
<Target Name="IsSystemComponent" Returns="$(IsSystemComponent)" />
|
||||
<Target Name="IsCI" Returns="$(CI)" />
|
||||
|
||||
<!--
|
||||
<PropertyGroup Condition="'$(OS)' == 'Windows_NT'">
|
||||
<BuildDependsOn Condition="!$(CI)">
|
||||
$(BuildDependsOn);
|
||||
SymLink
|
||||
</BuildDependsOn>
|
||||
</PropertyGroup>
|
||||
-->
|
||||
|
||||
<Target Name="ApplyVSIXSubPathOverride" AfterTargets="GetVsixSourceItems">
|
||||
<ItemGroup>
|
||||
<VSIXSourceItem Update="@(VSIXSourceItem)" Condition="'%(VSIXSourceItem.VSIXSubPathOverride)' != ''">
|
||||
|
@ -125,7 +116,7 @@
|
|||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="SymLink" DependsOnTargets="IsAdministrator;CollectLinkItems;ReplaceLinkItems" />
|
||||
<Target Name="AfterBuild" DependsOnTargets="IsAdministrator;CollectLinkItems;ReplaceLinkItems" />
|
||||
|
||||
<Target Name="IsAdministrator">
|
||||
<IsAdministrator>
|
||||
|
@ -158,16 +149,12 @@
|
|||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="ReplaceLinkItems" Condition="'@(MkLinkSource)' != '' And '$(IsAdministrator)' == 'true'">
|
||||
<Message Text="In $(Configuration) builds, we attempt to symlink MSBuild files with current project output." Importance="high" />
|
||||
<ItemGroup>
|
||||
<_FilesToDelete Include="@(MkLinkSource -> WithMetadataValue('Exists', 'true'))" />
|
||||
</ItemGroup>
|
||||
<Exec Command="del "%(_FilesToDelete.FullPath)"" EchoOff="true" Condition="'@(_FilesToDelete)' != ''" />
|
||||
<Target Name="ReplaceLinkItems" Inputs="@(MkLinkSource)" Outputs="%(MkLinkSource.Identity)-BATCH" Condition="'@(MkLinkSource)' != '' And '$(IsAdministrator)' == 'true'">
|
||||
<Exec Command="del "%(MkLinkSource.FullPath)"" EchoOff="true" Condition="Exists('%(MkLinkSource.FullPath)')" />
|
||||
<Exec Command="mklink "%(MkLinkSource.Identity)" "%(MkLinkSource.LinkTarget)"" ConsoleToMSBuild="true" EchoOff="true" Condition="Exists('%(MkLinkSource.RootDir)%(MkLinkSource.Directory)')">
|
||||
<Output TaskParameter="ConsoleOutput" ItemName="MkLinked" />
|
||||
</Exec>
|
||||
<Message Importance="high" Text="%(MkLinked.Identity)" Condition="'@(MkLinked)' != ''" />
|
||||
<Message Importance="high" Text="%(MkLinkSource.Identity)" Condition="'@(MkLinkSource)' != ''" />
|
||||
</Target>
|
||||
|
||||
<UsingTask TaskName="IsAdministrator" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="GuiLabs.Language.Xml" />
|
||||
<PackageReference Include="GuiLabs.Language.Xml" CopyLocal="true" IncludeInVSIX="true" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Features" />
|
||||
<InternalsVisibleTo Include="Xamarin.CodeAnalysis.Tests" />
|
||||
</ItemGroup>
|
||||
|
@ -30,8 +30,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<None Update="*.targets" Condition="'$(ExcludeTargets)' != 'true'" CopyToOutputDirectory="PreserveNewest" />
|
||||
<None Update="Xamarin.CodeAnalysis.ImportAfter.targets"
|
||||
VSIXSubPathOverride="Current\Microsoft.Common.Targets\ImportAfter" />
|
||||
<None Update="Xamarin.CodeAnalysis.ImportAfter.targets" VSIXSubPathOverride="Current\Microsoft.Common.Targets\ImportAfter" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
Загрузка…
Ссылка в новой задаче