GitXplorerGitXplorer
t

NuGetPackageConfigConverter

public
14 stars
8 forks
0 issues

Commits

List of commits on branch master.
Verified
23de31af1f98fe06658924af17721a8b45427e7f

Update README.md

ttwsouthwick committed 6 years ago
Unverified
019705b8f593dff892f246f79664cc782d02e08e

Add sample diff to the README (#29)

ddrewnoakes committed 7 years ago
Unverified
7d5f243c31ee3fbff8e52dd341d81910dfa15aa4

Use an output pane

ttwsouthwick committed 7 years ago
Unverified
d1974bfd6d020462898c326e8fe2140ae10b8013

Update nuget packages

ttwsouthwick committed 7 years ago
Verified
47f93f1c50a584a615c6198bbcf039a59f79a8f0

Add stylecop to catch simple style issues (#28)

ttwsouthwick committed 7 years ago
Unverified
e0c6ab473689b6059035142f8c1d8fcc0f4f1316

Fix of solution crash, added filelogs (#26)

OOsirisTerje committed 7 years ago

README

The README file for this repository.

Project Archived (12/17/2018)

This project will not be maintained as support for converting to PackageReference is included in VS 15.7+: https://docs.microsoft.com/en-us/nuget/reference/migrate-packages-config-to-package-reference.

NuGet Package Updater

Build status

Download this extension from the VS Gallery or the CI build.


This will convert projects that are using NuGet dependencies via packages.config or project.json to the newer PackageReference format. There are many benefits to using this new format even in non-.NET Core projects (where it is required). Some of them include:

  • Transitive dependencies are automatically included - you only need to include the dependencies you need
  • install.ps1/uninstal.ps1 is not run so arbitrary code is not run on install and uninstall from untrusted packages
  • Doesn't rewrite your project file
  • Doesn't add extra files to the project

In order to run, right-click the Solution in Solution Exporer and click Upgrade to Package References:

Invocation

After selecting that, the project will be transformed as shown below. It is highly recommended that you perform this on a source-control enabled directory so you can easily undo if something goes wrong.

Before After
Before After

Please file any issues if something does not work as expected.

Sample diff

In addition to deleting the packages.config file, the csproj file will be modified. Here's an example diff:

diff --git a/Gravatar/Gravatar.csproj b/Gravatar/Gravatar.csproj
index e33bdc720..e622d6602 100644
--- a/Gravatar/Gravatar.csproj
+++ b/Gravatar/Gravatar.csproj
@@ -34,4 +34,5 @@
     <TargetFrameworkProfile>
     </TargetFrameworkProfile>
+    <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -61,8 +62,4 @@
     <Reference Include="System" />
     <Reference Include="System.Drawing" />
-    <Reference Include="System.IO.Abstractions, Version=2.0.0.144, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\System.IO.Abstractions.2.0.0.144\lib\net40\System.IO.Abstractions.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
   </ItemGroup>
   <ItemGroup>
@@ -95,7 +92,4 @@
     </BootstrapperPackage>
   </ItemGroup>
-  <ItemGroup>
-    <None Include="packages.config" />
-  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\Externals\Git.hub\Git.hub\Git.hub.csproj">
@@ -106,6 +100,10 @@
   </ItemGroup>
   <ItemGroup>
-    <Analyzer Include="..\packages\StyleCop.Analyzers.1.1.0-beta006\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll" />
-    <Analyzer Include="..\packages\StyleCop.Analyzers.1.1.0-beta006\analyzers\dotnet\cs\StyleCop.Analyzers.dll" />
+    <PackageReference Include="StyleCop.Analyzers">
+      <Version>1.1.0-beta006</Version>
+    </PackageReference>
+    <PackageReference Include="System.IO.Abstractions">
+      <Version>2.0.0.144</Version>
+    </PackageReference>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

License

Apache 2.0