While installing this application on a client machine using ClickOnce, it never ask you for an installation path and it copies the files into two different folders with random names! Mine looked like this:
C:\Users\Administrator\AppData\Local\Apps\2.0\CA5NQ9ZB.N44\E6TLT686.69V\visi..vsto_11aeaa34550a68ee_0001.0000_14f3717c0aa57ea0
C:\Users\Administrator\AppData\Local\Apps\2.0\CA5NQ9ZB.N44\E6TLT686.69V\visi...dll_11aeaa34550a68ee_0001.0000_none_47ef10bd354219e1
And the frustrating thing is that all dlls gets copied to the first folder and the data files to the other. So my application never found the file it needed to load and I had no idea on how to solve this as the folder names kept changing randomly with every new deployment. I think these are some caching locations and the application dlls were not available anywhere else. Do anybody know what is happening here and what is the solution?
Finally I made my Deployment work by making the data file as an embedded resource (Properties > Build Action) and reading the data as below:
Stream resourceStream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(MyNamespace.MyClass.MyFile.xml");
TextReader tr = new StreamReader(resourceStream);
No comments:
Post a Comment