I tried using the AjaxMinManifestTask in my SharePoint project in the AfterLayout target in MSBuild in order to minify my scripts in the "pkg" folder structure that is later packaged into deployable WSP-files. This caused the build process to fail with an error message saying that the manifest file was being used by "another process".
I downloaded the code and noticed when debugging and monitoring the file handles with process monitor that the file handle for the manifest file isn't closed when the XmlReader is disposed. After changing the try-catch to a using-block for the StreamReader object, the file handle is closed properly when exiting the outer using-block.
This does, however, cause the code analysis to warn about objects getting disposed twice.
Comments: ** Comment from web user: ronlo **
I downloaded the code and noticed when debugging and monitoring the file handles with process monitor that the file handle for the manifest file isn't closed when the XmlReader is disposed. After changing the try-catch to a using-block for the StreamReader object, the file handle is closed properly when exiting the outer using-block.
This does, however, cause the code analysis to warn about objects getting disposed twice.
Comments: ** Comment from web user: ronlo **
Fixed in 5.3