Using NutGet for package managing IoC applications rather than VS projects

Topics: General
Dec 11, 2013 at 7:02 PM
Edited Dec 12, 2013 at 1:06 AM
Nuget currently assumes that all dependencies are declared at compile time, so it expect a developer to use Visual Studio and package dependencies gets added to a project's reference list.

In reality, with IoC in mind, a lot of dependencies can be declared after an application has been deployed, by dropping in dependent dlls to the bin folder, and updating the app.config file.

Here is an example:

Tracing in C# is done by calling System.Diagnostics.Trace.WriteLine(...), whats actually being done with the trace data is not determined at compile time, a developer or system admin decides that using the app.config.

We created a custom trace listener that depends on other nuget pacakges. Since Trace Listeners can be added to an application without the need to recompile the application, so currently a developer needs to grab all dependencies of this custom listener from a designated folder, add them to the bin folder of the application, and update the app.config file. What if the nuget packaged used by this listener has been updated? we need to redeploy the updated and its dependencies to all applications using our custom trace listener.

We want to make it easy for other developers in our organization to use this custom listener, by publishing our custom listner as a nuget package. The developer only needs to find the package in the nuget repository, tell nuget to add the files to the selected application. and all dependencies and config updated will be managed by nuget just like in visual studio.

The only difference between nuget for visual studio project and nuget for applications is that instead of adding references to a selected project file, it actually places the files into the bin dir of the selected app folder.