MSBuild, csproj and props package reference editor.
Перейти к файлу
wieslawsoltes e2ab752f16 Use 0.8.2 2019-08-09 13:48:39 +00:00
build Use 0.8.2 2019-08-09 13:48:39 +00: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 Added PackageId to csproj 2019-05-25 21:07:10 +02:00
tests/PackageReferenceEditor.UnitTests Update PackageReferenceEditor.UnitTests.csproj 2019-02-01 19:22:37 +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 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 Use Microsoft.NETFramework.ReferenceAssemblies 2019-05-04 14:10:13 +02:00
README.md Updated version 2019-04-04 07:07:17 +00: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-08-08 10:33:19 +02: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.