Skip to content

Instantly share code, notes, and snippets.

<Project>
<!--
This is a copy of the Microsoft.VisualStudio.SDK.EmbedInteropTypes NuGet package, but only the list of
assemblies that we need. The package includes things like EnvDTE which are reasonable for consumers, but
strange since we actually _implement_ DTE and use it as an exchange type with generics in a few places.
-->
<Target Name="LinkVSSDKEmbeddableAssemblies" BeforeTargets="FindReferenceAssembliesForReferences;ResolveReferences">
<ItemGroup>
<ReferencePath Condition="
'%(FileName)' == 'Microsoft.VisualStudio.Shell.Embeddable'
<Project>
<!-- Copy XAML rule files and design targets files for testing and setup authoring purposes -->
<Target Name="CopyXamlRulesToOutputDirectory" AfterTargets="CopyFilesToOutputDirectory">
<Copy SourceFiles="@(XamlPropertyRule);@(XamlPropertyRuleNoCodeBehind);@(XamlPropertyProjectItemsSchema);@(DesignTimeTargetsFile)"
DestinationFolder="$(OutputPath)Rules"
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
Retries="$(CopyRetryCount)"
Native TrySZSort
FCIMPL4(INT32, ArrayHelper::TrySZSort, ArrayBase * keys, ArrayBase * items, UINT32 left, UINT32 right)
//in an array is not single-dimensional with initial index, null is not sorted
if (keys-&gt;GetRank() != 1 || keys-&gt;GetLowerBoundsPtr()[0] != 0)
return FALSE;
// Getting array element type
TypeHandle keysTH = keys-&gt;GetElementTypeHandle();
// If it is not an in-built primitive type