-
Notifications
You must be signed in to change notification settings - Fork 277
Revert "Revert nuget to 2.0.200609.3" #796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b439970
Revert "Nuget 2.0.200609.3 (#793)"
jlaanstra bafa470
Remove the use of TargetPlatformWinMDLocation as the C++ build target…
jlaanstra 1d4bd75
MSBuild only resolves refs for TargetPlatformIdentifier=UAP. C++/WinR…
jlaanstra e83377a
Use Copy Local in the property name instead of Private.
jlaanstra 950ae05
Merge branch 'master' into revert-793-nuget
jlaanstra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
136 changes: 136 additions & 0 deletions
136
test/nuget/ConsoleApplication1/ConsoleApplication1.vcxproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,136 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.201102.2\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.201102.2\build\native\Microsoft.Windows.CppWinRT.props')" /> | ||
| <Import Project="$(ProjectDir)..\..\..\nuget\Microsoft.Windows.CppWinRT.props" /> | ||
| <PropertyGroup Label="Globals"> | ||
| <CppWinRTOptimized>true</CppWinRTOptimized> | ||
| <CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge> | ||
| <CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata> | ||
| <MinimalCoreWin>true</MinimalCoreWin> | ||
| <VCProjectVersion>15.0</VCProjectVersion> | ||
| <ProjectGuid>{4dd64eae-4b27-415a-863e-55cb8d5863dd}</ProjectGuid> | ||
| <Keyword>Win32Proj</Keyword> | ||
| <RootNamespace>ConsoleApplication1</RootNamespace> | ||
| <WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.19041.0</WindowsTargetPlatformVersion> | ||
| <WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion> | ||
| </PropertyGroup> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
| <ItemGroup Label="ProjectConfigurations"> | ||
| <ProjectConfiguration Include="Debug|Win32"> | ||
| <Configuration>Debug</Configuration> | ||
| <Platform>Win32</Platform> | ||
| </ProjectConfiguration> | ||
| <ProjectConfiguration Include="Release|Win32"> | ||
| <Configuration>Release</Configuration> | ||
| <Platform>Win32</Platform> | ||
| </ProjectConfiguration> | ||
| <ProjectConfiguration Include="Debug|x64"> | ||
| <Configuration>Debug</Configuration> | ||
| <Platform>x64</Platform> | ||
| </ProjectConfiguration> | ||
| <ProjectConfiguration Include="Release|x64"> | ||
| <Configuration>Release</Configuration> | ||
| <Platform>x64</Platform> | ||
| </ProjectConfiguration> | ||
| </ItemGroup> | ||
| <PropertyGroup Label="Configuration"> | ||
| <ConfigurationType>Application</ConfigurationType> | ||
| <PlatformToolset>v140</PlatformToolset> | ||
| <PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset> | ||
| <PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset> | ||
| <CharacterSet>Unicode</CharacterSet> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration"> | ||
| <UseDebugLibraries>true</UseDebugLibraries> | ||
| <LinkIncremental>true</LinkIncremental> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration"> | ||
| <UseDebugLibraries>false</UseDebugLibraries> | ||
| <WholeProgramOptimization>true</WholeProgramOptimization> | ||
| <LinkIncremental>false</LinkIncremental> | ||
| </PropertyGroup> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
| <ImportGroup Label="ExtensionSettings"> | ||
| </ImportGroup> | ||
| <ImportGroup Label="Shared"> | ||
| </ImportGroup> | ||
| <ImportGroup Label="PropertySheets"> | ||
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
| </ImportGroup> | ||
| <ImportGroup Label="PropertySheets"> | ||
| <Import Project="PropertySheet.props" /> | ||
| <Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.201102.2\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.201102.2\build\native\Microsoft.Windows.CppWinRT.targets')" /> | ||
| </ImportGroup> | ||
| <PropertyGroup Label="UserMacros" /> | ||
| <ItemDefinitionGroup> | ||
| <ClCompile> | ||
| <PrecompiledHeader>Use</PrecompiledHeader> | ||
| <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> | ||
| <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> | ||
| <PreprocessorDefinitions>_CONSOLE;WIN32_LEAN_AND_MEAN;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
| <WarningLevel>Level4</WarningLevel> | ||
| <AdditionalOptions>%(AdditionalOptions) /permissive- /bigobj</AdditionalOptions> | ||
| </ClCompile> | ||
| </ItemDefinitionGroup> | ||
| <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'"> | ||
| <ClCompile> | ||
| <Optimization>Disabled</Optimization> | ||
| <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
| </ClCompile> | ||
| <Link> | ||
| <SubSystem>Console</SubSystem> | ||
| <GenerateWindowsMetadata>false</GenerateWindowsMetadata> | ||
| </Link> | ||
| </ItemDefinitionGroup> | ||
| <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'"> | ||
| <ClCompile> | ||
| <PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
| </ClCompile> | ||
| </ItemDefinitionGroup> | ||
| <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'"> | ||
| <ClCompile> | ||
| <Optimization>MaxSpeed</Optimization> | ||
| <FunctionLevelLinking>true</FunctionLevelLinking> | ||
| <IntrinsicFunctions>true</IntrinsicFunctions> | ||
| <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
| </ClCompile> | ||
| <Link> | ||
| <SubSystem>Console</SubSystem> | ||
| <EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
| <OptimizeReferences>true</OptimizeReferences> | ||
| <GenerateWindowsMetadata>false</GenerateWindowsMetadata> | ||
| </Link> | ||
| </ItemDefinitionGroup> | ||
| <ItemGroup> | ||
| <ClInclude Include="ConsoleApplication1Class.h" /> | ||
| <ClInclude Include="pch.h" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ClCompile Include="ConsoleApplication1Class.cpp" /> | ||
| <ClCompile Include="main.cpp" /> | ||
| <ClCompile Include="pch.cpp"> | ||
| <PrecompiledHeader>Create</PrecompiledHeader> | ||
| </ClCompile> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <None Include="packages.config" /> | ||
| <None Include="PropertySheet.props" /> | ||
| <Text Include="readme.txt"> | ||
| <DeploymentContent>false</DeploymentContent> | ||
| </Text> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <Midl Include="ConsoleApplication1Class.idl"> | ||
| <SubType>Designer</SubType> | ||
| </Midl> | ||
| </ItemGroup> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
| <Import Project="$(ProjectDir)..\..\..\nuget\Microsoft.Windows.CppWinRT.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\Microsoft.Windows.CppWinRT.2.0.201102.2\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.201102.2\build\native\Microsoft.Windows.CppWinRT.props'))" /> | ||
| <Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.201102.2\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.201102.2\build\native\Microsoft.Windows.CppWinRT.targets'))" /> | ||
| </Target> | ||
| </Project> |
46 changes: 46 additions & 0 deletions
46
test/nuget/ConsoleApplication1/ConsoleApplication1.vcxproj.filters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <ItemGroup> | ||
| <Filter Include="Source Files"> | ||
| <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> | ||
| <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> | ||
| </Filter> | ||
| <Filter Include="Header Files"> | ||
| <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> | ||
| <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions> | ||
| </Filter> | ||
| <Filter Include="Resource Files"> | ||
| <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> | ||
| <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> | ||
| </Filter> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ClInclude Include="pch.h"> | ||
| <Filter>Header Files</Filter> | ||
| </ClInclude> | ||
| <ClInclude Include="ConsoleApplication1Class.h"> | ||
| <Filter>Header Files</Filter> | ||
| </ClInclude> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ClCompile Include="pch.cpp"> | ||
| <Filter>Source Files</Filter> | ||
| </ClCompile> | ||
| <ClCompile Include="main.cpp"> | ||
| <Filter>Source Files</Filter> | ||
| </ClCompile> | ||
| <ClCompile Include="ConsoleApplication1Class.cpp"> | ||
| <Filter>Source Files</Filter> | ||
| </ClCompile> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <None Include="PropertySheet.props" /> | ||
| <None Include="packages.config" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <Text Include="readme.txt" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <Midl Include="ConsoleApplication1Class.idl" /> | ||
| </ItemGroup> | ||
| </Project> |
10 changes: 10 additions & 0 deletions
10
test/nuget/ConsoleApplication1/ConsoleApplication1Class.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #include "pch.h" | ||
| #include "ConsoleApplication1Class.h" | ||
| #include "ConsoleApplication1Class.g.cpp" | ||
|
|
||
| namespace winrt::ConsoleApplication1::implementation | ||
| { | ||
| void ConsoleApplication1Class::Test() | ||
| { | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #pragma once | ||
| #include "ConsoleApplication1Class.g.h" | ||
|
|
||
| namespace winrt::ConsoleApplication1::implementation | ||
| { | ||
| struct ConsoleApplication1Class : ConsoleApplication1ClassT<ConsoleApplication1Class> | ||
| { | ||
| ConsoleApplication1Class() = default; | ||
|
|
||
| void Test(); | ||
| }; | ||
| } | ||
| namespace winrt::ConsoleApplication1::factory_implementation | ||
| { | ||
| struct ConsoleApplication1Class : ConsoleApplication1ClassT<ConsoleApplication1Class, implementation::ConsoleApplication1Class> | ||
| { | ||
| }; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| namespace ConsoleApplication1 | ||
| { | ||
| [default_interface] | ||
| runtimeclass ConsoleApplication1Class | ||
| { | ||
| ConsoleApplication1Class(); | ||
| void Test(); | ||
| } | ||
| } | ||
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <ImportGroup Label="PropertySheets" /> | ||
| <PropertyGroup Label="UserMacros" /> | ||
| <!-- | ||
| To customize common C++/WinRT project properties: | ||
| * right-click the project node | ||
| * expand the Common Properties item | ||
| * select the C++/WinRT property page | ||
|
|
||
| For more advanced scenarios, and complete documentation, please see: | ||
| https://github.com/Microsoft/cppwinrt/tree/master/nuget | ||
| --> | ||
| <PropertyGroup /> | ||
| <ItemDefinitionGroup /> | ||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #include "pch.h" | ||
|
|
||
| using namespace winrt; | ||
| using namespace Windows::Foundation; | ||
|
|
||
| int main() | ||
| { | ||
| init_apartment(); | ||
| Uri uri(L"http://aka.ms/cppwinrt"); | ||
| printf("Hello, %ls!\n", uri.AbsoluteUri().c_str()); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <packages> | ||
| <package id="Microsoft.Windows.CppWinRT" version="2.0.201102.2" targetFramework="native" /> | ||
| </packages> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| #include "pch.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #pragma once | ||
| #include <winrt/Windows.Foundation.h> | ||
| #include <winrt/Windows.Foundation.Collections.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| ======================================================================== | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. consider deleting this file. does not help anyone |
||
| C++/WinRT ConsoleApplication1 Project Overview | ||
| ======================================================================== | ||
|
|
||
| This project demonstrates how to get started consuming Windows Runtime | ||
| classes directly from standard C++, using platform projection headers | ||
| generated from Windows SDK metadata files. | ||
|
|
||
| Steps to generate and consume SDK platform projection: | ||
| 1. Build project initally to generate platform projection headers into | ||
| your Generated Files folder. | ||
| 2. Include a projection namespace header in your pch.h, such as | ||
| <winrt/Windows.Foundation.h>. | ||
| 3. Consume winrt namespace and any Windows Runtime namespaces, such as | ||
| winrt::Windows::Foundation, from source code. | ||
| 4. Initialize apartment via init_apartment() and consume winrt classes. | ||
|
|
||
| Steps to generate and consume a projection from third party metadata: | ||
| 1. Add a WinMD reference by right-clicking the References project node | ||
| and selecting "Add Reference...". In the Add References dialog, | ||
| browse to the component WinMD you want to consume and add it. | ||
| 2. Build the project once to generate projection headers for the | ||
| referenced WinMD file under the "Generated Files" subfolder. | ||
| 3. As above, include projection headers in pch or source code | ||
| to consume projected Windows Runtime classes. | ||
|
|
||
| ======================================================================== | ||
| Learn more about C++/WinRT here: | ||
| http://aka.ms/cppwinrt/ | ||
| ======================================================================== | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove, not needed (this class has a method)