MSBuild, csproj and props package reference editor.
Перейти к файлу
Wiesław Šoltés fc0c2aea57 Updated 2020-03-15 13:42:51 +01:00
.github Update build.yml 2019-11-05 08:12:18 +01:00
build Updated 2020-03-15 13:42:51 +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 Updated 2019-10-01 09:14:01 +00:00
tests/PackageReferenceEditor.UnitTests Added netstandard2.1 support 2019-09-25 21:35:40 +02: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 Updated nuke 2019-03-24 13:23:18 +01:00
LICENSE.TXT Updated version 2019-04-04 07:07:17 +00:00
NuGet.Config Update NuGet.Config 2019-04-23 19:24:37 +02:00
PackageReferenceEditor.sln Updated 2019-10-01 09:14:01 +00:00
README.md Update README.md 2019-12-24 19:56:23 +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 Updated 2019-12-06 07:56:12 +00: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.8.0 PackageReferenceEditor.0.8.0.nupkg
osx.10.12-x64 Portable 0.8.0 PackageReferenceEditor.Avalonia-osx.10.12-x64.zip
ubuntu.14.04-x64 Portable 0.8.0 PackageReferenceEditor.Avalonia-ubuntu.14.04-x64.zip
win7-x64 Portable 0.8.0 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.