Commits

Matt Oswald committed 4b470c9

rewrote the vsix project as a simple target within the packager, to not rely on the VS2012 SDK (among other things)

Comments (0)

Files changed (10)

LICENSE

-Copyright (c) 2012 xUnit++ Team (Matt Oswald)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+Copyright (c) 2012 Matt Oswald
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Zip"
+<Project DefaultTargets="All"
          xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 
 <UsingTask
     TaskName="MSBuild.ExtensionPack.Compression.Zip"/>
 
 <Target Name="Rebuild">
-    <CallTarget Targets="Clean;Zip" />
+    <CallTarget Targets="Clean;All" />
 </Target>
 
 <Target Name="Clean">
         <IncludeFiles Include="xUnit++\xUnit++\*.h" />
         <BinFiles Include="bin\xUnit++\*.lib" />
         <RunnerFiles Include="bin\xUnit++.console\*.exe" />
-        <OtherFiles Include="LICENSE" />
+        <TestAdapterFiles Include="bin\xUnit++.VsRunner\xUnit++.VsRunner.x86.dll;xUnit++.VsRunner\[Content_Types].xml;xUnit++.VsRunner\extension.vsixmanifest;License.txt" />
     </ItemGroup>
 
     <Copy SourceFiles="@(IncludeFiles)"
-          DestinationFolder="package\xUnit++\include\xUnit++" />
+          DestinationFolder="package\xUnit++\include\xUnit++\" />
     <Copy SourceFiles="@(BinFiles)"
           DestinationFolder="package\xUnit++\lib\" />
     <Copy SourceFiles="@(RunnerFiles)"
           DestinationFolder="package\xUnit++\bin\" />
-    <Copy SourceFiles="@(OtherFiles)"
-          DestinationFolder="package" />
+    <Copy SourceFiles="@(TestAdapterFiles)"
+          DestinationFolder="package\TestAdapter\" />
+    <Copy SourceFiles="License.txt"
+          DestinationFolder="package\" />
 </Target>
 
 <Target Name="Zip" DependsOnTargets="Package">
     <ItemGroup>
-        <FilesToCompress Include="package\**\*" />
+        <FilesToCompress Include="package\xUnit++\**\*;package\License.txt" />
     </ItemGroup>
 
     <Zip TaskAction="Create"
          ZipFileName="package\xUnit++.vc.zip" />
 </Target>
 
+<Target Name="Vsix" DependsOnTargets="Package">
+    <ItemGroup>
+        <VsixItems Include="package\TestAdapter\**\*" />
+    </ItemGroup>
+    <Zip TaskAction="Create"
+         CompressFiles="@(VsixItems)"
+         RemoveRoot="$(MSBuildThisFileDirectory)package\TestAdapter"
+         ZipFileName="package\xunit++.testadapter.vsix" />
+</Target>
+
+<Target Name="All" DependsOnTargets="Zip;Vsix">
+    <RemoveDir Directories="package/TestAdapter;package/xUnit++" />
+    <Delete Files="package/License.txt" />
+</Target>
+
 </Project>
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="BuildVsix" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+    <UsingTask
+        AssemblyFile=".build\MSBuild.ExtensionPack.dll"
+        TaskName="MSBuild.ExtensionPack.Compression.Zip"/>
+
+    <PropertyGroup>
+        <RunnerBin>bin\xUnit++.VsRunner\xUnit++.VsRunner.x86.dll</RunnerBin>
+        <RunnerSource>xUnit++.VsRunner\</RunnerSource>
+        <LicenseSource>LICENSE</LicenseSource>
+    </PropertyGroup>
+
+    <Target Name="BuildVsix">
+        <ItemGroup>
+            <ZipItems
+                Include="$(RunnerBin);$(RunnerSource)[Content_Types].xml;$(RunnerSource)*.ico;$(LicenseSource)" />
+        </ItemGroup>
+
+        <Delete Files="$(OutputPath)xunit.runner.visualstudio.vsix" />
+        <Delete Files="$(OutputPath)xunit.runner.visualstudio.vsix.zip" />
+
+        <Zip ZipFileName="$(OutputPath)xunit.runner.visualstudio.vsix.zip" Files="@(ZipItems)" StripPath="true" />
+        <Copy SourceFiles="$(OutputPath)xunit.runner.visualstudio.vsix.zip" DestinationFiles="$(OutputPath)xunit.runner.visualstudio.vsix" />
+        <Delete Files="$(OutputPath)xunit.runner.visualstudio.vsix.zip" />
+    </Target>
+</Project>

