Skip to content

Commit

Permalink
App projects only builds from clean (i.e. the first time only) (#4983)
Browse files Browse the repository at this point in the history
* Fix deploy issue causing 2nd+ builds to break due to bug in appxrecipe which gets imported

* Change files
  • Loading branch information
asklar authored May 22, 2020
1 parent ed7ee2d commit cd9206e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "prerelease",
"comment": "Fix deploy issue causing 2nd+ builds to break due to bug in appxrecipe which gets imported",
"packageName": "react-native-windows",
"email": "[email protected]",
"dependentChangeType": "patch",
"date": "2020-05-21T23:35:04.220Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
<Import Project="$(ProjectDir)\AutolinkedNativeModules.g.targets" Condition="Exists('$(ProjectDir)\AutolinkedNativeModules.g.targets')" />

<Import Project="$(MSBuildProjectDirectory)\$(OutputPath)\$(AssemblyName).Build.appxrecipe"
Condition="Exists('$(MSBuildProjectDirectory)\$(OutputPath)\$(AssemblyName).Build.appxrecipe')" />
<Target Name="Deploy">
Condition="Exists('$(MSBuildProjectDirectory)\$(OutputPath)\$(AssemblyName).Build.appxrecipe') And '$(DeployLayout)'=='true'" />
<Target Name="Deploy" Condition="'$(DeployLayout)'=='true'">
<Error Condition="!Exists('$(MSBuildProjectDirectory)\$(OutputPath)\$(AssemblyName).Build.appxrecipe')"
Text="You must first build the project before deploying it" />
<Copy SourceFiles="%(AppxPackagedFile.Identity)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
<Import Project="$(ProjectDir)\AutolinkedNativeModules.g.targets" Condition="Exists('$(ProjectDir)\AutolinkedNativeModules.g.targets')" />

<Import Project="$(OutputPath)\$(AssemblyName).Build.appxrecipe"
Condition="Exists('$(OutputPath)\$(AssemblyName).Build.appxrecipe')" />
<Target Name="Deploy">
<Message Text="OutputPath=$(OutputPath)" />
Condition="Exists('$(OutputPath)\$(AssemblyName).Build.appxrecipe') And '$(DeployLayout)'=='true'" />
<Target Name="Deploy" Condition="'$(DeployLayout)'=='true'">
<Error Condition="!Exists('$(OutputPath)\$(AssemblyName).Build.appxrecipe')"
Text="You must first build the project before deploying it" />
<Copy SourceFiles="%(AppxPackagedFile.Identity)"
Expand Down
2 changes: 1 addition & 1 deletion vnext/local-cli/runWindows/utils/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ async function deployToDesktop(options, verbose, slnFile) {
slnFile,
options.release ? 'Release' : 'Debug',
options.arch,
null,
{DeployLayout: true},
options.verbose,
'Deploy',
);
Expand Down

0 comments on commit cd9206e

Please sign in to comment.