Skip to content

Commit a5948d4

Browse files
committed
[Docs] Updated README with pack .nupkg errors
1 parent cd5f0cc commit a5948d4

File tree

1 file changed

+33
-20
lines changed

1 file changed

+33
-20
lines changed

README.md

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ This is a **nuget/paket** main scaffold component to create others packages
1515
* ### [Paket](https://fsprojects.github.io/Paket/index.html)
1616
> Integrated with [Nuget](https://www.nuget.org) to manage dependencies, with more clear files and allow use **Git** dependencies
1717
18-
1918
## Getting Started
2019

2120
### 1. Install [.NET Core](https://cakebuild.net/docs/tutorials/getting-started)
@@ -34,7 +33,7 @@ This is a **nuget/paket** main scaffold component to create others packages
3433
Use [Chocolatey](https://chocolatey.org/)
3534

3635
```bash
37-
choco install nuget.commandline
36+
choco install nuget.commandline
3837
```
3938

4039
#### 2.1 Install [Azure Artifacts Credential Provider](https://github.com/microsoft/artifacts-credprovider)
@@ -53,36 +52,38 @@ Use [Chocolatey](https://chocolatey.org/)
5352
Use [.NET Core tools](https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools#install-a-local-tool) to install **paket** command line locally
5453

5554
```bash
56-
dotnet tool restore
55+
dotnet tool install -g paket
5756
```
5857

58+
**PS:** Install globally if you will use paket in others projects. You can use globally also if your project not use .NET Core.
59+
5960
#### 3.1 Install Azure pipelines CLI (OPTIONAL)
6061

6162
Use [Chocolatey](https://chocolatey.org/)
6263

6364
```bash
64-
# Install base Azure CLI (command line)
65-
choco install azure-cli
65+
# Install base Azure CLI (command line)
66+
choco install azure-cli
6667
67-
# Install Azure Devops extensions
68-
az extension add --name azure-devops
68+
# Install Azure Devops extensions
69+
az extension add --name azure-devops
6970
```
7071

7172
### 4. Install all DEPENDENCIES and restore references
7273

7374
```bash
74-
dotnet paket restore
75-
dotnet restore
75+
paket restore
76+
dotnet restore
7677
```
7778

7879
### 5. Build and test the solution
7980

8081
```bash
81-
# Build the solution
82-
dotnet build
82+
# Build the solution
83+
dotnet build
8384
84-
# Run all tests
85-
dotnet test
85+
# Run all tests
86+
dotnet test
8687
```
8788

8889
## Project structure
@@ -115,15 +116,23 @@ Your project folders structure should be:
115116
2. Genarate the ```.nupkg``` file
116117

117118
```bash
118-
# Pack your component to the path nugets/*.nupkg
119-
dotnet pack --include-symbols --configuration Release --output nugets [your-component-project]
119+
# Pack your component to the path nugets/*.nupkg
120+
dotnet pack --include-symbols --configuration Release --output nugets [your-component-project]
120121
```
121122
> **PS:** If you not pass the **_--outputs_** flag, the ```.nupkg``` file is generated in: ```[your-component-project]/bin/Release``` by default
122123

123124
Or use Visual Studio and right click on your project component under Solution explorer, and click **Pack**.
124125

125126
![component-pack-nupkg](./images/component-pack.png)
126127

128+
### Error "Pack Task"
129+
130+
If you got a `Pack task` error with .NET Core CLI or in **Visual Studio**, use [`Paket pack`](https://fsprojects.github.io/Paket/paket-pack.html) command:
131+
132+
```bash
133+
paket pack --template [your-component-project]\[your-component-project].csproj.paket.template --build-config Release --symbols nugets
134+
```
135+
127136
## Testing your package locally
128137

129138
### Create a local feed "server"
@@ -133,7 +142,7 @@ Your project folders structure should be:
133142
Publish the package to local repo using `nuget add`:
134143

135144
```bash
136-
nuget add [my-component.{version-number}].nupkg -source [your/local-repo/directory]
145+
nuget add [my-component.{version-number}].nupkg -source [your/local-repo/directory]
137146
```
138147

139148
### Add the package/component to a application
@@ -174,14 +183,14 @@ Your project folders structure should be:
174183
5. Restore the project to provide authentication
175184

176185
```bash
177-
nuget restore
186+
nuget restore
178187
```
179188

180189
6. Push to the **Azure Artifacts** feed
181190

182191
```bash
183-
# See the nuget.config file <packageSources> tag
184-
nuget push -Source "[your-feed-name]" -ApiKey az [path/to/nupkg-file].nupkg
192+
# See the nuget.config file <packageSources> tag
193+
nuget push -Source "[your-feed-name]" -ApiKey az [path/to/nupkg-file].nupkg
185194
```
186195

187196
## Install remote package to an application
@@ -205,7 +214,7 @@ Your project folders structure should be:
205214
# [YourAppProject]: Is project name inside of the solution, that to use this dependency like a reference
206215
207216
## Using dotnet core
208-
dotnet paket add --project [YourAppProject]/[YourAppProject].csproj {YourComponent.PackageIdName}
217+
paket add --project [YourAppProject]/[YourAppProject].csproj {YourComponent.PackageIdName}
209218
210219
## Using .NET Framework
211220
.\.paket\paket.exe add --project [YourAppProject]/[YourAppProject].csproj {YourComponent.PackageIdName}
@@ -242,3 +251,7 @@ Your project folders structure should be:
242251
> **`Right click`** on References under the component **`project => Manage Nuget Packages`**
243252

244253
5. On the next screen, search by the **packageId** and click on **`Install`** button
254+
255+
## Problems and workarounds
256+
257+
See the wiki pages in: [CsharpComponentBase Wiki](https://dev.azure.com/opitblast/CsharpComponentBase/_wiki/wikis/CsharpComponentBase.wiki/1/Known-issues)

0 commit comments

Comments
 (0)