Contents tagged with Nuget
today I want to write few words about how to instal latest Nuget into Windows docker container. For this purpose you can use following commands:
RUN mkdir c:\NugetRUN Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/v4.1.0/nuget.exe' -OutFile 'c:\Nuget\nuget.exe'; \ $env:PATH = $env:PATH + 'c:\Nuget\;c:\Nuget'; \ Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $env:PATH more
today I want to document one simple trick. Recently I've configured docker container and faced following issue with nuget.
For nuget I've used following command from powershell:
nuget install MSBuildTasks -Version 18.104.22.168
Nuget installed MSBuildTasks, and I didn't know where exactly nuget placed file MSBuild.Community.Tasks.Targets. So, I needed to find it. With help of following command:
Get-ChildItem -Path C:\ -Filter MSBuild.Community.Tasks.Targets -Recurse
I was able to execute search on the whole drive C for the file MSBuild.Community.Tasks.Targets and successfully find where Nuget placed that file. more
today I want to describe some useful from my prospective commands for working with Nuget.
First of all, I want to say that you can work with Nuget as usually with usage of wizard, but if wizard fails for some unknown reason, console can give you interesting facts, that otherwise will be hidden from your eyes.
First step is how to find Nuget manager console?
You can use top right edit for opening nuget manager console, as shown at screenshot:
After console window is opened, you can try following combinations.
Get-Package -ListAvailable EntityFramework - search in all sources for library named Entity framework
In newer version of nuget ( 3.0 + ) you can use Find- … more