C# 2010: Deploying Multiple Apps..Need Sure Fire Way To Update - c#

For starters I have whored myself out to the Internet in general as far as search is concerned. Got nowhere and am pretty Google proficient. Maybe I missed something..Enough of that.
As mentioned above C# 2010 (3.5->4.0 running on Win7x64 but would like the app to be fully compatible with XP/Vista). Dealing with XP(w/SP3) to Vista/7 clients. Working on an app that will allow my company to more easily connect to their local desktops via RDP. My app is awesome as far a usability, but eventually, my programming will catch up to me, bend me over, and do me hard.
I am looking for a sure-fire way to update the main app. I am deploying a secondary app to pull this off (app downloads updateApp from developer website if xml file has newer version, updaterApp updates main app; main app updates the updaterApp--if needed).
Looking for reinforcement or better ways to accomplish this as the app depends on admins + (possible) SQL + AD + SMB + SSH auth.
Things I have run into:
http://themech.net/2008/09/check-for-updates-how-to-download-and-install-a-new-version-of-your-csharp-application/ (at this point, what I like)
http://digitalformula.net/technical/c-self-updating-application-without-clickonce/
http://www.eggheadcafe.com/articles/pfc/selfupdater.asp
So that's what I am looking at. Would love to find the right solution with details/great code/examples. I am MOST WORRIED about admin access in Vista/7 on the 'Program Files' directory look forward to the discussion. Hope all of the info is here. Thank you so much in advance!

What about clickonce?

I read good and bad things about ClickOnce. One of these days I will sit down and figure out how it works. For now I went with update code inside the main application. Its pretty kewl. It starts a new thread to download and run the MSI package. I found it here.
http://themech.net/2008/09/check-for-updates-how-to-download-and-install-a-new-version-of-your-csharp-application/
Hope that helps someone looking to spin your own. I liked this approach because I did not have to create a second program.

Use clickonce
.net has this built in, we use it for our LOB apps, works fine.

Related

2 dev computers, 1 C# solution using TFS?

I work on a team using TFS to manage a C# project. I have 2 development computers, a high end desktop and a laptop.
Ok, the TFS server is located many states away. The other developers are around the globe. I work out of my house. I really didn't think I needed to include this when I said "I am on a team"... Guess I was wrong. I also have no ability to make any changes to the TFS Server and no one outside of my office will change anything anywhere to help me do this.
I work on both. When I switch from one to the other, I have to remember to copy the files (which I often forget or don't have time to do).
I thought I could put the source files on OneDrive/DropBox and edit them there. It worked fine for one computer, but the other said:
"The solution appears to be under source control, but its binding information cannot be found. Because it is not possible to recover this missing information automatically, the projects whose bindings are missing will be treated as not under source control."
Any idea how I might fix this (doesn't anyone have ideas on this???) - or other ways I might solve this?
I just like the idea of working on my desktop, but being able to grab my laptop and run when I have to.
Links to existing answers are appreciated, but I couldn't figure out what to search on that addressed this (although I am sure it has been asked before.)
Thanks!
Trying to use a share for your local workspace is going to be something that runs into little quirks all along the way.
I would recommend using the Shelve feature. You would Shelve from one computer, then unshelve from the other. It basically takes your chosen changes and moves them onto the server such that you then can unshelve them onto the other computer. It is a way to save your changes to the server without checking them into the project. You have your own shelvesets that don't effect the main branch.
Alternative : Use Git
TFS : Map your project which is in TFS into any folder on your local. And check it in when you develop. And in other computer, press Get Latest button by clicking right click of your mouse to solution.
EDIT:
If you want to use TFS, go TFS Express without download or setup.
Why you need to copy the files instead of just use TFS checked in and get latest version?
This will guaranty you have the latest version of code on both machine without problem.
Please also checked in your projects and solution files into TFS, and you don't miss anything.
If you think it will affect others, you can have your own branch to working on.
The solution I have so far (not ideal, but works) is to use OneDrive (or DropBox - I just use OneDrive since it has more storage). On the laptop, I downloaded the entire project. All the TFS flags are set for the laptop, but the desktop can see them just as well. I can code on the desktop, and as long as I hit "save all" before I leave, I can race out the door with my laptop and work remotely, with all the current code.
The drawbacks of this approach are:
1) When I open the project on the desktop - it complains since all the TFS references are for the laptop. But only when I open it.
2) I have to use the laptop to get current and push changed files. Not a big deal.
3) I can't really work on both the laptop and the desktop at the same time - but don't really care since I don't need to and that wasn't the goal anyway.
The benefits:
1) I don't have to remember to copy from one location to another, check for changed files, etc.
2) As long as I have my laptop, I can work. No need to check in code, shelve code, or play any other silly games in order to keep them in sync.
3) I can race out last minute and always know I have all the code in whatever state it was in.
In the long run, I would still like a slightly better solution. I am guessing that I could tell OneDrive not to sync the TFS folders/files on each machine and then that would eliminate the message I get when I start on the desktop, but at this time, it's not worth the effort to figure out how to do this (although, if you know, feel free to comment.) But overall, I am now quite happy.
Fletcher
Since I always have my laptop when at the desktop, but the opposite is not true, this works for me.

