After creating app packages, react-native run-windows fails with a build error
Quickest steps to reproduce:
react-native init nostart cd nostart npm install --save-dev rnpm-plugin-windows react-native windows
open the nostart.sln in Visual Studio. Right-click on project nostart, choose Store->Create App Packages Choose "No" for uploading to windows store, click Next.
On the Select and Configure Packages tab, just use defaults, and click "Create"
After packages are finished building, return to the command line.
c:\nostart>react-native run-windows
C:\web\react-native\nostart>react-native run-windows
Restoring NuGet packages
MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.
Restoring packages for C:\web\react-native\nostart\windows\nostart\project.json...
Restoring packages for C:\web\react-native\nostart\node_modules\react-native-windows\ReactWindows\ReactNative\project.json...
Committing restore...
Committing restore...
C:\web\react-native\nostart\windows\nostart\nostart.csproj
Restore completed in 2081ms.
C:\web\react-native\nostart\node_modules\react-native-windows\ReactWindows\ReactNative\ReactNative.csproj
Restore completed in 2081ms.
NuGet Config files used:
C:\Users\james.BASSDOM\AppData\Roaming\NuGet\NuGet.Config
C:\ProgramData\nuget\Config\Microsoft.VisualStudio.Offline.config
Feeds used:
https://api.nuget.org/v3/index.json
\\ap21-arts-01\Apparel21\NuGet\Debug
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
Building C:/web/react-native/nostart/windows/nostart.sln
ERROR: The system was unable to find the specified registry key or value.
Found MSBuild v14.0 at C:\Program Files (x86)\MSBuild\14.0\bin
Found MSBuild v12.0 at C:\Program Files (x86)\MSBuild\12.0\bin\amd64\
Found MSBuild v4.0 at C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
Building Solution: C:/web/react-native/nostart/windows/nostart.sln
Build configuration: Debug
Build platform: x86
Build failed with message Error: Command failed: "C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe" "C:/web/react-native/nostart/windows/nostart.sln" /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /p:Configuration=Debug /p:Platform=x86
. Check your build configuration.
If you remove these lines from you nostart.csproj, it will start working again.
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
<AppxBundle>Always</AppxBundle>
<AppxBundlePlatforms>x86|x64|arm</AppxBundlePlatforms>
if you run the build with verbosity,
"C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe" "C:/web/react-native/nostart/windows/nostart.sln" /nologo /p:Configuration=Debug /p:Platform=x86
... skipping lots of output..
_CreatePackageLayout:
Removing directory "obj\x86\Debug\PackageLayout\".
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(2959,5): error MSB3231: Unable to remove directory "obj\x86\Debug\PackageLayout\". Access to the path 'u
crtbased.dll' is denied. [C:\web\react-native\nostart\windows\nostart\nostart.csproj]
Done Building Project "C:\web\react-native\nostart\windows\nostart\nostart.csproj" (default targets) -- FAILED.
Done Building Project "C:\web\react-native\nostart\windows\nostart.sln" (default targets) -- FAILED.
Build FAILED.
@jmcginty can this be closed now that we merged #880?