Open NickGerleman opened 3 years ago
Sounds like a potential improvement in the experience. @jonthysell thoughts on viability and side effects?
It is certainly an alterative - the design was to make sure autolinking never stopped VS users (ie. no error, no fail), and that, as essentially "power users" of RNW, a VS user wouldn't want their build files updated without their explicit intervention.
In VS Builds we run
nx react-native autolink-windows --check
, which does a dry run of autolinking logic. This is done to avoid mutating build files during the actual build.An alternate approach is to write the files, then fail the build, messaging the user that their files were updated. This still requires multiple builds, but removes a trip to the command-line for manual steps.
As a proof of concept I tried the following sequence of events:
The new NuGet package was restored on the next build, meaning we should be able to fail the build a single time and have changes picked up the next.
So, we could change the current:
to