This commit is contained in:
Heath Stewart 2017-01-22 21:58:53 -08:00
Родитель a015411301 3293e28fc8
Коммит 324579ef18
9 изменённых файлов: 148 добавлений и 7 удалений

4
.nuget/packages.config Normal file
Просмотреть файл

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NuProj" version="0.11.14-beta" />
</packages>

Просмотреть файл

@ -7,10 +7,20 @@ This project uses the following software. Newer versions may work but backward c
* [Visual Studio 2015](https://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs.aspx)
### Optional
Some projects require optional software to open or otherwise use in Visual Studio. They are not required to build the solution using MSBuild.
* [NuProj Package Project](https://marketplace.visualstudio.com/items?itemName=NuProjTeam.NuGetPackageProject)
## Coding
These cmdlets use the setup configuration API. [Documentation][docs] is available on MSDN, as well as [samples][samples] of how the APIs can be used.
Code analysis and style cop rules are defined for this solution, but are currently not enforced during build for performance reasons or treated as errors. This may change in the future. Please resolve any build warnings in the code editor or **Error List** window.
If you add any commands please update the `Tags` property of the _VSSetup.nuproj_ project as appropriate. This project is used instead of `Publish-Module` from the _PowerShellGet_ module because it works better with the build systems and can be tested on developer machines without also publishing.
## Building
Before you can build this project from the command line with MSBuild or within Visual Studio, you must restore packages including the [embeddable interop types][interop].

Просмотреть файл

@ -18,6 +18,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
README.md = README.md
EndProjectSection
EndProject
Project("{FF286327-C783-4F7A-AB73-9BCBAD0D4460}") = "VSSetup", "src\VSSetup\VSSetup.nuproj", "{E0172143-FCFD-48B3-988D-E9F01A680C21}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -32,6 +34,10 @@ Global
{ED12C009-A3E6-4F22-999A-FCA8C84DB41A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED12C009-A3E6-4F22-999A-FCA8C84DB41A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ED12C009-A3E6-4F22-999A-FCA8C84DB41A}.Release|Any CPU.Build.0 = Release|Any CPU
{E0172143-FCFD-48B3-988D-E9F01A680C21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E0172143-FCFD-48B3-988D-E9F01A680C21}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E0172143-FCFD-48B3-988D-E9F01A680C21}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E0172143-FCFD-48B3-988D-E9F01A680C21}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -39,5 +45,6 @@ Global
GlobalSection(NestedProjects) = preSolution
{F77937D9-8B7C-46AC-80D3-DFDE39EB3279} = {FEED13D9-C881-407F-A945-7555704789C0}
{ED12C009-A3E6-4F22-999A-FCA8C84DB41A} = {73C57796-F1DD-49D8-9A5D-9F58764C0078}
{E0172143-FCFD-48B3-988D-E9F01A680C21} = {FEED13D9-C881-407F-A945-7555704789C0}
EndGlobalSection
EndGlobal

56
appveyor.yml Normal file
Просмотреть файл

@ -0,0 +1,56 @@
configuration:
- Debug
- Release
environment:
RunCodeAnalysis: true
branches:
only:
- master
- develop
skip_tags: true
notifications:
- provider: GitHubPullRequest
on_build_success: true
on_build_failure: true
cache:
- packages -> **\packages.config
before_build:
- nuget restore
test:
assemblies:
- '**\bin\$(configuration)\*.test.dll'
artifacts:
- path: src\VSSetup.PowerShell\bin\$(configuration)
name: VSSetup
type: zip
- path: src\VSSetup\bin\$(configuration)\*.nupkg
name: package
deploy:
- provider: GitHub
auth_token:
secure: 5K94QY8dHKlbjvlBpQaXwAkmDf+LQE3g5WlU9snnNMjDjf0UT4xDoOBCLWcmwZOm
artifact: VSSetup
on:
branch: master
configuration: Release
- provider: NuGet
server: https://powershellgallery.com
api_key:
secure: 4STrzCp6wDsDBj/wCtmImMVL7wUI8DCGjdMBXGqQf9JZJ8LjmW5YSY8wtcHAv0XW
artifact: package
on:
branch: master
configuration: Release
# vim: set ai et st=2 sts=2 sw=2:

Просмотреть файл

@ -66,5 +66,6 @@
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA1101" Action="None" />
<Rule Id="SA1652" Action="None" />
</Rules>
</RuleSet>

Просмотреть файл

@ -14,7 +14,6 @@
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).xml</DocumentationFile>
<CodeAnalysisRuleSet>..\..\inc\Common.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@ -43,7 +42,7 @@
<Reference Include="System.Core" />
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.PowerShell.3.ReferenceAssemblies.1.0.0\lib\net4\System.Management.Automation.dll</HintPath>
<Private>True</Private>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
@ -89,11 +88,13 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\inc\Transform.targets" />
<Import Project="..\..\packages\Nerdbank.GitVersioning.1.5.62\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.1.5.62\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\Nerdbank.GitVersioning.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.1.5.62\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.1.5.62\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\Nerdbank.GitVersioning.targets'))" />
<Error Condition="!Exists('..\..\packages\NuProj.Common.0.11.14-beta\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\NuProj.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\NuProj.Common.0.11.14-beta\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\NuProj.Common.targets'))" />
</Target>
<Import Project="..\..\packages\Nerdbank.GitVersioning.1.5.62\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.1.5.62\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\Nerdbank.GitVersioning.targets')" />
<Import Project="..\..\packages\NuProj.Common.0.11.14-beta\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\NuProj.Common.targets" Condition="Exists('..\..\packages\NuProj.Common.0.11.14-beta\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\NuProj.Common.targets')" />
</Project>