xUnit++.VsExtension/Properties/AssemblyInfo.cs

-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("xUnit.VsExtension")]
-[assembly: AssemblyDescription("xUnit++ Test Adapter for Visual Studio")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("xUnit++")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible 
-// to COM components.  If you need to access a type in this assembly from 
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers 
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]

xUnit++.VsExtension/source.extension.vsixmanifest

-<?xml version="1.0" encoding="utf-8"?>
-<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
-    <Metadata>
-        <Identity Id="xUnit++.e4924ae0-47b7-4887-89c0-b32d45f85bbe" Version="1.0.0" Language="en-US" Publisher="Matt Oswald" />
-        <DisplayName>xUnit++</DisplayName>
-        <Description xml:space="preserve">xUnit++ Test Adapter for Visual Studio.</Description>
-        <MoreInfo>https://bitbucket.org/moswald/xunit/wiki</MoreInfo>
-        <License>..\LICENSE</License>
-        <GettingStartedGuide>https://bitbucket.org/moswald/xunit/wiki</GettingStartedGuide>
-        <Tags>C++, Unit Testing, TDD, xUnit</Tags>
-    </Metadata>
-    <Installation AllUsers="true">
-        <InstallationTarget Version="[11.0,12.0)" Id="Microsoft.VisualStudio.Ultimate" />
-        <InstallationTarget Version="[11.0,12.0)" Id="Microsoft.VisualStudio.Premium" />
-        <InstallationTarget Version="[11.0,12.0)" Id="Microsoft.VisualStudio.Pro" />
-    </Installation>
-    <Dependencies>
-        <Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="4.5" />
-    </Dependencies>
-    <Assets>
-        <Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" d:VsixSubPath="xUnit++" />
-        <Asset Type="UnitTestExtension" d:Source="Project" d:ProjectName="xUnit++.VsRunner" Path="|xUnit++.VsRunner|" d:VsixSubPath="xUnit++" />
-    </Assets>
-</PackageManifest>

xUnit++.VsExtension/xUnit++.VsExtension.csproj

-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
-    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
-    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
-    <DebugSymbols>true</DebugSymbols>
-    <OutputPath>..\bin\xUnit++.VsExtension\Debug\x86\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x86</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
-    <OutputPath>..\bin\xUnit++.VsExtension\Release\x86\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x86</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <PropertyGroup>
-    <SignAssembly>false</SignAssembly>
-  </PropertyGroup>
-  <PropertyGroup>
-    <AssemblyOriginatorKeyFile>..\xUnit++.snk</AssemblyOriginatorKeyFile>
-  </PropertyGroup>
-  <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>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
-    <ProjectGuid>{86D7EE76-854B-43D5-90F5-932853A412F0}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>xUnit.VsExtension</RootNamespace>
-    <AssemblyName>xUnit++.VsExtension</AssemblyName>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-    <GeneratePkgDefFile>false</GeneratePkgDefFile>
-    <IncludeAssemblyInVSIXContainer>false</IncludeAssemblyInVSIXContainer>
-    <IncludeDebugSymbolsInVSIXContainer>false</IncludeDebugSymbolsInVSIXContainer>
-    <IncludeDebugSymbolsInLocalVSIXDeployment>false</IncludeDebugSymbolsInLocalVSIXDeployment>
-    <CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
-    <CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="Properties\AssemblyInfo.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="..\LICENSE">
-      <Link>LICENSE</Link>
-    </None>
-    <None Include="source.extension.vsixmanifest">
-      <SubType>Designer</SubType>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\xUnit++.VsRunner\xUnit++.VsRunner.vcxproj">
-      <Project>{7048C76A-27E7-4385-BCF1-BB9E718E99F8}</Project>
-      <Name>xUnit++.VsRunner</Name>
-      <IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup%3bBuiltProjectOutputGroupDependencies%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b</IncludeOutputGroupsInVSIX>
-      <VSIXSubPath>xUnit++</VSIXSubPath>
-    </ProjectReference>
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
-  <!-- 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>

