Skip to content

Commit c23f9d0

Browse files
committed
fix project to include correct module code
1 parent 038f031 commit c23f9d0

File tree

5 files changed

+75
-20
lines changed

5 files changed

+75
-20
lines changed

packages/default-storage/windows/ReactNativeAsyncStorage/ReactNativeAsyncStorage.vcxproj

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<ProjectGuid>{4855D892-E16C-404D-8286-0089E0F7F9C4}</ProjectGuid>
99
<ProjectName>ReactNativeAsyncStorage</ProjectName>
1010
<Keyword>Win32Proj</Keyword>
11-
<RootNamespace>ReactNativeAsyncStorageAsyncStorage</RootNamespace>
11+
<RootNamespace>ReactNativeAsyncStorage</RootNamespace>
1212
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
1313
<DefaultLanguage>en-US</DefaultLanguage>
1414
<MinimumVisualStudioVersion>17.0</MinimumVisualStudioVersion>
@@ -86,7 +86,9 @@
8686
<AdditionalDependencies>shell32.lib;user32.lib;windowsapp.lib;%(AdditionalDependenices)</AdditionalDependencies>
8787
<SubSystem>Console</SubSystem>
8888
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
89-
<ModuleDefinitionFile>ReactNativeAsyncStorage.def</ModuleDefinitionFile>
89+
<ModuleDefinitionFile>..\code\ReactNativeAsyncStorage.def</ModuleDefinitionFile>
90+
<AdditionalDependencies>winsqlite3.lib;%(AdditionalDependencies)</AdditionalDependencies>
91+
<DelayLoadDLLs>winsqlite3.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
9092
</Link>
9193
</ItemDefinitionGroup>
9294
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
@@ -106,26 +108,31 @@
106108
</ItemDefinitionGroup>
107109
<PropertyGroup Label="UserMacros" />
108110
<ItemGroup>
109-
<ClInclude Include="ReactNativeAsyncStorage.h" />
110-
<ClInclude Include="ReactPackageProvider.h">
111-
<DependentUpon>ReactPackageProvider.idl</DependentUpon>
111+
<ClInclude Include="pch.h" />
112+
<ClInclude Include="..\code\ReactPackageProvider.h">
113+
<DependentUpon>..\code\ReactPackageProvider.idl</DependentUpon>
112114
</ClInclude>
115+
<ClInclude Include="..\code\DBStorage.h" />
116+
<ClInclude Include="..\code\RNCAsyncStorage.h" />
113117
<ClInclude Include="resource.h" />
114-
<ClInclude Include="pch.h" />
115118
<ClInclude Include="targetver.h" />
116119
</ItemGroup>
117120
<ItemGroup>
118-
<ClCompile Include="ReactNativeAsyncStorage.cpp" />
119121
<ClCompile Include="pch.cpp">
120122
<PrecompiledHeader>Create</PrecompiledHeader>
121123
</ClCompile>
122-
<ClCompile Include="ReactPackageProvider.cpp">
123-
<DependentUpon>ReactPackageProvider.idl</DependentUpon>
124-
</ClCompile>
125124
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
125+
<ClCompile Include="..\code\ReactPackageProvider.cpp">
126+
<DependentUpon>..\code\ReactPackageProvider.idl</DependentUpon>
127+
</ClCompile>
128+
<ClCompile Include="..\code\DBStorage.cpp" />
129+
</ItemGroup>
130+
<ItemGroup>
131+
<None Include="packages.config" />
132+
<None Include="..\code\ReactNativeAsyncStorage.def" />
126133
</ItemGroup>
127134
<ItemGroup>
128-
<Midl Include="ReactPackageProvider.idl" />
135+
<Midl Include="..\code\ReactPackageProvider.idl" />
129136
</ItemGroup>
130137
<ItemGroup>
131138
<ResourceCompile Include="ReactNativeAsyncStorage.rc" />
@@ -141,7 +148,9 @@
141148
<PropertyGroup>
142149
<ErrorText>This project references targets in your node_modules\react-native-windows folder. The missing file is {0}.</ErrorText>
143150
</PropertyGroup>
144-
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.props'))" />
145-
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.targets'))" />
151+
<Error Condition="'$(UseFabric)'!='true' And !Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props'))" />
152+
<Error Condition="'$(UseFabric)'!='true' And !Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets'))" />
153+
<Error Condition="'$(UseFabric)'=='true' And !Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.props'))" />
154+
<Error Condition="'$(UseFabric)'=='true' And !Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.targets'))" />
146155
</Target>
147156
</Project>

