I develop a library and need to share it with my collegues.
I think to share it via nuget.
I create a local package source.
The library have dependency from log4net 1.2.14.0 (2.0.4)
On my machine, goes all right.
On the machine of one collegue of mine, nuget download have a strange behaviour.
When download the library from local storage, the version of log4net installed is always 1.2.11.0 (2.0.0). But in the .nuspec file i explicity declared the dependency from 1.2.14.0 log4net version.
If i install via nuget the log4net 1.2.14.0, and then my library, nuget skip the dependency from log4net and terminate the process correctly.
On my collegue machine there are not any version of log4net installed, nor the log4net dll is present in GAC.
Can someone point me in the right direction ?
Thanks in advance,
Giuseppe.
Related
In my solution I have a PCL project and two other projects, each for different platforms.
Sometimes a NuGet package used in PCL require installing it to the platform project as well, otherwise things will crash at runtime.
When I install the NuGet package, how do if it's also required to install it to the platform projects?
For example, it's not clear to me if Microsoft.Net.Http requires also installation in Xamarin Android project or not. This is just an example.
Or, I don't know if SQLite.Net-PCL requires it to be installed on platform projects as well.
Things you can do:
Read the documentation provided by the NuGet package author. Either from a project web site or in the description for the NuGet package.
Use your favourite search engine for examples of how to use that NuGet package.
If there are multiple NuGet packages that are named after the platform then that gives you an idea that the PCL NuGet package might not work in the platform specific project.
Have a look inside the NuGet package using something like the NuGet Package Explorer available on Windows. If the NuGet package has lib directories that are platform specific as well as a PCL directory then it will need to be installed in the platform specific project.
Run your application and see if it works.
Taking Microsoft.Net.Http as an example. The documentation does not really say explicitly. If you search the internet you can find a blog post or two that mentions that you have to install it into your platform specific project.
If you take a look inside the Microsoft.Net.Http NuGet package you can see it has several lib directories:
There are platform specific directories, such as MonoAndroid and Xamarin.iOS10 as well as PCL directories, such as portable-net45+win8. This suggests you should install it into all your projects.
I was given A Visual Studio project written that has a reference to the dll in the Windows GAC
Microsoft.Practices.Unity.dll 1.2.0.0
which I don't have installed on my machine
The same dll is not anywhere in the project directory.
I downloaded Enterprise Library V6 but the dll is version 3.0.1304.0
I was able to locate other dll versions
2.0.505.0
2.0.414.0
I change the references in the projects from 1.2.0.0 to a later version but the code isn't backward compatible so I need the exact dll version.
Where do I get this dll?
I googled for it but one I got is a virus, the other was 2.0.505.0
You can find it in the Unity Application Block 1.2:
https://www.microsoft.com/en-us/download/details.aspx?id=701
Once installed, the file is located under Microsoft Unity Application Block 1.2\Bin.
I decided to install all the Enterprise Library Installers to find which one contained that version.
The version it was in was Enterprise Library 4.1. I downloaded it and extracted it to a folder and was able to obtain the dll.
Link
Is Chocolatey a higher version of NuGet or a different package manager? Where should I put my open source application? NuGet or Chocolatey?
NuGet is designed to allow you to easily add code libraries to your project. Things like JSON.NET, Entity Framework, etc.
Chocolatey is actually built on top of the NuGet package system, but it is designed to fill a different need. Chocolatey wraps up applications and other executables and makes it easy to install them on your computer. For example, tools like Git, Notepad++, etc. can be easily installed with a command like cinst git.
https://chocolatey.org/packages has a list of all the applications that can be installed.
If you have an open source project which is a library that is to be used in other developers' projects, then you should submit it to NuGet.
If it is an application that users would normally install, then create a Chocolatey package that users can easily install and update from the command line.
I think I'm missing something here. I installed Tesdriven and then Gallio (third link from top - Gallio 3.5 x64 installer)
Then I installed the mbunit dlls from Nuget because I didn't want to include a dll from my hard drive as it makes it difficult for the project to be ported to other machines..
However, when I try to run a sample test, testrunner insists that I reference the dlls from my hard disk.. the actual error message is this:
It looks like you're trying to execute a Gallio/MbUnit unit test.
For Gallio v3.0.6 build 787 / Gallio v3.1 build 313 or above (recommended):
Please ensure that the directory containing your 'MbUnit.dll' reference also contains Gallio's
test runner files ('MbUnit.dll.tdnet', 'TDNet\Gallio.TDNetRunner.dll', 'Gallio.dll' etc.)
For earlier versions:
You need to install Gallio (after TestDriven.Net) using its MSI installer.
You can find Gallio downloads and support here:
http://www.gallio.org/
So, is there a way to get testrunner to run the tests with just nuget packages, please?
Currently nuget gallery has only 3.3.1 version of mbunit package, and you installed Gallio v3.4. It's very annoying limitation of gallio and mbunit. In order to use nuget package you have to downgrade Gallio on your machine to v3.3.1. Better solution it's mail to gallio/mbunit team and ask to upload nuget package with latest release or make it by yourself.
I just inherited a large enterprise system that appears to use NuGet.
I have just read the basics on what NuGet is so pardon the simpleness of my questions.
Is there a way to tell NuGet to update and install all the packages needed to run the system? I am right now running and seeing what fails then guessing what NuGet packages are missing.
(No, there was no documentation in the enterprise system or many code comments, ugh)
From the package manager console try Update-Package –Project ProjectName
Visual Studio -> Tools -> Library Package Manager -> Package Manager Console
http://nuget.codeplex.com/wikipage?title=Updating%20All%20Packages
If the solution is configured to enable Nuget Package Restore you could also just delete the packages folder and rebuild all which would get everything that you needed. If you need to worry about javascript, configuration, etc... I would try the Update-Package route