Skip to content

Commit 73d4974

Browse files
authored
Add setup components for use with insertion into VS (#45)
* add proj/vsix stuff for setup * add swix targets for VS setup build * split swixproj and vsmanproj for building * add gitversioning and packages.config for nuget * add solution name to swixproj so outputpath is correct * import nuget props after common props so we know about the restore location * use the right SolutionName * fix in vsmanproj as well * explicit extensiondir * Update Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest.swr remove double \
1 parent 5d4d2d5 commit 73d4974

9 files changed

Lines changed: 163 additions & 0 deletions

GoogleTestAdapter/Packaging.TAfGT/Packaging.TAfGT.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<CopyOutputSymbolsToOutputDirectory>true</CopyOutputSymbolsToOutputDirectory>
2727
<BypassVsixValidation>true</BypassVsixValidation>
2828
<DeployExtension Condition="'$(TestAdapterFlavor)' != 'TAfGT'">false</DeployExtension>
29+
<IsProductComponent>true</IsProductComponent>
2930
</PropertyGroup>
3031
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3132
<DebugSymbols>true</DebugSymbols>

GoogleTestAdapter/Packaging.TAfGT/source.extension.vsixmanifest

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<Identity Id="GoogleTestAdapterVSIX.8486b54e-5768-482b-b224-7d069ca509d8" Version="0.1.0.0" Language="en-US" Publisher="Christian Soltenborn, Jonas Gefele" />
55
<DisplayName>Test Adapter for Google Test</DisplayName>
66
<Description xml:space="preserve">Enables Visual Studio's testing tools with unit tests written for Google Test.</Description>
7+
<PackageId>Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest</PackageId>
78
<MoreInfo>https://go.microsoft.com/fwlink/?linkid=848768</MoreInfo>
89
<License>use.txt</License>
910
<ReleaseNotes>ReleaseNotes.txt</ReleaseNotes>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<OutputArchitecture>neutral</OutputArchitecture>
5+
<OutputLocalized>false</OutputLocalized>
6+
<OutputName>Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest</OutputName>
7+
<OutputType>manifest</OutputType>
8+
<IsPackage>true</IsPackage>
9+
<VSGeneralVersion>15.0</VSGeneralVersion>
10+
<VSNextGeneralVersion>16.0</VSNextGeneralVersion>
11+
<SolutionName>GoogleTestAdapter</SolutionName>
12+
</PropertyGroup>
13+
14+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Common.props))\Common.props" />
15+
<Import Project="$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.props" />
16+
17+
<PropertyGroup>
18+
<VsixOutDir>$(OutputPath)..\Packaging.TAfGT</VsixOutDir>
19+
</PropertyGroup>
20+
21+
<ItemGroup>
22+
<Package Include="Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest.swr" />
23+
</ItemGroup>
24+
25+
<Target Name="SetVsixProperties" BeforeTargets="Build" DependsOnTargets="GetBuildVersion">
26+
<PropertyGroup>
27+
<!-- Variables added here will be usable in the swr file. This is a semi colon delimited
28+
list of name=value items. Use $(name) in the swr file to reference the variable.
29+
-->
30+
<PackagePreprocessorDefinitions>
31+
$(PackagePreprocessorDefinitions);
32+
VsixOutDir=$(VsixOutDir);
33+
Version=$(BuildVersion);
34+
VSGeneralVersion=$(VSGeneralVersion);
35+
VSNextGeneralVersion=$(VSNextGeneralVersion);
36+
</PackagePreprocessorDefinitions>
37+
</PropertyGroup>
38+
</Target>
39+
40+
<!-- MicroBuild plugin fails if GetNativeManifest is not found for some reason -->
41+
<Target Name="GetNativeManifest" />
42+
<Import Project="$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets" />
43+
<Import Project="$(NuGetPackages)Nerdbank.GitVersioning.1.4.30\build\dotnet\Nerdbank.GitVersioning.targets" />
44+
</Project>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
use vs
2+
3+
package name=Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest
4+
version=$(Version)
5+
vs.package.type=vsix
6+
vs.package.installSize=22265856
7+
vs.package.vsixId=GoogleTestAdapterVSIX.8486b54e-5768-482b-b224-7d069ca509d8
8+
vs.package.extensionDir=[installdir]\Common7\IDE\CommonExtensions\VC\TestAdapterForGoogleTest
9+
10+
vs.payloads
11+
vs.payload source=$(VsixOutDir)\Packaging.TAfGT.vsix
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<FinalizeManifest>true</FinalizeManifest>
5+
<FinalizeSkipLayout>true</FinalizeSkipLayout>
6+
7+
<!-- Set ValidateManifest to false because the tooling currently doesn't
8+
support finding the dependency for MinShell outside of VS -->
9+
<ValidateManifest>false</ValidateManifest>
10+
<SolutionName>GoogleTestAdapter</SolutionName>
11+
</PropertyGroup>
12+
13+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Common.props))\Common.props" />
14+
<Import Project="$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.props" />
15+
16+
<ItemGroup>
17+
<MergeManifest Include="$(OutputPath)\Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest.json" />
18+
</ItemGroup>
19+
20+
<Import Project="$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets" />
21+
</Project>

