i guess this is a hard one (for me): we have requirements for a .net (web)project which should be used with differnent configurations for different customers.
Example: Cusomer A wants a compiled Version which includes a big part of the MainApplication but with some code excluded and开发者_如何学运维 two separate assemblies. Customer B wants the whole MainApplication with other assemblies and for example a different gui.
I did a smal research and concluded with the following settings:
- Using the configuration manager of VisualStudio for leading to different "builds", then
- building the project (including several configurations) and deploying it by using NAnt
- Excluding code or using different code with complie directives
We never did this before so i have some questions:
- is it possible to solve this with compile directives? (i can imagine that this point can grow very high complexity)
- are there better ways to fit this project (with .net)
Thanks
I'd suggest building a plugin system/architecture - assemblies can be loaded dynamically on-demand, based on configuration entries. You might need to write a separate tool to package up for deployment (i.e. including different assemblies in the bin folder), though.
Why don't you just create different solutions? They would share some assemblies and have some assemblies unique to solution.
You can have multiple server builds configured for each of these solutions in your TFS so it's easy to get a build of any configuration while still commiting to one source control. Same goes for any other build system you work with.
精彩评论