October 23, 2009, 10:19
UPDATE:
I found a msdn forum post with exactly the same issue: http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/42647eff-ecb8-412c-a884-a152b6fdd40d
It turns out that it is NOT msbuild but it is SN.exe leaving the temp files behind when resigning assemblies. I suppose you could easily come to this conclusion when watching the build and those files are flashing by so quickly.
On reflection a custom task will not help either…
This post has more details on the issue with a link to a hot fix for Server 2003: http://blogs.msdn.com/pfedev/archive/2008/10/24/sn-exe-and-empty-temp-files-in-temp.aspx
If you are using Server 2008 I would not recommend installing it.
Continue reading ‘MSBuild creating lots of temp files’ »
April 27, 2009, 09:52
As an idea that compliments the previous validator I built, this msbuild task will search for all the projects in a given path and check that they are all building to the correct path.
Download source
To use just define two properties: SearchPath, which is the parent folder to start looking in. It will search all subfolders as well by default. And BuildFolder, which is the desired target for building to.
All it does is very simple substring matching to check that it is valid.
For example, if I build a project to ..\bin\Debug and ..\bin\Release and the specify my build folder is ..\bin then both paths are valid. But if one of the build targets was set to something like ..\foo then it would be invalid
Again, this validator could be extended to check other parts of the project files.
April 25, 2009, 13:52
Due to a really subtle problem with our build scripts and project settings at work, we were releasing a debug assembly.
So I built this MSBuild task to validate the assemblies after they have been built.
Download Source
It is very simple to use.
Create a property called ExpectedConfiguration that has the configuration.
Create inclusion and exclusion item groups called AssemblyInclusions and AssemblyExceptions.
Then use the ValidateAssemblies target.
It will then look for all assemblies and validate each ones configuration attribute.
This could be extended to validate assemblies much more extensively, like checking publisher and copyrigth details etc