xUnit++.VsRunner/[Content_Types].xml

+<?xml version="1.0" encoding="utf-8"?>
+<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
+    <Default Extension="dll" ContentType="application/octet-stream" />
+    <Default Extension="vsixmanifest" ContentType="text/xml" />
+    <Default Extension="txt" ContentType="text/plain" />
+    <Default Extension="ico" ContentType="application/octet-stream" />
+</Types>

xUnit++.VsRunner/extension.vsixmanifest

+<?xml version="1.0" encoding="utf-8"?>
+<Vsix xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="1.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2010">
+    <Identifier Id="xUnit++.e4924ae0-47b7-4887-89c0-b32d45f85bbe">
+        <Name>xUnit++ Test Adapter for Visual Studio.</Name>
+        <Author>xUnit++</Author>
+        <Version>1.0.0</Version>
+        <Description xml:space="preserve">xUnit++ is a modern unit testing framework for C++.</Description>
+        <Locale>1033</Locale>
+        <MoreInfoUrl>https://bitbucket.org/moswald/xunit/wiki</MoreInfoUrl>
+        <License>License.txt</License>
+        <Icon></Icon>
+        <SupportedProducts>
+            <VisualStudio Version="11.0">
+                <Edition>Ultimate</Edition>
+                <Edition>Premium</Edition>
+                <Edition>Pro</Edition>
+            </VisualStudio>
+        </SupportedProducts>
+        <SupportedFrameworkRuntimeEdition MinVersion="2.0" MaxVersion="4.5" />
+    </Identifier>
+    <References />
+    <Content>
+        <CustomExtension Type="UnitTestExtension">xUnit++.VsRunner.x86.dll</CustomExtension>
+    </Content>
+</Vsix>
 		{2F1709B8-9F5A-4625-9404-C348298181B7} = {2F1709B8-9F5A-4625-9404-C348298181B7}
 	EndProjectSection
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xUnit++.VsExtension", "xUnit++.VsExtension\xUnit++.VsExtension.csproj", "{86D7EE76-854B-43D5-90F5-932853A412F0}"
-EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
 		{EDEB02E2-F389-4CBF-AE7D-3041A934F86B}.Release|Win32.Build.0 = Release|Win32
 		{EDEB02E2-F389-4CBF-AE7D-3041A934F86B}.Release|x64.ActiveCfg = Release|x64
 		{EDEB02E2-F389-4CBF-AE7D-3041A934F86B}.Release|x64.Build.0 = Release|x64
-		{86D7EE76-854B-43D5-90F5-932853A412F0}.Debug|Win32.ActiveCfg = Debug|x86
-		{86D7EE76-854B-43D5-90F5-932853A412F0}.Debug|Win32.Build.0 = Debug|x86
-		{86D7EE76-854B-43D5-90F5-932853A412F0}.Debug|x64.ActiveCfg = Debug|x86
-		{86D7EE76-854B-43D5-90F5-932853A412F0}.Release|Win32.ActiveCfg = Release|x86
-		{86D7EE76-854B-43D5-90F5-932853A412F0}.Release|Win32.Build.0 = Release|x86
-		{86D7EE76-854B-43D5-90F5-932853A412F0}.Release|x64.ActiveCfg = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE