exam questions

Exam 70-487 All Questions

View all questions & answers for the 70-487 exam

Exam 70-487 topic 1 question 125 discussion

Actual exam question from Microsoft's 70-487
Question #: 125
Topic #: 1
[All 70-487 Questions]

DRAG DROP -
You develop a .NET Class Library project. You install the latest NuGet CLI tool, create an account on nugget.org, and receive an API key.
You need to create the NuGet package and publish the package to nuget.org. You open a command prompt and navigate to the folder which contains the project file.
Which four actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Step 1: Run the NuGet spec command
In the simple case of creating a package from an assembly, you can generate a .nuspec file from the metadata in the assembly using the following command: nuget spec <assembly-name>.dll
Step 2: Update the package identifier and version number
Choose a unique package identifier and setting the version number.
Step 3: Run the NuGet pack command
Running nuget pack to generate the .nupkg file
Step 4: Run theNuGet push command
Once you've created a package, which is a .nupkg file, you can publish it to the gallery of your choice. You can publish with dotnet nuget push command
References:
https://docs.microsoft.com/en-us/nuget/create-packages/creating-a-package https://docs.microsoft.com/en-us/nuget/create-packages/publish-a-package

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Karel_Gott
Highly Voted 5 years, 3 months ago
The answer is correct. 1. Create .nuspec file with nuget spec from your solution. 2. Update the package identifier and version number. From source https://docs.microsoft.com/en-us/nuget/concepts/package-versioning - "nuget.org rejects any package upload that lacks an exact version number. The version must be specified in the .nuspec or project file used to create the package." 3. Create package with help of .nuspec file by calling nuget pack. 4. Publish the created package by calling nuget push.
upvoted 8 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...