packages/default-storage/windows/ReactNativeAsyncStorage/ReactNativeAsyncStorage.vcxproj.filters

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,39 @@
2121
<ClInclude Include="resource.h">
2222
<Filter>Header Files</Filter>
2323
</ClInclude>
24-
<ClInclude Include="ReactNativeAsyncStorage.h">
24+
<ClInclude Include="..\code\RNCAsyncStorage.h">
25+
<Filter>Header Files</Filter>
26+
</ClInclude>
27+
<ClInclude Include="..\code\DBStorage.h">
28+
<Filter>Header Files</Filter>
29+
</ClInclude>
30+
<ClInclude Include="..\code\ReactPackageProvider.h">
2531
<Filter>Header Files</Filter>
2632
</ClInclude>
2733
<ClInclude Include="pch.h">
2834
<Filter>Header Files</Filter>
2935
</ClInclude>
3036
</ItemGroup>
3137
<ItemGroup>
32-
<ClCompile Include="ReactNativeAsyncStorage.cpp">
38+
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp">
3339
<Filter>Source Files</Filter>
3440
</ClCompile>
41+
<ClInclude Include="..\code\DBStorage.cpp">
42+
<Filter>Source Files</Filter>
43+
</ClInclude>
3544
<ClCompile Include="pch.cpp">
3645
<Filter>Source Files</Filter>
3746
</ClCompile>
47+
<ClCompile Include="..\code\ReactPackageProvider.cpp">
48+
<Filter>Source Files</Filter>
49+
</ClCompile>
50+
</ItemGroup>
51+
<ItemGroup>
52+
<None Include="..\code\ReactNativeAsyncStorage.def" />
53+
<None Include="packages.config" />
54+
</ItemGroup>
55+
<ItemGroup>
56+
<Midl Include="..\code\ReactPackageProvider.idl" />
3857
</ItemGroup>
3958
<ItemGroup>
4059
<ResourceCompile Include="ReactNativeAsyncStorage.rc">

packages/default-storage/windows/ReactNativeAsyncStorage/pch.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,9 @@
2828
#include <tchar.h>
2929

3030
// Reference additional headers your project requires here
31+
#include <functional>
32+
#include <winrt/Windows.ApplicationModel.Core.h>
33+
#include <winrt/Windows.Data.Json.h>
34+
#include <winrt/Windows.Foundation.Collections.h>
35+
#include <winrt/Windows.Foundation.h>
36+
#include <winrt/Windows.Storage.h>

packages/default-storage/windows/code/ReactPackageProvider.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ namespace winrt::ReactNativeAsyncStorage::factory_implementation
2020
struct ReactPackageProvider
2121
: ReactPackageProviderT<ReactPackageProvider, implementation::ReactPackageProvider> {
2222
};
23-
} // namespace winrt::ReactNativeAsyncStorage::factory_implementation
23+
} // namespace winrt::ReactNativeAsyncStorage::factory_implementation

packages/default-storage/windows/code/pch.h

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,34 @@
1-
// Copyright (c) Microsoft Corporation.
2-
// Licensed under the MIT License.
1+
// pch.h : include file for standard system include files,
2+
// or project specific include files that are used frequently, but
3+
// are changed infrequently
4+
//
5+
36
#pragma once
47

5-
#define NOMINMAX
8+
#include "targetver.h"
69

7-
#include <functional>
10+
#define NOMINMAX 1
11+
#define WIN32_LEAN_AND_MEAN 1
12+
#define WINRT_LEAN_AND_MEAN 1
13+
14+
// Windows Header Files
15+
#include <windows.h>
16+
#undef GetCurrentTime
817
#include <unknwn.h>
918

19+
// WinRT Header Files
20+
#include <winrt/base.h>
21+
#include <CppWinRTIncludes.h>
1022
#include <winrt/Microsoft.ReactNative.h>
23+
24+
// C RunTime Header Files
25+
#include <malloc.h>
26+
#include <memory.h>
27+
#include <stdlib.h>
28+
#include <tchar.h>
29+
30+
// Reference additional headers your project requires here
31+
#include <functional>
1132
#include <winrt/Windows.ApplicationModel.Core.h>
1233
#include <winrt/Windows.Data.Json.h>
1334
#include <winrt/Windows.Foundation.Collections.h>

0 commit comments

Comments
 (0)