0

I am in process of setting up a whole series of NuGet packages for our framework. Beside the simple binary-packages (.dll's for modules of the framework) there are also packages that deliver source-code into the projects that are using them done with the \content directory in the NuGet package.

To develop this source-code I have a test-/sandbox project. I develop/debug/fix the code in this peoject and if its final for the next release, I copy it over to the package's content-folder where I replace things like $rootnamespace$ etc. This needs to be done for each and every version of the package.

Another way is to keep only the final source with the $rootnamespace$ tags in it and maintain that directly. But then testing/debugging would be done by re-adding the package to a test-project and debug it there, go pack to the package content, modify it, re-build and re-add and test it again.

So I see two ways to maintain the content-sourccode (none of them is really good):

  • Keep source-code in \content as small as possible and deploy as much as possible as binaries.

  • Generate the \content using some transformation engine (eg. T4) from the sandbox/dev-project. What engine would be best to use for this?

In short: I didn't find a good workflow yet to maintain the "content" source-code of NuGet packages. How are you guys doing this? Any ideas for that workflow?

Marc
  • 4,715
  • 3
  • 27
  • 34

1 Answers1

1

Check the http://github.com/maartenba/MvcSiteMapProvider build. It is customized quite a bit but basically does a find/replace on several namespaces and replaces them with replacement tokens right before packaging.

maartenba
  • 3,344
  • 18
  • 31
  • Thanks for the input. If I got you right, you re-build your \content source-code based on your dev code every time a package get packed and automatically insert the replacement-tokens? – Marc Feb 04 '14 at 09:20
  • 1
    That'scorrect. It allows for easy testing it in a project, and the find/replace facilitates creating the package. Haven't found a cleaner way to do this... – maartenba Feb 04 '14 at 09:30