Skip to content

Commit e982670

Browse files
GurliGebisdonho
authored andcommitted
Added C++/WinRT as nuget reference
Fix #7, close #10
1 parent 01c4c5b commit e982670

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

NppShell.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="packages\Microsoft.Windows.CppWinRT.2.0.230225.1\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.230225.1\build\native\Microsoft.Windows.CppWinRT.props')" />
34
<ItemGroup Label="ProjectConfigurations">
45
<ProjectConfiguration Include="Debug|ARM64">
56
<Configuration>Debug</Configuration>
@@ -293,11 +294,14 @@
293294
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
294295
<ImportGroup Label="ExtensionTargets">
295296
<Import Project="packages\Microsoft.Windows.ImplementationLibrary.1.0.230202.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('packages\Microsoft.Windows.ImplementationLibrary.1.0.230202.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
297+
<Import Project="packages\Microsoft.Windows.CppWinRT.2.0.230225.1\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.230225.1\build\native\Microsoft.Windows.CppWinRT.targets')" />
296298
</ImportGroup>
297299
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
298300
<PropertyGroup>
299301
<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>
300302
</PropertyGroup>
301303
<Error Condition="!Exists('packages\Microsoft.Windows.ImplementationLibrary.1.0.230202.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.ImplementationLibrary.1.0.230202.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
304+
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.230225.1\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.230225.1\build\native\Microsoft.Windows.CppWinRT.props'))" />
305+
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.230225.1\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.230225.1\build\native\Microsoft.Windows.CppWinRT.targets'))" />
302306
</Target>
303307
</Project>

framework.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
#include <Unknwn.h>
1313

1414
// WinRT Header Files
15-
#include <winrt/base.h>
16-
#include <winrt/Windows.ApplicationModel.h>
17-
#include <winrt/Windows.Foundation.Collections.h>
18-
#include <winrt/Windows.Management.Deployment.h>
15+
#include "winrt/base.h"
16+
#include "winrt/Windows.ApplicationModel.h"
17+
#include "winrt/Windows.Foundation.Collections.h"
18+
#include "winrt/Windows.Management.Deployment.h"
1919

2020
// Windows Implementation Library Header Files
2121
#include "wil\winrt.h"

packages.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3+
<package id="Microsoft.Windows.CppWinRT" version="2.0.230225.1" targetFramework="native" />
34
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.230202.1" targetFramework="native" />
45
</packages>

0 commit comments

Comments
 (0)