Adds build support for Visual Studio 15
This commit is contained in:
Родитель
bcc215f79b
Коммит
36c6b3c9f2
|
@ -66,9 +66,6 @@
|
|||
<BuildRoot Condition="!HasTrailingSlash($(BuildRoot))">$(BuildRoot)\</BuildRoot>
|
||||
<TargetsPath>$(BuildRoot)Build</TargetsPath>
|
||||
|
||||
<PTVSPRPath Condition="'$(PTVSPRPath)' == ''">$(BuildRoot)..\PTVS-pr\</PTVSPRPath>
|
||||
<PTVSSamplesPath Condition="'$(PTVSSamplesPath)' == ''">$(BuildRoot)Python\Samples\</PTVSSamplesPath>
|
||||
|
||||
<!-- BuildOutputRoot contains all build files.
|
||||
|
||||
Rather than customizing OutputPath or IntermediateOutputPath in projects,
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="GetNativeManifest" />
|
||||
<Import Project="$(BuildRoot)\packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets" Condition="Exists('$(BuildRoot)\packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets')" />
|
||||
</Project>
|
|
@ -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>
|
||||
<OutputPathSuffix>setup</OutputPathSuffix>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\Build\Common.Build.settings" />
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputName>$(MSBuildThisFileName).$(VSTarget)</OutputName>
|
||||
<OutputType>vsix</OutputType>
|
||||
<OutputArchitecture>x86</OutputArchitecture>
|
||||
<PackagePreprocessorDefinitions>FileVersion=$(FileVersion);BuildSource=$(BinariesOutputPath);VSTarget=$(VSTarget)</PackagePreprocessorDefinitions>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Package Include="vstesthost.swr" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(TargetsPath)\Common.Build.targets" />
|
||||
</Project>
|
||||
|
|
@ -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">
|
||||
<PropertyGroup>
|
||||
<OutputPathSuffix>setup</OutputPathSuffix>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\Build\Common.Build.settings" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Define properties that drive the manifest creation here. -->
|
||||
<FinalizeManifest>true</FinalizeManifest>
|
||||
<FinalizeSkipLayout>true</FinalizeSkipLayout>
|
||||
|
||||
<BuildNumber>$(FileVersion)</BuildNumber>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="Microsoft.VisualStudioTools.VSTestHost.swixproj">
|
||||
<Properties>VSTarget=$(VSTarget);Configuration=$(Configuration);Platform=$(Platform)</Properties>
|
||||
</ProjectReference>
|
||||
<MergeManifest Include="$(OutputPath)Microsoft.VisualStudioTools*.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(TargetsPath)\Common.Build.targets" />
|
||||
</Project>
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<OutputPathSuffix>setup</OutputPathSuffix>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\Build\Common.Build.settings" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Define properties that drive the manifest creation here. -->
|
||||
<FinalizeManifest>true</FinalizeManifest>
|
||||
<FinalizeSkipLayout>true</FinalizeSkipLayout>
|
||||
|
||||
<BuildNumber>$(FileVersion)</BuildNumber>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<MergeManifest Include="sideload.json" />
|
||||
<MergeManifest Include="$(OutputPath)Microsoft.VisualStudioTools*.json" />
|
||||
|
||||
<Content Include="install.ps1" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="_CopyContent" AfterTargets="Build" Inputs="@(Content)" Outputs="$(OutputPath)\%(Filename)%(Extension)">
|
||||
<Copy SourceFiles="%(Content.FullPath)" DestinationFiles="$(OutputPath)%(Filename)%(Extension)" />
|
||||
</Target>
|
||||
|
||||
<Import Project="$(TargetsPath)\Common.Build.targets" />
|
||||
</Project>
|
|
@ -0,0 +1,31 @@
|
|||
param($vs, $vsdrop, [switch] $uninstall)
|
||||
|
||||
$install_dirs = @(
|
||||
"Common7\IDE\PublicAssemblies\Microsoft.VisualStudioTools.VSTestHost.15.0.dll",
|
||||
"Common7\IDE\CommonExtensions\Platform\Microsoft.VisualStudioTools.VSTestHost.15.0.pkgdef"
|
||||
)
|
||||
|
||||
$to_delete = $install_dirs | ?{ Test-Path "$vs\$_" } | %{ gi "$vs\$_" }
|
||||
if ($to_delete) {
|
||||
"Cleaning old install..."
|
||||
$to_delete | ?{ 'Directory' -in $_.Attributes } | rmdir -Recurse -Force
|
||||
$to_delete | ?{ -not ('Directory' -in $_.Attributes) } | del -Force
|
||||
if ($uninstall) {
|
||||
# Only uninstalling, so run devenv /setup now
|
||||
Start-Process -Wait "$vs\Common7\IDE\devenv.exe" "/setup"
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $uninstall) {
|
||||
$source = $MyInvocation.MyCommand.Definition | Split-Path -Parent
|
||||
|
||||
copy -Recurse -Force $vsdrop\engine ${env:Temp}\engine
|
||||
|
||||
Set-ItemProperty "HKLM:\Software\WOW6432Node\Microsoft\VisualStudio\15.0\EnterpriseTools\QualityTools\HostAdapters\VSTestHost" -Name "EditorType" -Value "Microsoft.VisualStudioTools.VSTestHost.TesterTestControl, Microsoft.VisualStudioTools.VSTestHost.15.0, Version=15.0.4.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"
|
||||
Set-ItemProperty "HKLM:\Software\WOW6432Node\Microsoft\VisualStudio\15.0\EnterpriseTools\QualityTools\HostAdapters\VSTestHost" -Name "Type" -Value "Microsoft.VisualStudioTools.VSTestHost.TesterTestAdapter, Microsoft.VisualStudioTools.VSTestHost.15.0, Version=15.0.4.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"
|
||||
Set-ItemProperty "HKLM:\Software\WOW6432Node\Microsoft\VisualStudio\15.0\EnterpriseTools\QualityTools\HostAdapters\VSTestHost\SupportedTestTypes" -Name "{13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b}" -Value "Unit Test"
|
||||
Set-ItemProperty "HKLM:\Software\WOW6432Node\Microsoft\VisualStudio\15.0\EnterpriseTools\QualityTools\TestTypes\{13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b}\SupportedHostAdapters" -Name "VSTestHost" -Value "VS Test Host Adapter"
|
||||
|
||||
& "${env:Temp}\engine\setup.exe" install --catalog "$source\Microsoft.VisualStudioTools.VSTestHost_Sideload.vsman" --installdir "$vs" --layoutdir "$source"
|
||||
# devenv /setup is run by setup.exe
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="WiX" version="3.9.2.1" targetFramework="net45" />
|
||||
<package id="MicroBuild.Core" version="0.2.0" targetFramework="net45" />
|
||||
</packages>
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"manifestVersion": "1.0",
|
||||
"info": {
|
||||
"id": "Microsoft.VisualStudioTools.VSTestHost_Sideload,version=1.0.0.0"
|
||||
},
|
||||
"packages": [
|
||||
{
|
||||
"installParams": {
|
||||
"fileName": "[InstallDir]\\Common7\\IDE\\devenv.exe",
|
||||
"parameters": "/setup"
|
||||
},
|
||||
"repairParams": {
|
||||
"fileName": "[InstallDir]\\Common7\\IDE\\devenv.exe",
|
||||
"parameters": "/setup"
|
||||
},
|
||||
"uninstallParams": {
|
||||
"fileName": "[InstallDir]\\Common7\\IDE\\devenv.exe",
|
||||
"parameters": "/setup"
|
||||
},
|
||||
"language": "en-us",
|
||||
"dependencies": {
|
||||
"microsoft.VisualStudioTools.VSTestHost": {
|
||||
"version": "[1.0.0.0)"
|
||||
}
|
||||
},
|
||||
"localizedResources": [
|
||||
{
|
||||
"language": "en-us",
|
||||
"title": "VSTestHost",
|
||||
"description": "Run UI tests within VS."
|
||||
}
|
||||
],
|
||||
"id": "Microsoft.VisualStudioTools.VSTestHost_Sideload",
|
||||
"version": "1.0.0.0",
|
||||
"type": "Product"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
use vs
|
||||
package name=Microsoft.VSTestHost version=$(FileVersion)
|
||||
|
||||
folder "InstallDir:\Common7\IDE\PublicAssemblies"
|
||||
file source="$(BuildSource)Microsoft.VisualStudioTools.VSTestHost.$(VSTarget).dll"
|
||||
|
||||
folder "InstallDir:\Common7\IDE\CommonExtensions\Platform"
|
||||
file source="$(BuildSource)Microsoft.VisualStudioTools.VSTestHost.$(VSTarget).pkgdef"
|
|
@ -23,6 +23,7 @@
|
|||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<OutputPathSuffix>binaries</OutputPathSuffix>
|
||||
</PropertyGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.root))\Build\Common.Build.settings" />
|
||||
<Import Project="$(TargetsPath)\Common.Build.CSharp.settings" />
|
||||
|
@ -139,12 +140,12 @@
|
|||
-->
|
||||
<Target Name="CopyToPrivateAssemblies"
|
||||
BeforeTargets="DeployVsixExtensionFiles"
|
||||
Condition="'$(Configuration)' == 'Debug' and '$(VSTarget)' == '$(VisualStudioVersion)'">
|
||||
Condition="'$(Configuration)' == 'Debug' and '$(VSTarget)' == '$(VisualStudioVersion)' and $(DeployExtension)">
|
||||
<Copy SourceFiles="$(TargetPath);$(OutputPath)\$(TargetName).pdb" DestinationFolder="$(DevEnvDir)PrivateAssemblies" />
|
||||
</Target>
|
||||
<Target Name="CleanPrivateAssemblies"
|
||||
BeforeTargets="CleanDeployedVsixExtensionFiles"
|
||||
Condition="'$(Configuration)' == 'Debug' and '$(VSTarget)' == '$(VisualStudioVersion)'">
|
||||
Condition="'$(Configuration)' == 'Debug' and '$(VSTarget)' == '$(VisualStudioVersion)' and $(DeployExtension)">
|
||||
<Delete Files="$(DevEnvDir)PrivateAssemblies\$(TargetName).dll;$(DevEnvDir)PrivateAssemblies\$(TargetName).pdb" />
|
||||
</Target>
|
||||
</Project>
|
Загрузка…
Ссылка в новой задаче