MSBuild, csproj and props package reference editor.
Перейти к файлу
Wiesław Šoltés 6e7c9d3196 Update build.cake 2018-12-10 18:25:25 +01:00
build Use ReactiveUI 2018-12-09 22:21:29 +01:00
demo Update build.cake 2018-12-10 18:25:25 +01:00
images Updated screenshot 2017-11-16 19:21:55 +01:00
src Update MainView.xaml.cs 2018-12-09 22:58:28 +01:00
tests/PackageReferenceEditor.UnitTests Updated 2018-12-09 19:00:41 +01:00
.editorconfig Updated editorconfig 2018-07-09 19:47:29 +02:00
.gitattributes Added .gitattributes & .gitignore files 2017-11-09 19:42:13 +01:00
.gitignore Updated gitignore 2017-11-14 18:40:32 +01:00
.nuke Added nuke build 2018-12-08 15:41:18 +01:00
LICENSE.TXT Create LICENSE.TXT 2017-11-09 22:40:32 +01:00
NuGet.Config Create NuGet.Config 2017-11-14 12:01:51 +01:00
PackageReferenceEditor.sln Use ReactiveUI 2018-12-09 22:21:29 +01:00
README.md Update README.md 2018-12-10 18:16:43 +01:00
_config.yml Set theme jekyll-theme-cayman 2017-11-17 12:04:13 +01:00
build.ps1 Added nuke build 2018-12-08 15:41:18 +01:00
build.sh Added nuke build 2018-12-08 15:41:18 +01:00
global.json Create global.json 2018-12-08 14:49:21 +01:00

README.md

PackageReferenceEditor

Build status

NuGet MyGet

Github All Releases GitHub release Github Releases

MSBuild, csproj and props package reference editor.

Downloads

Platform Type Version Download
All NuGet 0.0.6 PackageReferenceEditor.0.0.6.nupkg
osx.10.12-x64 Portable 0.0.6 PackageReferenceEditor.Avalonia-osx.10.12-x64.zip
ubuntu.14.04-x64 Portable 0.0.6 PackageReferenceEditor.Avalonia-ubuntu.14.04-x64.zip
win7-x64 Portable 0.0.6 PackageReferenceEditor.Avalonia-win7-x64.zip

Screenshots

NuGet

PackageReferenceEditor is delivered as a NuGet package.

You can find the packages here NuGet and install the package like this:

Install-Package PackageReferenceEditor

NuGet Packages

Package Sources

Example Usage with Cake build scripts

Same code can be used in C# programs by removing #addin directive and installing package from NuGet.

Print package versions

#addin "nuget:?package=PackageReferenceEditor"

using PackageReferenceEditor;

Updater.FindReferences("./build", "*.props", new string[] { }).PrintVersions();
Updater.FindReferences("./", "*.csproj", new string[] { }).PrintVersions();	

Validate package versions

#addin "nuget:?package=PackageReferenceEditor"

using PackageReferenceEditor;

Updater.FindReferences("./build", "*.props", new string[] { }).ValidateVersions();
Updater.FindReferences("./", "*.csproj", new string[] { }).ValidateVersions();

Update package version

#addin "nuget:?package=PackageReferenceEditor"

using PackageReferenceEditor;

Updater.FindReferences("./build", "*.props", new string[] { }).UpdateVersions("Newtonsoft.Json", "10.0.3");

Get installed package versions

#addin "nuget:?package=PackageReferenceEditor"

using PackageReferenceEditor;

var result = Updater.FindReferences("./build", "*.props", new string[] { });
result.ValidateVersions();
var version = result.GroupedReferences["Newtonsoft.Json"].FirstOrDefault().Version;
Information("Newtonsoft.Json package version: {0}", version);

Get available package versions

#addin "nuget:?package=PackageReferenceEditor"

using PackageReferenceEditor;
using System.Linq;

var versions = NuGetApi.GetPackageVersions("https://api.nuget.org/v3/index.json", "Newtonsoft.Json").Result;
var latestVersion = versions.Reverse().FirstOrDefault();
Information("Newtonsoft.Json package latest version: {0}", latestVersion);

Resources

License

PackageReferenceEditor is licensed under the MIT license.