UWP Project Json Upgrader
Rohit Agrawal edited this page Mar 16, 2017
·
9 revisions
Pages 155
Home
Contributing
Specs
Incubation
Reviewing
- Centrally-managing-NuGet-package-versions
- Package Applicability
- dotnet list package --vulnerable
- Machine-readable output for dotnet list package
- Support Package Renames
- Advanced Search on NuGet.org
Reviewed
Implemented
- Enhanced package upload workflow
- Register package signing certificates
- Organizations on NuGet.org
- 2 Factor Auth for NuGet.org sign in
- Add nuget sources command to the dotnet CLI
- Author Package Signing
- Backporting PC to msbuild restore
- Deprecate packages
- Dotnet list package
- Enable repeatable package restore using lock file
- NuGet Client Package Debugging
- NuGet Package Debugging & Symbols Improvements
- NuGet Package Identity Verification
- NuGet Package Signing Client Policy
- NuGet Sign Command
- NuGet Verify Command
- Storing trusted repository
- Package Signatures Technical Details
- Package signing
- Packages.config SHA Validation
- Packaging Icon, License and Documentation within the nupkg
- Repository Signatures and Countersignatures Technical Specification
- Repository Signatures
- Show outdated packages
- Symbols Package Upload and Delete Workflow
Templates
Clone this wiki locally
Upgrade API
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:
/// <summary>
/// Contains methods to migrate a project.json based legacy project to PackageReference based project.
/// </summary>
public interface IVsProjectJsonToPackageReferenceMigrator
{
/// <summary>
/// Migrates a UWP Project.json based project to Package Reference based project.
/// </summary>
/// <param name="projectUniqueName">The full path to the project that needs to be migrated</param>
Task<object> MigrateProjectJsonToPackageReferenceAsync(string projectUniqueName);
} /// <summary>
/// Contains the result of the migrate operation on a legacy project.json project
/// </summary>
public interface IVsProjectJsonToPackageReferenceMigrateResult
{
/// <summary>
/// Returns the success value of the migration operation.
/// </summary>
bool IsSuccess { get; }
/// <summary>
/// If migrate operation was unsuccessful, stores the error message in the exception.
/// </summary>
string ErrorMessage { get; }
}Implementation Details
The Migration is done in three steps:
-
Migrate package dependencies to
<PackageReference>in csproj. -
Migrate runtimes in project json to
<RuntimeIdentifiers>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.