Hello David, Sorry I did not explain this properly. There are three projects within a VS solution:-
ISOTest - A simple windows form. Contains the public method which exposes the isolated storage. This is the main application in the example and is installed in the program folder by WIX. CustomAction - Contains a reference to the ISOTest assembly, hence is able to call "ISOTest.ExposeIsolatedStorage.GetIsolatedStorage()" The WIX project. I agree entirely with your comments about setting this up when the application first runs and had always done this in the past. The problem is really about uninstalling or deleting the ISO area when the application is removed. As I would have to remove the ISO during uninstall anyway, I thought I may as well create it on install as test of access to the target assembly ISO as each scenario would need access to the target assembly's ISO area. When VS provided a "InstallerClass" class which was part of the main assembly, this could be done simply on uninstall by calling IsolatedStorageFile.GetMachineStoreForAssembly() and then the Remove() method within the "InstallerClass". The whole motivation for using WIX was that VS2012 does not provide a decent deployment system apart from Installshield LE which did not satisfy our requirements. Unless I'm missing something, the whole MS Isolated storage system, although often encouraged, seems very difficult to work with especially during an uninstall or if wishing to migrate settings during an upgrade. Cheers, Paul -----Original Message----- From: David Watson [mailto:dwat...@sdl.com] Sent: 31 March 2014 17:13 To: General discussion about the WiX toolset. Subject: Re: [WiX-users] Creating Isolated Storage for main assembly during it's install. Ideally configuration like this should be done at first run by your application. Your installer should deploy the config file in a safe place under your installation folder somewhere where it is not in use then it should be copied to the live location during configuration by the application. This way you can patch or update the config file without having the headache of working out if it has changed by the user. All the complex logic can go in your application. Doesn't answer your question though. How are you accessing the public methods of the .exe from your custom action, it may this binding that's going a bit weird? -----Original Message----- From: paul.chor...@stfc.ac.uk [mailto:paul.chor...@stfc.ac.uk] Sent: 31 March 2014 16:06 To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Creating Isolated Storage for main assembly during it's install. Hello Carter, Thanks for your quick reply, unfortunately this does not work as the problem is not with the preconfigured XML file, but with which executable owns the ISO area after its created by the installer. (C# Custom Action or ISOTest.exe). This can be observed from the "store.AssemblyIdentity" property. The if (File.Exists("RemotingConfig.xml")) test was merely to test that the file was included in the project build. In a DEBUG build (where "store.AssemblyIdentity" = ISOTest) the C# Custom Action (separate project in the solution) creates an ISO area by calling the target assembly's "ISOTest.ExposeIsolatedStorage.GetIsolatedStorage()" method and produces an ISO which IS accessible to the ISOTest.exe application after installation. The Custom Action also copies the pre-configured "RemotingConfig.xml" file to that area. So everything is OK for this build. In a RELEASE build (where "store.AssemblyIdentity" = CustomAction) the C# Custom Action (separate project in the solution) creates an ISO area by calling the target assemblies "ISOTest.ExposeIsolatedStorage.GetIsolatedStorage()" method and produces its own ISO which is NOT accessible to the ISOTest.exe application after installation. The Custom Action also copies the pre-configured "RemotingConfig.xml" file to its own area, but obviously ISOTest.exe cannot access area. There is some difference between the DEBUG & RELEASE builds in VS that affects this which I cannot find or understand. Cheers, Paul -----Original Message----- From: Carter Young [mailto:ecyo...@grandecom.net] Sent: 31 March 2014 14:48 To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Creating Isolated Storage for main assembly during it's install. Change: try ... isoFileStream = new IsolatedStorageFileStream("RemotingConfig.xml", FileMode.Create, store); to: try ... isoFileStream = new IsolatedStorageFileStream(String.Concat(Application.StartupPath,"RemotingConfig.xml", FileMode.Create, store)); Or add: if not File.exists(String.Concat(Application.StartupPath,"RemotingConfig.xml") { file.create(String.Concat(Application.StartupPath,"RemotingConfig.xml") isoFileStream = new IsolatedStorageFileStream("RemotingConfig.xml",FileMode.Create, store); } else { isoFileStream = new IsolatedStorageFileStream("RemotingConfig.xml",FileMode.Create, store); } Carter ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Scanned by iCritical. ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users SDL PLC confidential, all rights reserved. If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us. SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK. This message has been scanned for malware by Websense. www.websense.com ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Scanned by iCritical. ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users