andrewdavey/cassette — pull request #391 by Daniel15 (2013-07-08 04:50:25+00:00)
Title: Add option to isolate storage container to AppDomain rather than to assembly.

This fixes the "System.IO.IOException: The process cannot access the file 'manifest.xml' because it is being used by another process." issue when the one ASP.NET application is mapped to more than one IIS application, and two worker processes try to rebuild the bundles at the same time.

This is the original exception:
```
System.Exception: Bundle collection rebuild failed. See inner exception for details. ---> System.IO.IOException: The process cannot access the file 'manifest.xml' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath)
at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, IsolatedStorageFile isf)
at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, IsolatedStorageFile isf)
at System.IO.IsolatedStorage.IsolatedStorageFile.OpenFile(String path, FileMode mode, FileAccess access, FileShare share)
at Cassette.IO.IsolatedStorageFile.Open(FileMode mode, FileAccess access, FileShare fileShare)
at Cassette.Caching.BundleCollectionCacheWriter.OpenManifestFileForWriting()
at Cassette.Caching.BundleCollectionCacheWriter.WriteManifestFile(Manifest manifest)
at Cassette.Caching.BundleCollectionCache.Write(Manifest manifest)
at Cassette.CacheAwareBundleCollectionInitializer.WriteToCache()
at Cassette.CacheAwareBundleCollectionInitializer.Initialize(BundleCollection bundleCollection)
at Cassette.RuntimeBundleCollectionInitializer.Initialize(BundleCollection bundles)
at Cassette.ExceptionCatchingBundleCollectionInitializer.Initialize(BundleCollection bundleCollection)
--- End of inner exception stack trace ---
```