Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. ClickOnce deploy

ClickOnce deploy

Scheduled Pinned Locked Moved C#
sysadminhelpquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alex almeida
    wrote on last edited by
    #1

    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?

    S L 2 Replies Last reply
    0
    • A alex almeida

      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?

      S Offline
      S Offline
      SimulationofSai
      wrote on last edited by
      #2

      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

      D 1 Reply Last reply
      0
      • A alex almeida

        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?

        L Offline
        L Offline
        LongRange Shooter
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • S SimulationofSai

          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

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          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

          A 1 Reply Last reply
          0
          • D Dave Kreskowiak

            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

            A Offline
            A Offline
            alex almeida
            wrote on last edited by
            #5

            The 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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups