ClickOnce deploy
-
Hello developers. I need a help with clickonce deployment. I my app it's has a *.mdf file, when I install my app the *.mdf goes to ...\Local Settings\Apps\2.0\... folder But the app's folder has a complex name, as app...ex3ynnnnnadiGGGfzzzsds Can I customize this name?
-
Hello developers. I need a help with clickonce deployment. I my app it's has a *.mdf file, when I install my app the *.mdf goes to ...\Local Settings\Apps\2.0\... folder But the app's folder has a complex name, as app...ex3ynnnnnadiGGGfzzzsds Can I customize this name?
Nope, I guess not. But in any case, you can dynamically get the folder name at runtime using Application.StartupPath. So why bother about the long folder name? SG
-
Hello developers. I need a help with clickonce deployment. I my app it's has a *.mdf file, when I install my app the *.mdf goes to ...\Local Settings\Apps\2.0\... folder But the app's folder has a complex name, as app...ex3ynnnnnadiGGGfzzzsds Can I customize this name?
The only thing you need to do is have a server that will how the deployment. So if you were using a file share \\myServer\InstallAdministrator then just do the following:
1) Open your solution 2) Right click your project you want deployed 3) Choose Publish from the popup menu. 4) When asked give it the server location
You will get a web page that describes what is published and that is the URL you publish to your users. Voila, they click that url, they click Install, and in seconds they are running the application. From that aspect...who cares how things are named on the server since neither you nor the user will actually see the deployment folder day-to-day.
-
Nope, I guess not. But in any case, you can dynamically get the folder name at runtime using Application.StartupPath. So why bother about the long folder name? SG
That actually doesn't work with a ClickOnce deployment. Content files, like an MDF file go into a very different folder from your executable. You can use the Deployment namespace to find the path to that folder (I forget exactly how right now), or I THINK you might also be able to cheat and use |DataDirectory| in the connection string (I haven't tried this yet!).
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
That actually doesn't work with a ClickOnce deployment. Content files, like an MDF file go into a very different folder from your executable. You can use the Deployment namespace to find the path to that folder (I forget exactly how right now), or I THINK you might also be able to cheat and use |DataDirectory| in the connection string (I haven't tried this yet!).
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007The problem was solved :) Tks for all When I attached the mdf file, I needed attach it as Data File When I changed this option, everything works all right