Repository navigation
UWP Project Json Upgrader
Rohit Agrawal edited this page Mar 16, 2017
·
9 revisions
NuGet will provide an IVS API that UWP Project system can call when a project is re targeted to a Target Platform Version >= RS2. This API will migrate the project.json based UWP project to be a PackageReference based project so it can take advantage of all the NuGet 4.0 features.
The API will look like this:
///
/// Contains methods to migrate a project.json based legacy project to PackageReference based project.
///
public interface IVsProjectJsonToPackageReferenceMigrator
{
///
/// Migrates a UWP Project.json based project to Package Reference based project.
///
/// The full path to the project that needs to be migrated
Task<object> MigrateProjectJsonToPackageReferenceAsync(string projectUniqueName);
} ///
/// Contains the result of the migrate operation on a legacy project.json project
///
public interface IVsProjectJsonToPackageReferenceMigrateResult
{
///
/// Returns the success value of the migration operation.
///
bool IsSuccess { get; }
///
/// If migrate operation was unsuccessful, stores the error message in the exception.
///
string ErrorMessage { get; }
}The Migration is done in three steps:
-
Migrate package dependencies to
in csproj. -
Migrate runtimes in project json to
in csproj. -
Saves a backup of the csproj and project.json file in the Backup folder in the directory where csproj file resides.
-
Saves the project.
Check out the proposals in the accepted & proposed folders on the repository, and active PRs for proposals being discussed today.