Skip to content

Commit

Permalink
Add setup components for use with insertion into VS (#45)
Browse files Browse the repository at this point in the history
* 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 \
  • Loading branch information
spebl authored Sep 21, 2017
1 parent 5d4d2d5 commit 73d4974
Show file tree
Hide file tree
Showing 9 changed files with 163 additions and 0 deletions.
1 change: 1 addition & 0 deletions GoogleTestAdapter/Packaging.TAfGT/Packaging.TAfGT.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<CopyOutputSymbolsToOutputDirectory>true</CopyOutputSymbolsToOutputDirectory>
<BypassVsixValidation>true</BypassVsixValidation>
<DeployExtension Condition="'$(TestAdapterFlavor)' != 'TAfGT'">false</DeployExtension>
<IsProductComponent>true</IsProductComponent>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Identity Id="GoogleTestAdapterVSIX.8486b54e-5768-482b-b224-7d069ca509d8" Version="0.1.0.0" Language="en-US" Publisher="Christian Soltenborn, Jonas Gefele" />
<DisplayName>Test Adapter for Google Test</DisplayName>
<Description xml:space="preserve">Enables Visual Studio's testing tools with unit tests written for Google Test.</Description>
<PackageId>Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest</PackageId>
<MoreInfo>https://go.microsoft.com/fwlink/?linkid=848768</MoreInfo>
<License>use.txt</License>
<ReleaseNotes>ReleaseNotes.txt</ReleaseNotes>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputArchitecture>neutral</OutputArchitecture>
<OutputLocalized>false</OutputLocalized>
<OutputName>Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest</OutputName>
<OutputType>manifest</OutputType>
<IsPackage>true</IsPackage>
<VSGeneralVersion>15.0</VSGeneralVersion>
<VSNextGeneralVersion>16.0</VSNextGeneralVersion>
<SolutionName>GoogleTestAdapter</SolutionName>
</PropertyGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Common.props))\Common.props" />
<Import Project="$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.props" />

<PropertyGroup>
<VsixOutDir>$(OutputPath)..\Packaging.TAfGT</VsixOutDir>
</PropertyGroup>

<ItemGroup>
<Package Include="Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest.swr" />
</ItemGroup>

<Target Name="SetVsixProperties" BeforeTargets="Build" DependsOnTargets="GetBuildVersion">
<PropertyGroup>
<!-- Variables added here will be usable in the swr file. This is a semi colon delimited
list of name=value items. Use $(name) in the swr file to reference the variable.
-->
<PackagePreprocessorDefinitions>
$(PackagePreprocessorDefinitions);
VsixOutDir=$(VsixOutDir);
Version=$(BuildVersion);
VSGeneralVersion=$(VSGeneralVersion);
VSNextGeneralVersion=$(VSNextGeneralVersion);
</PackagePreprocessorDefinitions>
</PropertyGroup>
</Target>

<!-- MicroBuild plugin fails if GetNativeManifest is not found for some reason -->
<Target Name="GetNativeManifest" />
<Import Project="$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets" />
<Import Project="$(NuGetPackages)Nerdbank.GitVersioning.1.4.30\build\dotnet\Nerdbank.GitVersioning.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use vs

package name=Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest
version=$(Version)
vs.package.type=vsix
vs.package.installSize=22265856
vs.package.vsixId=GoogleTestAdapterVSIX.8486b54e-5768-482b-b224-7d069ca509d8
vs.package.extensionDir=[installdir]\Common7\IDE\CommonExtensions\VC\TestAdapterForGoogleTest

vs.payloads
vs.payload source=$(VsixOutDir)\Packaging.TAfGT.vsix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<FinalizeManifest>true</FinalizeManifest>
<FinalizeSkipLayout>true</FinalizeSkipLayout>

<!-- Set ValidateManifest to false because the tooling currently doesn't
support finding the dependency for MinShell outside of VS -->
<ValidateManifest>false</ValidateManifest>
<SolutionName>GoogleTestAdapter</SolutionName>
</PropertyGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Common.props))\Common.props" />
<Import Project="$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.props" />

<ItemGroup>
<MergeManifest Include="$(OutputPath)\Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest.json" />
</ItemGroup>

<Import Project="$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets" />
</Project>
5 changes: 5 additions & 0 deletions swix/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MicroBuild.Core" version="0.2.0" targetFramework="net46" developmentDependency="true" />
<package id="Nerdbank.GitVersioning" version="1.4.30" targetFramework="net46" developmentDependency="true" />
</packages>
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Common.props))\Common.props" />
<Import Project="$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.props" />

<PropertyGroup>
<OutputArchitecture>neutral</OutputArchitecture>
<OutputLocalized>false</OutputLocalized>
<OutputName>Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest</OutputName>
<OutputType>manifest</OutputType>
<IsPackage>true</IsPackage>
<VSGeneralVersion>15.0</VSGeneralVersion>
<VSNextGeneralVersion>16.0</VSNextGeneralVersion>
</PropertyGroup>

<PropertyGroup>
<VsixOutDir>$(OutputPath)..\Packaging.TAfGT</VsixOutDir>
</PropertyGroup>

<ItemGroup>
<Package Include="Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest.swr" />
</ItemGroup>

<Target Name="SetVsixProperties" BeforeTargets="Build" DependsOnTargets="GetBuildVersion">
<PropertyGroup>
<!-- Variables added here will be usable in the swr file. This is a semi colon delimited
list of name=value items. Use $(name) in the swr file to reference the variable.
-->
<PackagePreprocessorDefinitions>
$(PackagePreprocessorDefinitions);
VsixOutDir=$(VsixOutDir);
Version=$(BuildVersion);
VSGeneralVersion=$(VSGeneralVersion);
VSNextGeneralVersion=$(VSNextGeneralVersion);
</PackagePreprocessorDefinitions>
</PropertyGroup>
</Target>

<!-- MicroBuild plugin fails if GetNativeManifest is not found for some reason -->
<Target Name="GetNativeManifest" />
<Import Project="$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
use vs

package name=Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest
version=$(Version)
vs.package.type=vsix
vs.package.installSize=22265856
vs.package.vsixId=GoogleTestAdapterVSIX.8486b54e-5768-482b-b224-7d069ca509d8

vs.payloads
vs.payload source=$(VsixOutDir)\Packaging.TAfGT.vsix

vs.dependencies
vs.dependency id=Microsoft.VisualStudio.MinShell
version=[$(VSGeneralVersion),$(VSNextGeneralVersion))
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Common.props))\Common.props" />
<Import Project="$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.props" />

<PropertyGroup>
<FinalizeManifest>true</FinalizeManifest>
<FinalizeSkipLayout>true</FinalizeSkipLayout>

<!-- Set ValidateManifest to false because the tooling currently doesn't
support finding the dependency for MinShell outside of VS -->
<ValidateManifest>false</ValidateManifest>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest.swixproj" />
</ItemGroup>

<ItemGroup>
<MergeManifest Include="$(OutputPath)\Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest.json" />
</ItemGroup>

<Import Project="$(NuGetPackages)MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets" />
</Project>

0 comments on commit 73d4974

Please sign in to comment.