Strong name reusage with large number of projects
I am working for a big integration platform using Biztalk 2010 and VS2008 开发者_如何学编程SSIS packages. Each interface is stored in one team project (TFS2010). On the root of the team project each interface is created with its unique name and underneath a default basic branch plan structure has been created (with Main, Dev, Release + branches when applicable, see TFS branching guideance from ALM rangers).
The issue is that each interface needs a strong name key because we want to be SCA compliant as far as possible and signing is part of the checks.
I don't want each interface to have its own strong name key, but only one strong name key for all the interfaces.
What is the best practice to handle this kind of reusable strong name key handling ?
The best practice I've found so far is this:
- Create a new key file (e.g. MyProject.snk) through the VS command line, using
sn.exe -k MyProject.snk
- you should create the key file in the same folder as your solution. - Right click on the first project in the solution and select 'Add existing item...'
- Browse to the key file you've created - do not press add - press the little dropdown icon next to it and select add as link
- The key file will now be added as a link to the project - go to the project properties and your key file will now be selectable in the Signing tab.
- Copy and paste the linked key file into all the other projects (this just copies the link) and select it to be the signing key for each them in turn.
This way you have the same key associated to each project, and if you ever need to replace the key, you just have to change it in one place.
Edit: Sorry - just noticed that you're actually talking about multiple solutions - I would probably still take the same sort of approach, but have the key file under source control in a centralised location. VS should be able handle this and recognise that the key file is in your workspace at a different location.
create the key with sn tool or from vs adding it to your root directory, then every time you make a project strong named - refer to the same key file.
精彩评论