Skip to content

Commit

Permalink
Add missing PIA assembly
Browse files Browse the repository at this point in the history
Project now builds correctly

Fixes #1
  • Loading branch information
SLaks committed Jan 16, 2014
1 parent d6a6c26 commit cebb668
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Root-VSIX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>$(DevEnvDir)\..\..\VSSDK\VisualStudioIntegration\Common\Assemblies\v4.0\Microsoft.VisualStudio.Shell.12.0.dll</HintPath>
</Reference>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="Shell.Interop\Shell.Interop.csproj">
<Project>{2ae4160d-f51a-4374-9f40-ecee109d0f0d}</Project>
<Name>Shell.Interop</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
6 changes: 6 additions & 0 deletions Root-VSIX.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Root-VSIX", "Root-VSIX.csproj", "{76E89321-38FA-4E6D-8FE8-CC3E89428092}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shell.Interop", "Shell.Interop\Shell.Interop.csproj", "{2AE4160D-F51A-4374-9F40-ECEE109D0F0D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -15,6 +17,10 @@ Global
{76E89321-38FA-4E6D-8FE8-CC3E89428092}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76E89321-38FA-4E6D-8FE8-CC3E89428092}.Release|Any CPU.ActiveCfg = Release|Any CPU
{76E89321-38FA-4E6D-8FE8-CC3E89428092}.Release|Any CPU.Build.0 = Release|Any CPU
{2AE4160D-F51A-4374-9F40-ECEE109D0F0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2AE4160D-F51A-4374-9F40-ECEE109D0F0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2AE4160D-F51A-4374-9F40-ECEE109D0F0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2AE4160D-F51A-4374-9F40-ECEE109D0F0D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
34 changes: 34 additions & 0 deletions Shell.Interop/COM Types.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System;
using System.Runtime.InteropServices;

// These types don't have a publicly available PIA, so I need to make one myself

[assembly: PrimaryInteropAssembly(12, 0)]
namespace Microsoft.Internal.VisualStudio.Shell.Interop
{
[Guid("753E55C6-E779-4A7A-BCD1-FD87181D52C0"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport]
public interface IVsExtensionManagerPrivate
{
[PreserveSig]
int GetEnabledExtensionContentLocations([MarshalAs(UnmanagedType.LPWStr)] [In] string szContentTypeName, [In] uint cContentLocations, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.BStr, SizeParamIndex = 1)] [Out] string[] rgbstrContentLocations, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.BStr, SizeParamIndex = 1)] [Out] string[] rgbstrUniqueExtensionStrings, out uint pcContentLocations);
[PreserveSig]
int GetEnabledExtensionContentLocationsWithNames([MarshalAs(UnmanagedType.LPWStr)] [In] string szContentTypeName, [In] uint cContentLocations, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.BStr, SizeParamIndex = 1)] [Out] string[] rgbstrContentLocations, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.BStr, SizeParamIndex = 1)] [Out] string[] rgbstrUniqueExtensionStrings, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.BStr, SizeParamIndex = 1)] [Out] string[] rgbstrExtensionNames, out uint pcContentLocations);
[PreserveSig]
int GetDisabledExtensionContentLocations([MarshalAs(UnmanagedType.LPWStr)] [In] string szContentTypeName, [In] uint cContentLocations, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.BStr, SizeParamIndex = 1)] [Out] string[] rgbstrContentLocations, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.BStr, SizeParamIndex = 1)] [Out] string[] rgbstrUniqueExtensionStrings, out uint pcContentLocations);
[PreserveSig]
int GetLastConfigurationChange([MarshalAs(UnmanagedType.LPArray)] [Out] DateTime[] pTimestamp);
[PreserveSig]
int LogAllInstalledExtensions();
[PreserveSig]
int GetUniqueExtensionString([MarshalAs(UnmanagedType.LPWStr)] [In] string szExtensionIdentifier, [MarshalAs(UnmanagedType.BStr)] out string pbstrUniqueString);
}
[Guid("6B741746-E3C9-434A-9E20-6E330D88C7F6"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport]
public interface IVsExtensionManagerPrivate2
{
void GetAssetProperties([MarshalAs(UnmanagedType.LPWStr)] [In] string szAssetTypeName, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)] out Array prgsaNames, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)] out Array prgsaVersions, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)] out Array prgsaAuthors, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)] out Array prgsaExtensionIDs);
void GetExtensionProperties([MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)] out Array prgsaNames, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)] out Array prgsaVersions, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)] out Array prgsaAuthors, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)] out Array prgsaContentLocations, [MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)] out Array prgsaExtensionIDs);
ulong GetLastWriteTime([MarshalAs(UnmanagedType.LPWStr)] [In] string szContentTypeName);
}
}
52 changes: 52 additions & 0 deletions Shell.Interop/Shell.Interop.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2AE4160D-F51A-4374-9F40-ECEE109D0F0D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Shell.Interop</RootNamespace>
<AssemblyName>Shell.Interop</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Compile Include="COM Types.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

0 comments on commit cebb668

Please sign in to comment.