Просмотреть файл

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.PowerShell.3.ReferenceAssemblies" version="1.0.0" targetFramework="net40-client" />
<package id="Microsoft.VisualStudio.Setup.Configuration.Interop" version="1.3.269-rc" targetFramework="net40-client" />
<package id="Microsoft.VisualStudio.Setup.Configuration.Interop" version="1.3.269-rc" targetFramework="net40-client" developmentDependency="true" />
<package id="Nerdbank.GitVersioning" version="1.5.62" targetFramework="net40-client" developmentDependency="true" />
<package id="NuProj.Common" version="0.11.14-beta" targetFramework="net40-client" developmentDependency="true" />
<package id="StyleCop.Analyzers" version="1.0.0" targetFramework="net40-client" developmentDependency="true" />
</packages>
</packages>

Просмотреть файл

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|AnyCPU">
<Configuration>Debug</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|AnyCPU">
<Configuration>Release</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VSSetup.PowerShell\VSSetup.PowerShell.csproj">
<!-- Override behavior to add files to root directory -->
<PackageDirectory>\</PackageDirectory>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>e0172143-fcfd-48b3-988d-e9f01a680c21</ProjectGuid>
<NuProjPath>..\..\packages\nuproj.0.11.14-beta\tools</NuProjPath>
<VersionDependsOn>$(VersionDependsOn);GetNuPkgVersion</VersionDependsOn>
</PropertyGroup>
<PropertyGroup>
<NuProjPath Condition=" '$(NuProjPath)' == '' ">$(MSBuildExtensionsPath)\NuProj\</NuProjPath>
</PropertyGroup>
<Import Project="$(NuProjPath)\NuProj.props" Condition="Exists('$(NuProjPath)\NuProj.props')" />
<PropertyGroup Label="Configuration">
<Id>VSSetup</Id>
<Title>Visual Studio Setup PowerShell Module</Title>
<Authors>Microsoft Corporation</Authors>
<Owners>Microsoft Corporation</Owners>
<Summary>Visual Studio Setup PowerShell Module</Summary>
<Description>PowerShell module to interact with Visual Studio Setup</Description>
<ReleaseNotes>
</ReleaseNotes>
<ProjectUrl>https://github.com/Microsoft/vssetup.powershell</ProjectUrl>
<LicenseUrl>https://github.com/Microsoft/vssetup.powershell/raw/$GitCommitIdShort$/LICENSE.txt</LicenseUrl>
<Copyright>Copyright (C) Microsoft Corporation. All rights reserved.</Copyright>
<Tags>PSModule PSIncludes_Cmdlet PSCmdlet_Get-VSSetupInstance PSCmdlet_Select-VSSetupInstance PSCommand_Get-VSSetupInstance PSCommand_Select-VSSetupInstance</Tags>
<NoPackageAnalysis>true</NoPackageAnalysis>
</PropertyGroup>
<ItemGroup>
<File Include="..\VSSetup.PowerShell\bin\$(Configuration)\VSSetup.psd1" />
<File Include="..\VSSetup.PowerShell\bin\$(Configuration)\VSSetup.types.ps1xml" />
</ItemGroup>
<Import Project="$(NuProjPath)\NuProj.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.1.5.62\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.1.5.62\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\Nerdbank.GitVersioning.targets'))" />
</Target>
<Import Project="..\..\packages\Nerdbank.GitVersioning.1.5.62\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.1.5.62\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\Nerdbank.GitVersioning.targets')" />
<Target Name="GetNuPkgVersion" DependsOnTargets="GetBuildVersion">
<PropertyGroup>
<!-- PSGallery packages must use dotted quad $(Version) -->
<Version>$(AssemblyFileVersion)</Version>
<NuSpecProperties>$(NuSpecProperties);GitCommitIdShort=$(GitCommitIdShort)</NuSpecProperties>
</PropertyGroup>
</Target>
</Project>

Просмотреть файл

@ -17,7 +17,6 @@
</TargetFrameworkProfile>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).xml</DocumentationFile>
<CodeAnalysisRuleSet>..\..\inc\Common.ruleset</CodeAnalysisRuleSet>
<NoWarn>$(NoWarn);CS1591;SA1600;SA1652</NoWarn>
</PropertyGroup>
@ -108,7 +107,6 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\packages\Nerdbank.GitVersioning.1.5.62\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.1.5.62\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\Nerdbank.GitVersioning.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
@ -116,4 +114,5 @@
<Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.1.5.62\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.1.5.62\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\Nerdbank.GitVersioning.targets'))" />
<Error Condition="!Exists('..\..\packages\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props'))" />
</Target>
<Import Project="..\..\packages\Nerdbank.GitVersioning.1.5.62\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.1.5.62\build\portable-net+win+wpa+wp+sl+netmf+MonoAndroid+MonoTouch+Xamarin.iOS\Nerdbank.GitVersioning.targets')" />
</Project>