Skip to content

Commit

Permalink
Onboarding samples to https://docs.microsoft.com/samples/
Browse files Browse the repository at this point in the history
Upgrade samples to Visual Studio 2019.
  • Loading branch information
oldnewthing committed Dec 19, 2019
1 parent b9b44e3 commit 9bf6501
Show file tree
Hide file tree
Showing 925 changed files with 13,518 additions and 9,953 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ This repo contains the samples that demonstrate the API usage patterns for the U
## Universal Windows Platform development

These samples require Visual Studio 2017 Update 4 or higher and the Windows Software Development Kit (SDK) version 17134 for Windows 10.
These samples require Visual Studio and the Windows Software Development Kit (SDK) for Windows 10.

[Get a free copy of Visual Studio 2017 Community Edition with support for building Universal Windows Platform apps](http://go.microsoft.com/fwlink/p/?LinkID=280676)
[Get a free copy of Visual Studio Community Edition with support for building Universal Windows Platform apps](http://go.microsoft.com/fwlink/p/?LinkID=280676)

Additionally, to stay on top of the latest updates to Windows and the development tools, become a Windows Insider by joining the Windows Insider Program.

[Become a Windows Insider](https://insider.windows.com/)

## Using the samples

The easiest way to use these samples without using Git is to download the zip file containing the current version (using the following link or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in Visual Studio 2017.
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the following link or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in Visual Studio.

[Download the samples ZIP](../../archive/master.zip)

**Notes:**
* Before you unzip the archive, right-click it, select **Properties**, and then select **Unblock**.
* Be sure to unzip the entire archive, and not just individual samples. The samples all depend on the SharedContent folder in the archive.
* In Visual Studio 2017, the platform target defaults to ARM, so be sure to change that to x64 or x86 if you want to test on a non-ARM device.
* In Visual Studio, the platform target defaults to ARM, so be sure to change that to x64 or x86 if you want to test on a non-ARM device.

The samples use Linked files in Visual Studio to reduce duplication of common files, including sample template files and image assets. These common files are stored in the SharedContent folder at the root of the repository, and are referred to in the project files using links.

Expand Down
17 changes: 13 additions & 4 deletions Samples/360VideoPlayback/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
---
topic: sample
page_type: sample
languages:
- csharp
- cpp
- cppcx
products:
- windows
- windows-uwp
urlFragment: 360VideoPlayback
extendedZipContent:
- path: SharedContent
target: SharedContent
- path: LICENSE
target: LICENSE
description: "Shows how to play 360-degree video."
---

<!---
Expand All @@ -25,7 +32,9 @@ For Mixed Reality, this sample shows how to use
the MediaPlayer to obtain individual video frames, and render them to a head-mounted display.

> **Note:** This sample is part of a large collection of UWP feature samples.
> If you are unfamiliar with Git and GitHub, you can download the entire collection as a
> You can download this sample as a standalone ZIP file
> [from docs.microsoft.com](https://docs.microsoft.com/samples/microsoft/windows-universal-samples/360videoplayback/),
> or you can download the entire collection as a single
> [ZIP file](https://github.com/Microsoft/Windows-universal-samples/archive/master.zip), but be
> sure to unzip everything to access shared dependencies. For more info on working with the ZIP file,
> the samples collection, and GitHub, see [Get the UWP samples from GitHub](https://aka.ms/ovu2uq).
Expand All @@ -41,7 +50,7 @@ Specifically, this samples covers:

## Additional remarks

**Note** The Windows universal samples for Windows 10 Holographic require Visual Studio 2017 Update 2
**Note** The Windows universal samples for Windows 10 Holographic require Visual Studio
to build, and a Windows Holographic device to execute. Windows Holographic devices include the
Microsoft HoloLens and the Microsoft HoloLens Emulator.

Expand All @@ -68,7 +77,7 @@ Visual Studio and the Microsoft HoloLens Emulator, go to

1. If you download the samples ZIP, be sure to unzip the entire archive, not just the folder with
the sample you want to build.
2. Start Microsoft Visual Studio 2017 and select **File** \> **Open** \> **Project/Solution**.
2. Start Microsoft Visual Studio and select **File** \> **Open** \> **Project/Solution**.
3. Starting in the folder where you unzipped the samples, go to the Samples subfolder, then the
subfolder for this specific sample, then the subfolder for your preferred language (C++, C#, or
JavaScript). Double-click the Visual Studio Solution (.sln) file.
Expand Down
13 changes: 8 additions & 5 deletions Samples/360VideoPlayback/cpp/360VideoPlayback.vcxproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SharedContentDir>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), LICENSE))\SharedContent</SharedContentDir>
</PropertyGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{3645d95d-4504-556a-bc4f-e8f1da5ddad1}</ProjectGuid>
<Keyword>HolographicApp</Keyword>
Expand Down Expand Up @@ -74,7 +77,7 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>$(VC_IncludePath);$(UniversalCRT_IncludePath);$(WindowsSDK_IncludePath);..\..\..\SharedContent\cpp</IncludePath>
<IncludePath>$(VC_IncludePath);$(UniversalCRT_IncludePath);$(WindowsSDK_IncludePath);$(SharedContentDir)\cpp</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Link>
Expand Down Expand Up @@ -133,16 +136,16 @@
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<Image Include="..\..\..\SharedContent\media\splash-sdk.png">
<Image Include="$(SharedContentDir)\media\splash-sdk.png">
<Link>Assets\splash-sdk.png</Link>
</Image>
<Image Include="..\..\..\SharedContent\media\squaretile-sdk.png">
<Image Include="$(SharedContentDir)\media\squaretile-sdk.png">
<Link>Assets\squareTile-sdk.png</Link>
</Image>
<Image Include="..\..\..\SharedContent\media\smalltile-sdk.png">
<Image Include="$(SharedContentDir)\media\smalltile-sdk.png">
<Link>Assets\smallTile-sdk.png</Link>
</Image>
<Image Include="..\..\..\SharedContent\media\storelogo-sdk.png">
<Image Include="$(SharedContentDir)\media\storelogo-sdk.png">
<Link>Assets\StoreLogo-sdk.png</Link>
</Image>
</ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions Samples/360VideoPlayback/cpp/360VideoPlayback.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,16 @@
<AppxManifest Include="Package.appxmanifest" />
</ItemGroup>
<ItemGroup>
<Image Include="..\..\..\SharedContent\media\splash-sdk.png">
<Image Include="$(SharedContentDir)\media\splash-sdk.png">
<Filter>Assets</Filter>
</Image>
<Image Include="..\..\..\SharedContent\media\squaretile-sdk.png">
<Image Include="$(SharedContentDir)\media\squaretile-sdk.png">
<Filter>Assets</Filter>
</Image>
<Image Include="..\..\..\SharedContent\media\smalltile-sdk.png">
<Image Include="$(SharedContentDir)\media\smalltile-sdk.png">
<Filter>Assets</Filter>
</Image>
<Image Include="..\..\..\SharedContent\media\storelogo-sdk.png">
<Image Include="$(SharedContentDir)\media\storelogo-sdk.png">
<Filter>Assets</Filter>
</Image>
</ItemGroup>
Expand Down
23 changes: 13 additions & 10 deletions Samples/360VideoPlayback/cs/360VideoPlayback.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<SharedContentDir>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), LICENSE))\SharedContent</SharedContentDir>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
Expand Down Expand Up @@ -74,7 +77,7 @@
<Compile Include="Content\ShaderStructures.cs" />
<Compile Include="Content\SpatialInputHandler.cs" />
<Compile Include="Content\VideoRenderer.cs" />
<Compile Include="..\..\..\SharedContent\cs\AssemblyInfo.cs">
<Compile Include="$(SharedContentDir)\cs\AssemblyInfo.cs">
<Link>Properties\AssemblyInfo.cs</Link>
</Compile>
<Compile Include="MainPage.xaml.cs">
Expand All @@ -94,31 +97,31 @@
</AppxManifest>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\..\SharedContent\cs\Default.rd.xml">
<Content Include="$(SharedContentDir)\cs\Default.rd.xml">
<Link>Properties\Default.rd.xml</Link>
</Content>
<Content Include="..\..\..\SharedContent\media\windows-sdk.png">
<Content Include="$(SharedContentDir)\media\windows-sdk.png">
<Link>Assets\windows-sdk.png</Link>
</Content>
<Content Include="..\..\..\SharedContent\cs\Default.rd.xml">
<Content Include="$(SharedContentDir)\cs\Default.rd.xml">
<Link>Properties\Default.rd.xml</Link>
</Content>
<Content Include="..\..\..\SharedContent\media\microsoft-sdk.png">
<Content Include="$(SharedContentDir)\media\microsoft-sdk.png">
<Link>Assets\microsoft-sdk.png</Link>
</Content>
<Content Include="..\..\..\SharedContent\media\smalltile-sdk.png">
<Content Include="$(SharedContentDir)\media\smalltile-sdk.png">
<Link>Assets\smallTile-sdk.png</Link>
</Content>
<Content Include="..\..\..\SharedContent\media\splash-sdk.png">
<Content Include="$(SharedContentDir)\media\splash-sdk.png">
<Link>Assets\splash-sdk.png</Link>
</Content>
<Content Include="..\..\..\SharedContent\media\squaretile-sdk.png">
<Content Include="$(SharedContentDir)\media\squaretile-sdk.png">
<Link>Assets\squareTile-sdk.png</Link>
</Content>
<Content Include="..\..\..\SharedContent\media\storelogo-sdk.png">
<Content Include="$(SharedContentDir)\media\storelogo-sdk.png">
<Link>Assets\storeLogo-sdk.png</Link>
</Content>
<Content Include="..\..\..\SharedContent\media\tile-sdk.png">
<Content Include="$(SharedContentDir)\media\tile-sdk.png">
<Link>Assets\tile-sdk.png</Link>
</Content>
<Content Include="Assets\360Logo.png" />
Expand Down
15 changes: 12 additions & 3 deletions Samples/3DPrinting/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
---
topic: sample
page_type: sample
languages:
- csharp
products:
- windows
- windows-uwp
urlFragment: 3DPrinting
extendedZipContent:
- path: SharedContent
target: SharedContent
- path: LICENSE
target: LICENSE
description: "Shows several tasks for 3D printing and editing the 3MF file type."
---

<!---
Expand All @@ -17,7 +24,9 @@ products:
Shows several tasks for 3D printing and editing the 3MF file type.

> **Note:** This sample is part of a large collection of UWP feature samples.
> If you are unfamiliar with Git and GitHub, you can download the entire collection as a
> You can download this sample as a standalone ZIP file
> [from docs.microsoft.com](https://docs.microsoft.com/samples/microsoft/windows-universal-samples/3dprinting/),
> or you can download the entire collection as a single
> [ZIP file](https://github.com/Microsoft/Windows-universal-samples/archive/master.zip), but be
> sure to unzip everything to access shared dependencies. For more info on working with the ZIP file,
> the samples collection, and GitHub, see [Get the UWP samples from GitHub](https://aka.ms/ovu2uq).
Expand All @@ -44,7 +53,7 @@ Build the sample
----------------

1. If you download the samples ZIP, be sure to unzip the entire archive, not just the folder with the sample you want to build.
2. Start Microsoft Visual Studio 2017 and select **File** \> **Open** \> **Project/Solution**.
2. Start Microsoft Visual Studio and select **File** \> **Open** \> **Project/Solution**.
3. Starting in the folder where you unzipped the samples, go to the Samples subfolder, then the subfolder for this specific sample, then the subfolder for your preferred language (C++, C#, or JavaScript). Double-click the Visual Studio Solution (.sln) file.
4. Press Ctrl+Shift+B, or select **Build** \> **Build Solution**.

Expand Down
31 changes: 17 additions & 14 deletions Samples/3DPrinting/cs/3DPrinting.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<SharedContentDir>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), LICENSE))\SharedContent</SharedContentDir>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
Expand Down Expand Up @@ -87,15 +90,15 @@
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\..\SharedContent\cs\App.xaml.cs">
<Compile Include="$(SharedContentDir)\cs\App.xaml.cs">
<Link>App.xaml.cs</Link>
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="..\..\..\SharedContent\cs\MainPage.xaml.cs">
<Compile Include="$(SharedContentDir)\cs\MainPage.xaml.cs">
<Link>MainPage.xaml.cs</Link>
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="..\..\..\SharedContent\cs\AssemblyInfo.cs">
<Compile Include="$(SharedContentDir)\cs\AssemblyInfo.cs">
<Link>Properties\AssemblyInfo.cs</Link>
</Compile>
<Compile Include="SampleConfiguration.cs" />
Expand All @@ -112,12 +115,12 @@
</AppxManifest>
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="..\..\..\SharedContent\xaml\App.xaml">
<ApplicationDefinition Include="$(SharedContentDir)\xaml\App.xaml">
<Link>App.xaml</Link>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="..\..\..\SharedContent\cs\MainPage.xaml">
<Page Include="$(SharedContentDir)\cs\MainPage.xaml">
<Link>MainPage.xaml</Link>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand All @@ -130,35 +133,35 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="..\..\..\SharedContent\xaml\Styles.xaml">
<Page Include="$(SharedContentDir)\xaml\Styles.xaml">
<Link>Styles\Styles.xaml</Link>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\..\SharedContent\cs\Default.rd.xml">
<Content Include="$(SharedContentDir)\cs\Default.rd.xml">
<Link>Properties\Default.rd.xml</Link>
</Content>
<Content Include="..\..\..\SharedContent\media\microsoft-sdk.png">
<Content Include="$(SharedContentDir)\media\microsoft-sdk.png">
<Link>Assets\microsoft-sdk.png</Link>
</Content>
<Content Include="..\..\..\SharedContent\media\smalltile-sdk.png">
<Content Include="$(SharedContentDir)\media\smalltile-sdk.png">
<Link>Assets\smallTile-sdk.png</Link>
</Content>
<Content Include="..\..\..\SharedContent\media\splash-sdk.png">
<Content Include="$(SharedContentDir)\media\splash-sdk.png">
<Link>Assets\splash-sdk.png</Link>
</Content>
<Content Include="..\..\..\SharedContent\media\squaretile-sdk.png">
<Content Include="$(SharedContentDir)\media\squaretile-sdk.png">
<Link>Assets\squareTile-sdk.png</Link>
</Content>
<Content Include="..\..\..\SharedContent\media\storelogo-sdk.png">
<Content Include="$(SharedContentDir)\media\storelogo-sdk.png">
<Link>Assets\storeLogo-sdk.png</Link>
</Content>
<Content Include="..\..\..\SharedContent\media\tile-sdk.png">
<Content Include="$(SharedContentDir)\media\tile-sdk.png">
<Link>Assets\tile-sdk.png</Link>
</Content>
<Content Include="..\..\..\SharedContent\media\windows-sdk.png">
<Content Include="$(SharedContentDir)\media\windows-sdk.png">
<Link>Assets\windows-sdk.png</Link>
</Content>
<Content Include="Assets\msLogo.png" />
Expand Down
22 changes: 13 additions & 9 deletions Samples/3DPrintingFromUnity/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
---
topic: sample
page_type: sample
languages:
- csharp
products:
- windows
- windows-uwp
urlFragment: 3DPrintingFromUnity
extendedZipContent:
- path: SharedContent
target: SharedContent
- path: LICENSE
target: LICENSE
description: "Shows how to load a Unity 3D asset into the Windows 10 3D print dialog."
---

<!---
Expand All @@ -20,7 +27,9 @@ From there, the user can repair the model, make simple modifications,
and send it to a local 3D printer or an online 3D print service.

> **Note:** This sample is part of a large collection of UWP feature samples.
> If you are unfamiliar with Git and GitHub, you can download the entire collection as a
> You can download this sample as a standalone ZIP file
> [from docs.microsoft.com](https://docs.microsoft.com/samples/microsoft/windows-universal-samples/3dprintingfromunity/),
> or you can download the entire collection as a single
> [ZIP file](https://github.com/Microsoft/Windows-universal-samples/archive/master.zip), but be
> sure to unzip everything to access shared dependencies. For more info on working with the ZIP file,
> the samples collection, and GitHub, see [Get the UWP samples from GitHub](https://aka.ms/ovu2uq).
Expand All @@ -34,15 +43,10 @@ Follow the instructions below to create and run the sample.

In addition to Visual Studio and the Windows SDK, you need the following:

* Unity version
* [Visual Studio Tools for Unity](https://docs.microsoft.com/en-us/visualstudio/cross-platform/visual-studio-tools-for-unity?view=vs-2019)
and Unity version
[5.2.1p2](https://unity3d.com/unity/qa/patch-releases "Unity") or later.

* The Unity plugin for Visual Studio.
This can be installed as part of installing Unity,
or you can
[download it](https://visualstudiogallery.msdn.microsoft.com/8d26236e-4a64-4d64-8486-7df95156aba9 "Visual Studio 2017 Tools for Unity")
manually.

* The 3D Builder app.
This application comes preinstalled with Windows 10.
If you have uninstalled it,
Expand Down
Loading

0 comments on commit 9bf6501

Please sign in to comment.