Comments
5 comments
-
That's cool, I'd be keen to take a look at it, I've never used T4.
You don't need to do the exclusion lists for pruning and obfuscation, I would use custom attributes in the code for that.
If you made it work reliably, I'd definitely sticky your forum post and maybe if you wanted we could link to it from the online help. -
Sure, I'll prepare a download package with description. I was thinking about using attributes for exclusions, probably the best solution anyway.
Probably one could easily turn this into an extension for VS to make it work even more transparent. -
Ha, have you written a vs addin before?
-
When I look at the amount of addins available for VS2010 I get the impression that it cant be so hard, but then again I might be wrong. But probably I will give it a try when I have a spare hour or so.
-
Ok, took a bit longer as I had to resolve some reflection dll locking problems 8)
Here it is, read the HowTo.txt included in the zip for instructions. And requests or complaints please PM me.
http://df.uniwares.com.br/amanda/CTA75SE8LD
Add comment
Please sign in to leave a comment.
since I am working with SA often on larger solutions where some assemblies have references to 20 or more other assemblies, I also swear often enough about the way SA uses its project files.
Not much fun when you have to update a bunch of project files with references and settings, then do a build on the build server just to find out that some settings didn't work out, or some references are not found, etc.
So, to set an end to my personal dilemma, I looked for a solution and came up with one that will generate the .saproj file automatically on every build.
It basically works by using VS2010's Text Templating (T4) functionality combined with assembly level attributes.
You can define the SA settings for your assembly like this in your AssemblyInfo.cs file:
Only needs to include a reference to a type-only assembly which defines the SA.* attributes
Before building, the .tt file recreates the .saproj file by reading project information from the current project, resolves assembly references, etc.
This is still work in progress and I am wanting to see if there is interest in a tool like that.
Current features are:
* automatic SA project creation
* detection of code signing and appropriate SA settings
* setting company and application names from the assemblyinfo
* setting SA options through attributes in the AssemblyInfo.cs
* resolution of all references and inclusion into project with full info and path, excluding system references
* a static reference include file (used for standard SA references but can accommodate others too)
Not supported (yet) is:
* exception lists for pruning and obfuscation
* C++ and web projects
I didn't test it yet with VB but it should work too.
If you need any advanced SA features you still can use the tool and modify the created project file by hand or load it into the SA GUI app.
Anyone interested?