Skip to content

Commit

Permalink
* NEW: Added /p:wpath key to define working directory.
Browse files Browse the repository at this point in the history
* NEW: Support of executable package.
* NEW: MSBuild searcher.
  • Loading branch information
3F committed Jun 27, 2016
1 parent 176c9e8 commit aead668
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 27 deletions.
89 changes: 64 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# GetNuTool

The lightweight non-binary tool for work with NuGet packages via basic MSBuild Tool (msbuild.exe without additional extensions etc.)
The lightweight non-binary tool for work with NuGet packages via basic MSBuild Tools (without additional extensions etc.)

```bash
> gnt
> msbuild.exe gnt.core
```

**Download:** [/releases](https://github.com/3F/GetNuTool/releases) ( [latest](https://github.com/3F/GetNuTool/releases/latest) )

Demo projects:
* Available: *Full version, Compact version, Compiled variant, Executable version*

* [![](https://img.shields.io/badge/build143-passing-brightgreen.svg?style=flat-square)](https://ci.appveyor.com/project/3Fs/vssolutionbuildevent/build/build-143) [GetNuTool v1.3 `get` & `pack` commands in use](https://ci.appveyor.com/project/3Fs/vssolutionbuildevent/build/build-143)
Demo project: [![](https://img.shields.io/badge/build143-passing-brightgreen.svg?style=flat)](https://ci.appveyor.com/project/3Fs/vssolutionbuildevent/build/build-143) [GetNuTool v1.3 `get` & `pack` commands in use](https://ci.appveyor.com/project/3Fs/vssolutionbuildevent/build/build-143)

## License

Expand All @@ -28,15 +29,15 @@ The [MIT License (MIT)](https://github.com/3F/GetNuTool/blob/master/LICENSE)

### For what

Firstly, **it's not for** adding libraries for your projects (use standard nuget clients). This to providing tools for additional maintenance of your projects and libraries, building processes, debugging, and similar. For all that should be used as a tool for all projects (solution-level) or for each.
Mainly, it's not for adding libraries for your projects (see standard nuget clients). This to providing tools for additional maintenance of your projects and libraries, building processes, debugging, and similar. For all that should be used as a tool for all projects (solution-level) or for each.

#### Restoring packages inside Visual Studio IDE

The GetNuTool can't use events from Visual Studio by default. However, it can be combined with other our tool for complex work with **a lot of events** of VS IDE & MSBuild:
The GetNuTool can't use events from Visual Studio **by default**. However, it can be combined with other our tool for complex work with **a lot of events** of VS IDE & MSBuild:

* [vsSolutionBuildEvent](http://vssbe.r-eg.net) - [0d1dbfd7-ed8a-40af-ae39-281bfeca2334](https://visualstudiogallery.msdn.microsoft.com/0d1dbfd7-ed8a-40af-ae39-281bfeca2334/)

So you can use this as you want, for example, to automatically getting tool above for work with complex scripts with MSBuild Tool and Visual Studio as unified engine., etc.
So you can use this as you want, for example, automatically getting tool above for work with complex scripts with MSBuild Tool and Visual Studio as unified engine., etc.

## Commands

Expand All @@ -46,20 +47,21 @@ The `get` command is used by default. For getting & extracting packages. You can

Settings:

Property | Description
---------|------------
ngconfig | Where to look the packages.config files.
ngserver | NuGet server.
Property | Description
-----------|------------
ngconfig | Where to look the packages.config files.
ngserver | NuGet server.
ngpackages | List of packages. Uses first if defined, otherwise find packages.config
ngpath | Common path for all packages.
ngpath | Common path for all packages.
wpath |`v1.4+` To define working directory.

Samples:

```bash
> msbuild.exe gnt.core /p:ngpath="special-packages/new"
> msbuild gnt.core /p:ngpath="special-packages/new"
```
```bash
> msbuild.exe gnt.core /p:ngconfig=".nuget/packages.config" /p:ngpath="../packages"
> msbuild gnt.core /p:ngconfig=".nuget/packages.config" /p:ngpath="../packages"
```

#### Format of packages list
Expand Down Expand Up @@ -111,35 +113,47 @@ Property | Description
---------|------------
ngin | To select path to directory for packing with `.nuspec` file.
ngout | Optional path to output the final `.nupkg` package.
wpath |`v1.4+` To define working directory.

```bash
> msbuild.exe gnt.core /t:pack /p:ngin="path to .nuspec"
> msbuild.exe gnt.core /t:pack /p:ngin="path to .nuspec" /p:ngout="path for .nupkg"
> msbuild gnt.core /t:pack /p:ngin="path to .nuspec"
> msbuild gnt.core /t:pack /p:ngin="path to .nuspec" /p:ngout="path for .nupkg"
```

## Properties

Property | Values | Description
---------|--------------------------|------------
debug | false (by default), true | v1.3+ To display additional information from selected command.
debug | false (by default), true | `v1.3+` To display additional information from selected command.

## Examples

*note: `v1.4+` also provides executable variant of GetNuTool.*

```bash
> gnt /p:ngpackages="DllExport"
> msbuild gnt.core /p:ngpackages="DllExport"
```

> msbuild.exe gnt.core
> msbuild.exe gnt.core /p:ngpackages="7z.Libs/15.12.0;vsSBE.CI.MSBuild/1.5.1:../packages/CI.MSBuild"
```bash
> msbuild gnt.core
> msbuild gnt.core /p:ngpackages="7z.Libs/15.12.0;vsSBE.CI.MSBuild/1.5.1:../packages/CI.MSBuild"
```

```bash
> msbuild.exe gnt.core /t:pack /p:ngin="D:\tmp\7z.Libs"
> msbuild.exe gnt.core /t:pack /p:ngin="D:\tmp\7z.Libs" /p:ngout="newdir/"
> msbuild gnt.core /t:pack /p:ngin="D:\tmp\7z.Libs"
> msbuild gnt.core /t:pack /p:ngin="D:\tmp\7z.Libs" /p:ngout="newdir/"
```

#### Paths to msbuild.exe
#### Paths to MSBuild Tools

*just a note where to find the msbuild tool by default:*
Use our MSBuild searcher - [msbuild](https://github.com/3F/GetNuTool/blob/master/msbuild.bat) for more convenience.

*but, just a note where to find the msbuild tool by default:*

* All available versions on your machine: `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions`

for example:
```bash

"C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe"
Expand All @@ -152,13 +166,17 @@ C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe

## Compact version

Use our compressor from [here](https://github.com/3F/GetNuTool/tree/master/compact) if needed.
To build manually this version, you should use our compressor from [here](https://github.com/3F/GetNuTool/tree/master/compact) if needed.

Currently compact version ~4 Kb for `get` command and ~4 Kb for `pack` command, i.e. ~8 Kb in total.

```bash
> msbuild.exe .compressor
> msbuild.exe .compressor /p:core="path to core" /p:output="output file"
> compress
```

```bash
> msbuild .compressor
> msbuild .compressor /p:core="path to core" /p:output="output file"
```

## Compiled variant
Expand All @@ -169,3 +187,24 @@ The GetNuTool now is part of [NuGetComponent](http://vssbe.r-eg.net/doc/Scripts/
#[NuGet gnt.raw("/t:pack /p:ngin=\"D:\7z.Libs\"")]
...
```

## Executable version

The `gnt.bat` is already contains `gnt.core` logic. It stored **inside script**.

To build manually this version, you should use our packer from [here](https://github.com/3F/GetNuTool/tree/master/wrapper) if needed.

```bash
> packing
```

```bash
> msbuild wrapper/.packer /p:core="path to compact core" /p:output="output file"
```

Then you can use simply:

```bash
> gnt /p:ngpackages="vsSBE.CI.MSBuild"
```
**note:** you do not need the `gnt.core` or something else ! the final script provides all of what you need as non-binary tool ~10 Kb.
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
GetNuTool
____________________

[v1.4]
* NEW: Added `/p:wpath` key to define working directory.
* NEW: Support of executable package.
* NEW: MSBuild searcher.

[v1.3]
* NEW: Added `/p:debug` to display additional information from selected command.
* CHANGED: Compact output for processed files.
Expand Down
4 changes: 2 additions & 2 deletions gnt.core
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!--
GetNuTool - github.com/3F/GetNuTool
========================
The lightweight non-binary tool for work with NuGet packages via basic MSBuild Tool (msbuild.exe without additional extensions etc.)
The lightweight non-binary tool for work with NuGet packages via basic MSBuild Tools (without additional extensions etc.)
https://github.com/3F/GetNuTool/blob/master/README.md
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Expand Down Expand Up @@ -344,7 +344,7 @@
<Target Name="Build" DependsOnTargets="get" />

<PropertyGroup>
<GetNuTool>1.3</GetNuTool>
<GetNuTool>1.4</GetNuTool>
</PropertyGroup>
<Target Name="header">
<Message Text="%0D%0AGetNuTool - Version: $(GetNuTool)%0D%0A=========%0D%0A" Importance="high" />
Expand Down

0 comments on commit aead668

Please sign in to comment.