swix/packages.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="MicroBuild.Core" version="0.2.0" targetFramework="net46" developmentDependency="true" />
4+
<package id="Nerdbank.GitVersioning" version="1.4.30" targetFramework="net46" developmentDependency="true" />
5+
</packages>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Common.props))\Common.props" />
4+
<Import Project="$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.props" />
5+
6+
<PropertyGroup>
7+
<OutputArchitecture>neutral</OutputArchitecture>
8+
<OutputLocalized>false</OutputLocalized>
9+
<OutputName>Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest</OutputName>
10+
<OutputType>manifest</OutputType>
11+
<IsPackage>true</IsPackage>
12+
<VSGeneralVersion>15.0</VSGeneralVersion>
13+
<VSNextGeneralVersion>16.0</VSNextGeneralVersion>
14+
</PropertyGroup>
15+
16+
<PropertyGroup>
17+
<VsixOutDir>$(OutputPath)..\Packaging.TAfGT</VsixOutDir>
18+
</PropertyGroup>
19+
20+
<ItemGroup>
21+
<Package Include="Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest.swr" />
22+
</ItemGroup>
23+
24+
<Target Name="SetVsixProperties" BeforeTargets="Build" DependsOnTargets="GetBuildVersion">
25+
<PropertyGroup>
26+
<!-- Variables added here will be usable in the swr file. This is a semi colon delimited
27+
list of name=value items. Use $(name) in the swr file to reference the variable.
28+
-->
29+
<PackagePreprocessorDefinitions>
30+
$(PackagePreprocessorDefinitions);
31+
VsixOutDir=$(VsixOutDir);
32+
Version=$(BuildVersion);
33+
VSGeneralVersion=$(VSGeneralVersion);
34+
VSNextGeneralVersion=$(VSNextGeneralVersion);
35+
</PackagePreprocessorDefinitions>
36+
</PropertyGroup>
37+
</Target>
38+
39+
<!-- MicroBuild plugin fails if GetNativeManifest is not found for some reason -->
40+
<Target Name="GetNativeManifest" />
41+
<Import Project="$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets" />
42+
</Project>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
use vs
2+
3+
package name=Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest
4+
version=$(Version)
5+
vs.package.type=vsix
6+
vs.package.installSize=22265856
7+
vs.package.vsixId=GoogleTestAdapterVSIX.8486b54e-5768-482b-b224-7d069ca509d8
8+
9+
vs.payloads
10+
vs.payload source=$(VsixOutDir)\Packaging.TAfGT.vsix
11+
12+
vs.dependencies
13+
vs.dependency id=Microsoft.VisualStudio.MinShell
14+
version=[$(VSGeneralVersion),$(VSNextGeneralVersion))
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Common.props))\Common.props" />
4+
<Import Project="$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.props" />
5+
6+
<PropertyGroup>
7+
<FinalizeManifest>true</FinalizeManifest>
8+
<FinalizeSkipLayout>true</FinalizeSkipLayout>
9+
10+
<!-- Set ValidateManifest to false because the tooling currently doesn't
11+
support finding the dependency for MinShell outside of VS -->
12+
<ValidateManifest>false</ValidateManifest>
13+
</PropertyGroup>
14+
15+
<ItemGroup>
16+
<ProjectReference Include="Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest.swixproj" />
17+
</ItemGroup>
18+
19+
<ItemGroup>
20+
<MergeManifest Include="$(OutputPath)\Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest.json" />
21+
</ItemGroup>
22+
23+
<Import Project="$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets" />
24+
</Project>

0 commit comments

Comments
 (0)