ClickOnce and UserSettings - deployment

Ok, I have a ClickOnce app that I'm testing and I ask the user for a couple of pieces of information the first time they use load the app; Customer Id and Name. I then set the Properties so that they'll be saved across sessions. The property is Properties.Settings.Default["Customer ID"] and similar for name.
So I uninstall the application through control panel and reinstall the application but the settings are still there! I go and find all directories for my application and delete out the settings but the application acts like it still has them. I can even step through the debugger and see that they are still there.
How do I get rid of them all? This is very frustrating since it makes it almost impossible to test new data and to debug any first time installs.
Thanks...

I believe the user config values are stored in this location:
%APPDATA%\<AppName>\<AppName><AppConfigName_GUID>\<AssemblyVersion>\user.config
Have you checked there?

ok, in case anyone has the same problem in the future. I had set the properties in Visual Studio through the Settings.settings editor. I removed them and everything was normal again...

In answer to the general problem of removing settings when the program is reinstalled, you could add unique piece of data as well, such as the date of the executable, its checksum, or something similar.
Then check that against the saved data when you program starts. If they don't match, it's a reinstall and you can delete the stored data.

Related

Changes in Umbraco CMS does not update at front-end instantly

I have an issue in updating contents in Umbraco. Whenever I update something in Umbraco, I have to wait at least one hour, sometimes 12 hours to see the changes at front-end.
The only way to see the changes immediately at front-end is "empty the connection string value umbracoDbDSN and refresh the page, then put the connection string back and refresh the page". I have to do everything I update something in CMS.
Do you guys have any idea what is happening here? Thanks.
The problem was. Umbraco was configured to run on load balanced servers on our old servers. I had to turn it off on the new server.
<distributedCall enable="false"> in umbracoSettings.config
What version are you running? When v5 first came out, I had a big problem with that (and solved it like you by touching the web.config to force a reset. Hopefully you are not using v5 (as its been discontinued and has extreme performance issues).
I have not had that problem in any v4.x versions that I can remember; changes should show up instantly after you republish.
Are you running in a standard configuration? Using a webfarm by anyt chance?
Is the ~/App_Data/umbraco.config file being written to on publish? This is the XML cache file that is used in displaying you website.
When you publish a node, the data is serialized into XML, stored in a database table and then written out to the umbraco.config cache.
This could be some kind of permissions issue, if umbraco doesn't have rights to read/write the file. Or you could have a corrupt dll that just isn't writing to it correctly. Or perhaps it's writing it out just fine, but your server is caching you pages in a weird way. Either way, I'd take a look first at the umbraco.config and make sure the data is being written to it on publish.

How to properly delete and re-add Entity Data Model

newbie to Entity Framework here. Using VS 2010 and SQL Server 2008 express DB.
I was having trouble refreshing an Entity Data Model after adding new tables. So, I followed a suggestion I found here to just delete and regenerate the model.
I get to the "Choose Your Data Connection" section of the Entity Data Model Wizard and "Save entity connection settings in Web.config as:" is checked. However, my existing name has a 1 appended to it. For example MyDatabaseEntities is now MyDatabaseEntities1. Of course, I don't want the "1" appended. I killed the existing connection string in Web.config and removed all references to that name in my solution. Yet when I try to continue I'm presented with the following error:
"'MyDatabaseEntites' conflicts with an existing property name in the Application Settings. Please choose a different name"
I can't find a reference to that name anywhere in the solution. I can uncheck that option and it will continue, but it STILL won't add two of the tables in the database. Next, I completely shut everything down, rebooted, and tried again. This time I didn't get the error above, but two of my three new tables still do not get added to the edmx model.
Any ideas are appreciated. Also this seems like it's still pretty buggy even in VS2010/.NET 4. Help restore my faith...I feel like abandoning Entity Framework at this point. Based on my experience so far and some of the other issues posted here, I feel like I'm going to spend more time chasing Entity Framework strangeness than writing useful code.
UPDATE: I found a resolution. The designer doesn't display errors. You have have to look in the native XML (edmx file) to see the errors. See here: ADO.NET Entity Framework: Update Wizard will not add tables
The error is caused by leftover connection strings in settings in "App.Config" file (see solution explorer) and it's in this section:
"connectionStrings" (surrounded by angle brackets)
Just delete it from there.
Restart IIS if you develop web app.
Restart Visual Studio After Deleting The EntityDataModel Connection
String Line from web.config or app.config
Add New Entity Data Model and rename it like old name,
I don't know the specific answer to your problem, but I think I can recommend an approach that will clear up this conflict.
I generally break my EF work into a separate library. If I'm working on Cyberdyne.Terminator, I make an EF class library called Cyberdyne.Terminator.Data. That way, if you want to blow away the model and start over, everything is separate from your dependent files, and in particular, your web.config.
None of this is likely to fix the missing tables, probably. The one thing I've seen where this happens is if I add a table, and then delete it. It will not appear again in the "Add Tables" dialog (and you have to rename it to get it to show). But I thought that was fixed in EF 4.0. Dunno. If the problem persists you might try renaming the table, re-adding it, and then renaming it back if it shows up.
EF is a pain in the ass to be sure. The only thing I can tell you is that I've generally had to work through these headaches, learn the issue, and never be bothered by them again. If you can't stand EF, you might also look at NHibernate - I have a very strong impression of that as well.
Double check your connection strings, and keep scrolling to the right. Most often, when this happens to me, Visual Studio has appended a connection string behind another. I've done this a couple times, and wondered where my app config was (no, there is no app config, just web config in mvc), so the dialog is a little confusing. Sure enough, most likely that connection string is lurking directly behind another!
Just press
Ctrl+F
keys and in dropdown list select 'EntireSolution/CurrentProject', then press enter. where ever this name generated it will show you.
I get into web.config file. so delete that generated complete connection line from there. and re add it again. Then hope you may not get this message again.Thank you..
Actually this is frustrating, since you trying to see in app.config that if there's a another string and you see only 1 string, Actually What VS does is sometimes append second string in the same line. see this picture below
Does it look like there are 2 ConnectionStrings? (ACTUALLY YES)
Now, see this pic:
Also you can press Ctrl+ED to format the config file and see if there's another second string hiding somewhere. Hope this will help someone.
im so sorry for my english
but the solution is simply.
you have to delete the ado.net
then, go to app.conf and delete the connection string<>,
DEBUG your project and finally add the new database through ado.net
TO ADD ADO.NET
RIGHT CLICK ON YOUR PROJECT NAME, THEN, ADD NEW ITEM, DATA AND SEARCH ADO.NET...
I hope help you, have good day!
angelsantacruzm

How to change iPhone App name 100%!

Can't seem change the name of my iPhone app 100%.
I followed multiple threads and performed the outlined methods below, but the old name keeps popping back up in Console. I'm concerned that on some deeper level the app's name has not really been changed 100%.
My concern is with the fact that I've made a "Lite" version by starting with a copy of the "Full" version. So I don't want the device to get confused if my customers upgrade and download the full version and the device see two apps with the same "CORE or ROOT" name.
Console continues to output:
2010-07-03 10:56:35.129 *OldAppName* [45672.207] Test Message
I have changed the Product_name, ".app" name, Bundle name, etc... - Where does "Console" get this name, so I can truly change the app's name 100%? I don't want an conflicts with the full version down the road as the apps grown independently in complexity. (i.e. Push Notifications, iAds, and other "APP" specific items)
I have performed the following, but still not getting 100% name change:
I. I have used Xcode, Project, Rename.
II. I have used the suggested answer on stackoverflow thread, Changing iPhone App's Name, to
Go to Targets in Xcode,
"Get Info" on your project's target (your current silly development name),
Search for "Product Name" under "Packaging". Change the value of that what you want the new program name is going to be.
My "Product_Name" field was blank for all builds, I changed it to the new name, but I continue to get the console output referencing the OldAppName.
III. I'm not trying to change the "Bundle Name", those are the same, as this is a Lite Version. And changing this does not change the Console reference name anyway, I tried.
IV. I have deleted the entire "Build" folder several times to assure no legacy issues, but the name still does not change.
I'm currently working on a large copy/paste migration over to a new project to try and fix this completely with a new project, because I would like to get app uploaded to the AppStore asap, but there must be a better way of achieving this.
Where does the "Console" get this name? Does this mean that if my customers' download the full version that on some deeper level the device will get confused-(i.e. NSUserDefaults with the same names, running issue, sandbox issues, etc...)?
The names are not stored in the info.plist, they appear to just be referenced from the target, but when I search through the target, I don't even find the OldAppName, is their an additional storage file for this core information?
I would like to stay in Xcode if possible. I have seen suggestions about using other programs or trying to change the XML directly through text editor, but I don't want to accidentally leave a "Third-Party" application marker or trial that might get rejected by Apple Reviewer's as they seem to be coming down hard on this issue.
Any detailed suggestions??
I had the same problem about a year ago.
I've got really nice & easy solution for your needs. You need to click on the "superview" of blue icon (Project/Targets) and then hit enter to change the name of the project. You can also double click on that field, but you need to do it with quite a long delay between clicks.
This method will change magically name of the project in all important places.
http://i.stack.imgur.com/3f1RD.png
Only Solution that Worked, and it was the one that feared the most and was trying to avoid.
I had to start a new project and painstakingly move all 96 class files (about 27mb of text) over one by one, because dragging the classes over kept giving me an error. I tried dragging over the classes as one large group, but that would not work. A little "re-factoring", rebuilding the .plist info, and setting up the new targets, and it I got it working again. I think that there was some sort of legacy issues that Xcode was getting caught up on.
It is working now under a new project, but there must be a better way.
Have you tried opening all files in your project in a text editor and searching for the old name?
Have you tried creating a new empty project and merely adding your content and code files to this empty project?
I have done these in the past and found they work fine:
http://drjunker.org/2008/04/10/xcode-rename-project-and-application-change-copyright-and-version-number/
http://homepage.mac.com/kelleherk/iblog/C1216817469/E1454445171/index.html
I also Clean All Targets/Builds and rename the Executable after.
I had a problem when there was a localized strings (infoPlist.strings) file in project with "CFBundleDisplayName"="MyOldAppName" in it. Removing this file and renaming target to my NewAppName worked for me.

Xcode falsely claims CFBundleExecutable to be (null)

I'm trying to create an ad-hoc build of an iPhone app for beta testing.
On their end, they're seeing an error like the following:
"The info.plist for application at xxx specifies a CFBundleExecutable of (null), which does not exist"
Here is an excerpt from the actual info.plist:
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
And it clearly is not null.
What am I doing wrong here?
The WORKING SOLUTION is this (and only this):
In Xcode, choose “Executables” from the project hierarchy. Click your project executable then press Command-I. Choose the General tab and set the working directory to “Build Products directory”.
Found via BrainwashInc, who credits MacHackShack. I thought this valuable information was way too important to leave floating around on random blog.
It seems like sometimes XCode may flip this setting, as I suddenly started having this issue, and the fix above repaired it. Changing it back to "project directory" reproduces the issue for me, every time.
I also had to restart XCode to get the debugger to work once this fix installed the app, that may be unrelated.
I don't think there is ONE working solution to this. I found several solutions that doesn't work for me. At the end, I did find one solution.
By deleting whatever I had in the "Producs" folder in xCode I managed to get it working. I am using xCode 3.2.1.
Note: I did the change regarding "Build Products directory” above as well, perhaps both solutions needs to be implemented, up to you to try it out.
This is, to say the least, quite anoying. As a beginner, things are complicated enough without bugs in the SDK...
Hope this will help someone out there!
Cheers
It sounds like you're looking at the info.plist in the project not the built product.
The '${EXECUTABLE_NAME}' in the project info.plist is just a place holder for a variable in the build script. You need to look at the info.plist in your built product to see what is listed there. It sounds like for some reason, the build script is not populating the field as it should.
You might actually check that the contents of the application package actually has an executable. Sounds weird I know but a few years ago I mucked about with my build setting son a project and ended up with a product without an executable. Everything else, the package, resources, string files etc was there just no actual program.
This is a know issue of SDK:
Changing an iPhone Executable's working directory from “Build Products directory” may cause the application not to install properly with the error message “The Info.plist for application at (null) specifies a CFBundleExecutable of (null), which does not exist.”
as you can see here:
http://developer.apple.com/iphone/library/releasenotes/General/RN-iPhoneSDK-3/index.html
For me, it worked to change the working directory.
I created the problem deleting by hand the build directory.

iPhone: Failed to launch simulated application: Unknown error

This is a new iPhone project, only 1 target (different from this question)
On build we get:
Failed to launch simulated application: Unknown error.
The google again gives us nothing, lots of people have encountered this and there are lots of crazy ideas to try "oh clean the build", "clear the cache", "twiddle this flag" and none of them work and work consistently. We can reproduce this on two different machines with SDK 2.2.1 and 3.0 beta. Not the install on the machines since other iphone projects work just fine so we believe it has something to do with the config of this particular project but after combing through the config twice we can't spot the problem.
Vanna, I'd like to buy a clue for $200 please.
Tried: XCode menu->Clear cache
Tried: clean all targets
Tried: rm -rf ~/Library/Application\ Support/iPhone\ Simulator
This happened to me once and I think I saw in a blog to simply quit and restart Xcode. Miraculously, it worked for me. I doubt this is the end all solutions to all problems like these though, but if you haven't yet closed Xcode, it's worth a try.
I sometimes see this problem and it is fixed by rebooting the maching. I suspect the internal state of the simulator gets screwed. Doesn't sound like your problem though.
I agree with MiRAGe; if this persists, start a new project and import your source.
If other projects work fine; start a new one and copy the files. Combing through configs just won't do it (since XCode has, well, thousands of config possibilities).
You can send me a check with the $200.
P.S: When you actually do start a new project, do it step by step. Run it after each change. Maybe you will find your problem. It might be a ton of work, but it might also help the other thousands of lost souls who have an 'Unkown Error'.
Changing the product name worked for me. I tried several different alternatives and all of them worked fine. It was the "magic product name" I used at the onset that failed every time I went back to it. YMMV.
This might be because items are missing for the target. Expand the target and verify that all needed source files and libraries are there. Restart Xcode after you've messed around.
alt text http://pici.se/pictures/TsnTQxhKh.png
Thanks ...Did have the same problem or worse. My app wasn't loading in the simulator, alternatively sometimes the build failed. Now realized it's pretty logical.
When you create a new project and info.plist get associated with the project.
Each time you add a modify/add the target another plist is generated with the new name.
But the original association with the info.plist is still around and there's a conflict.
So remove that association from the current target or better still remove from project and trash the info.plist.
Just make sure in the target settings(do getInfo) the correct info.plist is mentioned.
Note the name for product/target should not have spaces. If you really want it change the bundle display name.
Now the only reason why xcode should be closed is to ensure the project file has registered all changes.
I got this problem when I added the .plist to my target (Info.plist -> Get Info -> Targets -> Target Memberships). It went away when I unchecked it again.
I see that that's separate from the Targets -> -> Get Info -> Build -> Packaging -> "Info.plist file" -> my.plist that trips mentioned, but I still don't really understand what's going on, and definitely don't understand why we get such an unhelpful error message.
I've had this twice for the same reason: adding a folder called Resources to the project. This is a naming conflict with something (though there is nothing called "Resources" in the application bundle by default). It might be that mysterious naming conflicts are a common cause of this problem.
To fix I renamed the folder to something else ("Assets"), manually deleted the entire build folder (clean didn't work) and quit the simulator.
Another thing to try if you are desperate is to change the 'Product Name' setting. This worked for me once when everything else didn't.
I had the same problem because I had changed the BundleName and some other values but not changed the PRODUCT_NAME. I had problems finding where PRODUCT_NAME is defined: Get Info on the target, Build-tab and it is down the list somewhere.
I changed PRODUCT_NAME to match the bundle name, restarted Xcode and it worked.
Fred
I had this problem recently and the fix was ridiculously simple. I remembered that I had been editing the target settings and under the "Properties" tab in the "Executable" field there was a space after the value which was ${EXECUTABLE_NAME}. Yes, a single space. It was impossible to see unless you highlight the field. I figured this out because I had edited that field seeing if I could add a command line option that way. I guess when I cut the additional option back out, I missed a space. So while this is the only possible cause of this problem, it's worth checking out.
Had same problem. None of the answers above worked for me. Then i remember i had just added the icon to the Resources folder before the problem started. Moved icon to Other Sources folder and it worked. Weird!
Thanks Guys.
I had the Product name different than in the info plist. A restart once I fixed that made it all go away.
ps, stackoverflow has been a real help to beginners like me. Thanks from downunder.
I add this issue with a folder named "resources". Rename it, clean every thing and run again.
1) Restart Xcode;
2) Use "Get Info" on Info.plist and uncheck current target (Info.plist would be added anyway).
That's all.
I can confirm that a naming conflict was the source of our problem. We had a filesystem folder named resources inside the Xcode group named Resources. Sometimes we would get the error and a system would lock up and sometimes it would not. Changing the folder to the name assets resolved our problem. After reading some of the above comments - it appears that Xcode group names can clash with directory/folder names.
This happened to me when I changed my version number from 1.0 to 0.1. When I changed it back it started working again.