Skip to content

Commit

Permalink
Merge 123c0c2 into a8c90e3
Browse files Browse the repository at this point in the history
  • Loading branch information
heaths authored Mar 3, 2017
2 parents a8c90e3 + 123c0c2 commit 8d12176
Show file tree
Hide file tree
Showing 10 changed files with 170 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .nuget/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NuProj" version="0.11.14-beta" />
</packages>
75 changes: 75 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
Contributing
============

## Prerequisites

This project uses the following software. Newer versions may work but backward compatibility must be maintained.

* [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

This project uses a Git flow model releasing from the `master` branch with development based on and stabilize in the `develop` branch. You can view current build status in the [README](README.md) document.

Please follow project code styles including,

* All requires headers are in the precompiled headers, _stdafx.h_.
* Copyright header including proper file name at top of all non-generated source.
* Tabs are 4 spaces.

In general, any new code should be stylistically indistinguishable from existing code.

## Building

Before you can build this project from the command line with MSBuild or within Visual Studio, you must restore packages.

* In Visual Studio, make sure Package Restore is enabled.
* On the command line and assuming _nuget.exe_ is in your `PATH`, in the solution directory run: `nuget restore`

Note again that to build the full solution in Visual Studio some optional software may be required.

## Testing

All available tests are discovered after a complete build in Test Explorer within Visual Studio.

On the command line, you can run the following commands from the solution directory. Replace `<version>` with whatever version was downloaded.

```batch
nuget install xunit.runner.console -outputdirectory packages
packages\xunit.runner.console.<version>\tools\xunit.runner.console bin\Debug\vswhere.test.dll
```

It's also recommended that, if your machine supports it, you install [Docker for Windows](https://www.docker.com/products/overview), switch to Windows containers, and test in isolated containers for runtime behavior.

```batch
REM You only need to build once unless updating the Dockerfile or files it copies.
docker\build
REM This will automatically map build output. Defaults to Debug configuration. Pass -? for options.
docker\test
```

For a faster development process, you can run `docker\run -detach`, copy the container ID printed to the window, then subsequently run `docker\test -on <container id>` replacing `<container id>` with the container ID you copied previously. You can make changes to the test data and even rebuild the project and run this command again as frequently as you need. This is especially handy for quick turn around when debugging and fixing a problem.

To stop the container, run `docker stop <container id>`. If you did not pass `-keep` when you started the container it will be removed automatically.

### Debugging

You can also run `docker\run.cmd` to start an interactive shell for exploratory testing. If no other commands are passed when starting the container, the Visual Studio Remote Debugger will launch by default. Remote debugging services are discoverable on your private network.

You can configure your project to start a remote command on a machine name that matches the short container ID returned if you ran `docker\run -detach`, or that you can discover by running `docker ps` in a separate console.

## Pull Requests

We welcome pull requests for both bug fixes and new features that solve a common enough problem to benefit the community. Please note the following requirements.

1. Code changes for bug fixes and new features are accompanied by new tests or, only if required, modifications to existing tests. Modifying existing tests when not required may introduce regressions.
2. All tests must pass. We have automated PR builds that will verify any PRs before they can be merged, but you are encouraged to run all tests in your development environment prior to pushing to your remote.

Thank you for your contributions!
4 changes: 4 additions & 0 deletions pkg/vswhere/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Nerdbank.GitVersioning" version="1.5.97" targetFramework="native" developmentDependency="true" />
</packages>
5 changes: 5 additions & 0 deletions pkg/vswhere/tools/VERIFICATION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
VERIFICATION
Verification is intended to assist the Chocolatey moderators and community
in verifying that this package's contents are trustworthy.

tools\vswhere.exe is produced by us from the same repository as this package: https://github.com/Microsoft/vswhere
67 changes: 67 additions & 0 deletions pkg/vswhere/vswhere.nuproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?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="..\..\src\vswhere\vswhere.vcxproj">
<PackageDirectory>Tools</PackageDirectory>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\LICENSE.txt">
<Link>tools\LICENSE.txt</Link>
</Content>
<None Include="packages.config" />
<Content Include="build\vswhere.props" />
<Content Include="tools\VERIFICATION.txt" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>87c09ce6-ba2d-4fc3-92e4-44253e87cb69</ProjectGuid>
<OutputPath>$(SolutionDir)bin\$(Configuration)\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<NuProjPath Condition="Exists('$(SolutionDir)packages\NuProj.0.11.14-beta\tools\')">$(SolutionDir)packages\NuProj.0.11.14-beta\tools\</NuProjPath>
<NuProjPath Condition=" '$(NuProjPath)' == '' ">$(MSBuildExtensionsPath)\NuProj\</NuProjPath>
<VersionDependsOn>$(VersionDependsOn);GetPackageVersion</VersionDependsOn>
</PropertyGroup>
<Import Project="$(NuProjPath)\NuProj.props" Condition="Exists('$(NuProjPath)\NuProj.props')" />
<PropertyGroup Label="Configuration">
<Id>vswhere</Id>
<Version>1.0.0</Version>
<Title>Visual Studio Locator</Title>
<Authors>Microsoft Corporation</Authors>
<Owners>Microsoft Corporation</Owners>
<Summary>Locate Visual Studio 2017 and newer installations </Summary>
<Description>Locate Visual Studio 2017 and newer installations </Description>
<ReleaseNotes>
</ReleaseNotes>
<ProjectUrl>https://github.com/Microsoft/vswhere</ProjectUrl>
<LicenseUrl>https://github.com/Microsoft/vswhere/raw/develop/LICENSE.txt</LicenseUrl>
<Copyright>Copyright (C) Microsoft Corporation. All rights reserved.</Copyright>
<Tags>vs vs2017 visualstudio</Tags>
<GenerateSymbolPackage>false</GenerateSymbolPackage>
</PropertyGroup>
<Target Name="GetPackageVersion" DependsOnTargets="GetBuildVersion">
<PropertyGroup>
<Version>$(BuildVersionSimple)</Version>
</PropertyGroup>
</Target>
<Import Project="$(NuProjPath)\NuProj.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\packages\Nerdbank.GitVersioning.1.5.97\build\NerdBank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.1.5.97\build\NerdBank.GitVersioning.targets')" />
</ImportGroup>
<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.97\build\NerdBank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.1.5.97\build\NerdBank.GitVersioning.targets'))" />
</Target>
</Project>
1 change: 1 addition & 0 deletions src/vswhere.lib/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<packages>
<package id="MicroBuild.Core" version="0.2.0" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.VisualStudio.Setup.Configuration.Native" version="1.7.13-rc" targetFramework="native" developmentDependency="true" />
<package id="NuProj.Common" version="0.11.14-beta" targetFramework="native" developmentDependency="true" />
</packages>
2 changes: 2 additions & 0 deletions src/vswhere.lib/vswhere.lib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.7.13-rc\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets" Condition="Exists('..\..\packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.7.13-rc\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets')" />
<Import Project="..\..\packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets" Condition="Exists('..\..\packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets')" />
<Import Project="..\..\packages\NuProj.Common.0.11.14-beta\build\NuProj.Common.targets" Condition="Exists('..\..\packages\NuProj.Common.0.11.14-beta\build\NuProj.Common.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
Expand All @@ -214,5 +215,6 @@
<Error Condition="!Exists('..\..\packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.7.13-rc\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.7.13-rc\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets'))" />
<Error Condition="!Exists('..\..\packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.props'))" />
<Error Condition="!Exists('..\..\packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets'))" />
<Error Condition="!Exists('..\..\packages\NuProj.Common.0.11.14-beta\build\NuProj.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\NuProj.Common.0.11.14-beta\build\NuProj.Common.targets'))" />
</Target>
</Project>
1 change: 1 addition & 0 deletions src/vswhere/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
<package id="MicroBuild.Core" version="0.2.0" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.VisualStudio.Setup.Configuration.Native" version="1.7.13-rc" targetFramework="native" developmentDependency="true" />
<package id="Nerdbank.GitVersioning" version="1.5.97" targetFramework="native" developmentDependency="true" />
<package id="NuProj.Common" version="0.11.14-beta" targetFramework="native" developmentDependency="true" />
</packages>
2 changes: 2 additions & 0 deletions src/vswhere/vswhere.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
<Import Project="..\..\packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.7.13-rc\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets" Condition="Exists('..\..\packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.7.13-rc\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets')" />
<Import Project="..\..\packages\Nerdbank.GitVersioning.1.5.97\build\NerdBank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.1.5.97\build\NerdBank.GitVersioning.targets')" />
<Import Project="..\..\packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets" Condition="Exists('..\..\packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets')" />
<Import Project="..\..\packages\NuProj.Common.0.11.14-beta\build\NuProj.Common.targets" Condition="Exists('..\..\packages\NuProj.Common.0.11.14-beta\build\NuProj.Common.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
Expand All @@ -129,5 +130,6 @@
<Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.1.5.97\build\NerdBank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.1.5.97\build\NerdBank.GitVersioning.targets'))" />
<Error Condition="!Exists('..\..\packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.props'))" />
<Error Condition="!Exists('..\..\packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets'))" />
<Error Condition="!Exists('..\..\packages\NuProj.Common.0.11.14-beta\build\NuProj.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\NuProj.Common.0.11.14-beta\build\NuProj.Common.targets'))" />
</Target>
</Project>
9 changes: 9 additions & 0 deletions vswhere.sln
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
README.md = README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pkg", "pkg", "{A2C0B2B6-0E25-4A8D-96F6-9F44C615AE00}"
EndProject
Project("{FF286327-C783-4F7A-AB73-9BCBAD0D4460}") = "vswhere", "pkg\vswhere\vswhere.nuproj", "{87C09CE6-BA2D-4FC3-92E4-44253E87CB69}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Expand All @@ -37,6 +41,10 @@ Global
{4CCF39CB-4794-44E2-AA57-D215F13CF606}.Debug|x86.Build.0 = Debug|Win32
{4CCF39CB-4794-44E2-AA57-D215F13CF606}.Release|x86.ActiveCfg = Release|Win32
{4CCF39CB-4794-44E2-AA57-D215F13CF606}.Release|x86.Build.0 = Release|Win32
{87C09CE6-BA2D-4FC3-92E4-44253E87CB69}.Debug|x86.ActiveCfg = Debug|Any CPU
{87C09CE6-BA2D-4FC3-92E4-44253E87CB69}.Debug|x86.Build.0 = Debug|Any CPU
{87C09CE6-BA2D-4FC3-92E4-44253E87CB69}.Release|x86.ActiveCfg = Release|Any CPU
{87C09CE6-BA2D-4FC3-92E4-44253E87CB69}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -45,5 +53,6 @@ Global
{210864F0-9A29-4479-B830-B802EE3F4D92} = {20C5861F-C1E5-4BFB-B082-209793FBDCA5}
{76268871-D5A5-46BD-9805-41DB1C3072D1} = {2F0C5F28-FD43-4045-85E8-BBD98B6B66B5}
{4CCF39CB-4794-44E2-AA57-D215F13CF606} = {20C5861F-C1E5-4BFB-B082-209793FBDCA5}
{87C09CE6-BA2D-4FC3-92E4-44253E87CB69} = {A2C0B2B6-0E25-4A8D-96F6-9F44C615AE00}
EndGlobalSection
EndGlobal

0 comments on commit 8d12176

Please # to comment.