Visual Studio 2017 C#: How to create an Installer that can provide continuous updates

I've been trying to find an answer to this for weeks. Hopefully you are able to help me out! :)
I've got a C# application. It has multiple classes and multiple Forms. The forms also have images on them in PictureBoxes.
These images are all stored in an Assets folder inside the bin folder i.e. /bin/Assets.
When developing, I run the application in Debug mode.
I have looked on YouTube and all areas of the internet to find how to create an installer for my application. I see a majority of posts about ClickOnce deployment, which looks like it's what I want. The issue is that the ClickOnce wizard asks you where to install the application:
I do not have a server to host the application on (I have tried examples I've seen such as \localhost\myfolder\myApplication) I do, however, run my own website through a NameCheap host where I could provide a link to the application for users to download. I'm not quite sure how to set this up though.
I do not want the users to install from a CD
I don't know how to do the File Share method
This is the first obstacle. Regardless of what I choose, I cannot get the setup to work. I think the big issue is that I can't find how to include my Assets in the project and I don't know where to install the application.
The next obstacle, is that when users download my application, I would like to be able to push out an update, and have them have the update automatically (or only need to restart the application to get the update). I do not want them to have to re-download the application every time there is an update, as there are updates several times per week.
Again, I believe ClickOnce handles this but since I cannot even get to this step, I am not sure.
So, in the end, this is the use-case:
User is able to download the application from a website. Once application is downloaded, all further updates to the application are pushed automatically or only require a restart of the application to obtain.
I have gone through all the documentation on ClickOnce as well. Specifically this link. My issue is on #4.
I hope you are able to help, thank you!
Sharing the installer should not be an issue you could simply do that through Dropbox.
You can host your Updater on Dropbox as well but anytime you have new Updater replace the old one so the web link remains same and that it is because you need to know the the Updater link in advance to put it in the original installer.
You mentioned that you have a website through NameCheap, I believe you could use that instead of Dropbox here is a youtube links that might help.
https://www.youtube.com/watch?v=PEXcWln2Fe8
https://www.youtube.com/watch?v=rUNQphoGVwQ
I personally don't use ClickOnce but I use A Microsoft Windows Installer and I develop my own updater. ClickOnce is easier use for you at this point but later in future, you could explore other ways.
Wish my answer is clear if not just let me know,
Good luck

Getting started with writing a desktop app that talks to an iPhone

I'm thinking of writing an app to selectively transfer photos/music to and from my iPhone, mostly for fun and personal convenience. However, I'm stuck at the very beginning -- where do I look to find information on how to do this?
Pretty much every link I see talks about developing applications that run on the iPhone, but nothing about desktop app for interfacing with an iPhone.
I'm on Windows (no access to a Mac, but I'll take suggestions for that for when I eventually acquire one), and I'm most familiar with C#, but other languages are definitely an option.
Can anybody offer me a few pointers on getting started? Thanks.
Edit: to clarify further, I don't need information on how to write applications that run ON the iphone. There are plenty of resources out for that. :) What I'm looking for it some pointers on how to "talk" to an iPhone or an iPod through the USB cord, if that's even possible.
Edit #2: I found libmobiledevice library that effectively does what I'm talking about on Linux. I don't think I'm too keen on attempting to port it over to Windows, though. :)
I found what I was looking for: SharePodLib. Thanks, everyone.
I recommend and have used the following options:
Option 1:
Run a small and light webserver in the iPhone and of course, use HTTP to transfer. I recommend mongoose websever, i've tried it with very simple and very heavy load. Also here, you can find an actual drag and drop project to deploy this webserver in the iPhone.
Option 2:
Use something like Bonjour, this is something very useful if you want the "smart" discovery of your device in the network, maybe for opportunistic peer discovery. You can check here and here, to understand how to get bonjour to run in the iPhone and use it to exploit discovery and sharing.
Hope it helps!!
Unfortunately, there's no no way to sync an iPhone app with a Mac app over USB, at least in the current SDK. As already stated, you'll have to either sync over HTTP or use the local network. You might want to check out ZSync, a Cocoa library for bonjour syncing (I haven't used it, and it's in early development stages, but it looks interesting).
Unfortunately there is no officially sanctioned method to do what you describe. In Apple's view the only application that should have visibility of that information is iTunes. There are applications out there that appear to be able to do this, but I suspect they have reverse engineered the USB protocol and are thus open to being locked out if the protocol changes.

