English 中文(简体)
Change namespace of a deployed clickonce application
原标题:

I made a bit of a namespace spelling mistake and I wish to correct it. My application currently uses Application.Settings to store a bulk of the user s information. If I refactor my namespace to be spelled correctly, will the application settings file essentially get wiped because it can t find the new namespace in it?

最佳回答

I believe that ClickOnce will see this as a different application, so yes, the application settings would be "lost". I had to do this once myself, and I lost all the settings. Users had to install it as a new application and set up their personal inf all over again.

I never gt a definitive answer on why this was, but here s my guess:

If ClickOnce behaved otherwise, it would be too easy for someone to replace your app with a malicious one of their own, so from a security perspective, this makes sense.

However, I could be wrong. You could try it, and see. If the settings are lost, you can always revert (assuming you re using source control).

问题回答

I ve never tried this before, but it looks like you should be able to just change the app.exe.config filename to your app s new name and it will read it just fine, assuming you can script that into your deployment.





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签