Launching C# .Net application from browser. Possible?

The greatest example I can think of is the Google Chrome installation.
I remember one other application launching that same way. Can't remember what it was.
I'm not implying that it was built in C# or even .Net.
It is possible somehow. It's been done. Just wondering how.
I think what you are asking for is ClickOnce deployment.
ClickOnce deployment allows you to publish Windows-based applications to a Web server or network file share for simplified installation
Someone else has already pointed out ClickOnce, and this is probably want you want. Another alternative is Silverlight, where the application runs inside the browser window.
Are you talking about launching an application or installing it? You can launch an application by registering your application has a protocol handler (such as http://) within Windows...different browsers will have different behaviors, but it's possible that way. See this link for information.

Can an exe compiled from C# be integrated into a website?

I'm a beginner in programming. I've just made a program called "Guessing Game". And it seems to work fine. Can I integrate it into a website? The CMS that I'm using is Mambo.
===
additional info's
Thanks for all your suggestions.
I still don't have any background about Silverlight, WPF and Java Script which I think sounds good. I'm using Windows and I programmed my "Guessing Game" from Microsoft Visual Studio 2008 and it's using Window application forms.
Yes I guess, for the moment I let it be and start to learn Silverlight or Java Script so that I can integrate it on my website:-)
Thanks for all your input guys:-)
Cheers
A standalone executable cannot be directly integrated into a website. You have a few choices though:
Allow your users to download the executable and run it locally for themselves
Rewrite your program in JavaScript to have it run directly inside of an HTML page, though this could obviously involve a fair amount of reworking
Use Microsoft's Silverlight technology, which allows you to code in C# and produce a web-based frontend similar to Adobe Flash. Your program logic should remain the same and you should only have to change the UI code. In fact if you're already using WPF for the front end, the transition will be even easier.
There are several questions that you still need to answer.
What is your server running? If its not Windows, your exe will not run at all unless it is compatible with Mono or a similar framework for your server's operating system.
How does your "Guessing game" interact with the user? If it is through a WinForms GUI, it will you will not be able to use that GUI on the web. If your game is a WPF application your easiest route may be to port it to Silverlight and serve it up on a web page.
It is typically not trivial to make a regular windows application run in a web environment since on on the web you are really running in the browser, not on Windows.
Yes - in general, when you're talking about software, anything is possible. The question is, how difficult will it be?
To understand that, you have to give us more details about "Guessing Game" including how it is designed, what it's interfaces are, how readily extensible it is, and how prepared you are to change or extend it.
For example, if it is a Windows Forms GUI app, then it will be diifficult to integrate into a web app. If it is a console app, then it will be a little easier. If you can modify it to run as a Windows Service, then a little easier. If you can modify it to accept input from the network (as opposed to getting input solely from the keyboard + mouse), still easier.
You may be able to use reflection to load your assembly into the web application, but most likely, the answer is no.
Your best solution is probably to re-write the game in javascript.
The short answer to your question is now. I'm presuming that since you're running Mambo you're web environment is a LAMP stack. However, you're "Guessing Game" is most likely a Windows application from the sound of it. For a beginner in programming, there is no integration path you're going to be able to take that will allow you to have your game running on your website.
However, here are avenues you can take, which will require a significant amount of time to learn. I'm not saying you shouldn't take time to learn, by all means you should! I'm simply trying to illustrate the fact that this is not something that is going to be doable in a couple of hours.
Silverlight - allows you to run C# code with a WPF like interface on your client's browser and can integrate with your web site through javascript.
Let your client download it from your website and run it off of their PC. This would actually be fairly trivial and would be your quickest option, but it sounds like it's not the kind of integration you were looking for.

Categories