Easy way to add custom prerequisite in clickonce publish (VS 2010) - visual-studio-2010

I would like to add Infragistics dlls as custom prerequisite when publishing my project.
I've read about that:
http://msdn.microsoft.com/en-us/library/aa730839%28VS.80%29.aspx
But this seems to be a bit complicated...
I wonder if exists a bit simple way to archive that (eg by passing URL to setup.exe or such) ?
EDIT
This Might be also interesting: http://www.codeproject.com/KB/aspnet/Add_Custom_Prerequisite.aspx?msg=2520811 will check and let you know...

You can deploy the Infragistics assemblies with ClickOnce just like your application assemblies.
Is there a reason why you want them installed as a prereq?
Edit
Files deployed with ClickOnce only get downloaded once. They will not be downloaded again unless they are updated. The common point of confusion, however, is that the ClickOnce progress dialog always displays the entire size of the application even if it's only downloading a single file. If you want to know exactly what is being downloaded, use Fiddler. I'm serious, use Fiddler, it's awesome.

Related

Can ClickOnce install a single DLL for registration on end machine?

I wrote a DLL (with a COM interface) and wonder if I can use ClickOnce to deploy it on end-user machines (to be called using CreateObject("My.DllClass") from the user VBasic app. All the documentation that I've read for ClickOnce (and the abortive attempts that I've made) seem to indicate that a real app (exe, etc) is required for ClickOnce -- it can't deploy a single DLL (and some txt files) and get the DLL registered for COM use on the target machine.
Q1. Is my understanding correct?
Q2. Is my best alternative to learn the Wix Installer?
Thank you
Q1: Yes, your ClickOnce application must have at least one launchable executable file. It's minimal requirement. But you can add any .net executable file there.
Q2: Yes/no. I will try to describe some things for you here. It'll let you make a right decision in your choose. Here is my point of view your task if you gonna choose a ClickOnce technology.
Abbreviate: ClickOnce application = Your.dll + dotNet-Some.exe
At the first you need to know a ClickOnce application locating in Users\[CurrentUser]\AppData\Local\Apps\2.0 after get installed by user. You can't effect on location, so if your client PC have more then one users, then second one must install your application for your self again. As me know your COM assembly must be registered by regasm.exe, there for your Some.exe can on launch register your dll by regasm.exe or some WinAPI functionality, so executable file won't be useless in this way.
Major question is update process, you must track your clickonce build number at the first, and for update operation user must launch your Some.exe for check and now workarounds from here. If this update process if fine, then you need re-register your assembly again (because clickonce add new folder for updated assembly) and user will be ready for use your class.
In the case of MSI package you have full control of install process, but you need always deliver this packages to your clients. Wix is good, if you are .NET developer take a look on WixSharp - let you create installer much more faster and have a lot of examples
If you don't gonna publish your ClickOnce application from Visual Studio then you can use Mage.exe / MageUI.exe for ClickOnce application preparation or use my builder utility from here second download link.
I hope what i said was a bit useful.

Is it possible to deploy aspnet vnext to azure from a mac?

The kpm pack command needs the runtime for the server - is it possible to install windows runtimes on osx just for the pack and deploy?
Ok, it seems that in order to recognise that the deployment is an aspnet vNext project and to handle that as a 'ProjectK Web Application deployment', you have to make it look like it all came from Visual Studio (or at least that was the only way I managed to get it to work right now)...
I did this by taking an example one from somewhere else...
I took a simple single vnext web project .sln file and changed the project name and project GUID.
I took the .kproj Visual Studio project file and did the same.
There isn't much that needs to be changed - only the name of the project and GUID. It's nice that there isn't any file lists in there so I feel that this might end up as a once-only activity...
I did find that there are some project structure rules that seemed to make it break. You seem to have to have the sln file in the top level folder and a folder underneath for the web project. If there is ONLY a web project then this might seem overkill, but I tried collapsing everything up to the top with the sln file correctly pointing, but that didn't work.
The other thing that you need to make sure you have is a reference to "Microsoft.AspNet.Server.IIS" in the project.json dependencies. Without this, the AspNet.Loader.dll and bin folder don't get deployed.
Apart from that, I am now able to use Sublime Text (or whatever I want on osx), test using "k kestrel", checkin through git and it gets deployed automatically to an azure web site! yippee!
Actually this makes much more sense because it is letting the target decide upon the binaries it needs to satisfy the deployments. Next challenge might be to get it to pull 'my' libraries from a custom NuGet source to get my binary libraries in there and avoid uploading ALL of the source to the website!
Oh - and another tip: Quit kestrel with 'Enter' for a clean quit instead of Z which leaves the port listening but non-functional!

Visual Studio setup project "PackageAs" "extremely loose"

We were hoping to create a setup project which would allow for a pick-n-mix approach to which files were included for each local client installation.
Basically we've got a core setup.exe which we only want to build once, and which contains most of the product. But for each client there's a custom DLL which fits their solution. The custom DLL is loaded dynamically at runtime by the software and that's working fine. The problem is in the setup.
Of course we could 1) write an individual custom Setup.exe for each client too 2) keep a single setup.exe and customise it each time we want to do a build for the customer
But both those approaches are problematic.
For reasons too complicated to go into, the below approach is going to be the safest and most straightforward:
Maintain a single setup project
add all the custom DLLs to the setup project but set them to PackageAs=Loose (and also Vital=False)
then, every time we want to rollout the install files to the customer we send the setup files minus all the custom DLLs except his own
Our problem is that this approach falls down when you run the setup.exe on the client. Everything's fine except that the setup.exe still knows about all the DLLs you've quietly removed from the file system for this customer. And the installer starts shouting if it doesn't find all the files where it expects to find them:
Actually, this isn't a problem because you can hit Continue and then everything works fine.
Except that actually it is a problem because if you're selling to Pepsi (we're not, but say we were) you sort of don't want the installer to moan that it can't find CocaCola.foo.dll in the middle of its install.
We almost want an additional setting of Extremely Loose for the PackageAs field so that the installer knows not to even worry if it doesn't find the file.
Is there a solution within our existing approach without having to learn a third-party installer?
It sounds like your optional components should be created as Merge Modules and then you'd need a specific installer created that includes only certain modules. It sounds like you have some client specific libraries you don't want exposed to your other clients. Of course this means you'll need a build for each client, but that is something that could be automated.

Is there a better way to deploy web applications using Visual Studio 2010?

I am using Visual Studio 2010 and IIS 7.0 .Currently when I want to deploy an website to my web server I follow these steps -
1.Right-click on website and say publish..to get the entire site copied to a local folder.
2.Next using filezilla just ftp the copied files to the web server.
The problem is I have to deploy entire website all the time since I can't keep a track of the changes. Although I do find my way easier and without problems. I dont want to a whole lot of configuration and deployment packages unless it is really worth it and also relatively easy to do. Is there a better way I should do the deployment ? Any suggestions are welcome !
You could use the Web Deployment tool. It needs to be installed on the webserver too and can even take care of publishing a sql server database.
http://www.iis.net/download/WebDeploy
Do NOT use the Web Platform installer to install this package.
You can just right click on website and Publish Web Site; the Publish Website Wizard opens. You can click the ... button to browse on the Target Location textbox and choose FTP over in the left hand side, then put in your FTP credentials.
You can tick 'Allow this precompiled site to be updateable' so if you need to make minor changes (such as scripts, css, or html) but I don't know how reliable that is.
Good luck!
Scott Gu just published an article about the Deploy Features in VS today:
http://weblogs.asp.net/scottgu/archive/2010/07/29/vs-2010-web-deployment.aspx
Personally I use Dispatch for ASP.NET. Works well for me. It only uploads the files that have changed and can check for files that are missing locally or on the server.
http://dispatchasp.net/
If you are using the Publish Wizard then you have no choice but to deploy the whole site. There is no way for the wizard to look at the files on the server and know definitively if the file has changed or not (it could look at file size or something, but that's not 100% guarantee of no change and FTP doesn't offer an easy way to do a checksum algorithm).
Other then that, do it the way you would do it on any other language/tool. Just manually FTP the files you've changed. Of course, this means you have know which files are side-affected by your changes. And if you're not confident as to what files you've side affected.... publish wizard is your friend :)

Recommend a Visual Studio FTP deployment plug-in

we've recently stumbled across the excellent Dispatch for ASP FTP deployment plug in. It looks great apart from one thing: It doesn't work with Visual Studio 2010, at least for us, anyway. (It's supposed to work fine.)
(Yes, we've tried everything: We've managed to get Dispatch working for another FTP site, but not the main one we regularly deploy to. We have managed to connect to our main site through FileZilla FTP, so the site itself is configured correctly. All settings have been triple checked, but the software still throws up weird errors (always to do with its internal libraries).)
So does anyone know of any other comparable FTP-based, deployment plug-in for Visual Studio?
Here's what Dispatch does (and so any suggested replacement must do):
Monitor any altered files
in the project. When a file is
changed, it's added to a list of
files to be deployed.
To deploy these
files to the live site, all we need
to do is click "Upload" and the plugin will
connect via FTP to our live site and
upload the selected files.
We can filter out
any filenames we don't want to be
monitored/uploaded (e.g. .cs or
web.config or /Images/, etc.)
I think that's all the features that we need. Thanks for any suggestions!
Note: If you're wondering why we need such a service, it's because we deploy many site changes over the course of a single day. Publishing the entire project to a folder, zipping it up, then FTPing that zip file, only to have to unzip it, and then install the entire project into the live wwwroot takes far too long. With Dispatch you're able to upload individual files in a single click.
After much back and forth between me and the creator of Dispatch, we managed to narrow down the problem to the library he was using (Rebex FTP). I posted a question about the issue on the Rebex forums, and it was revealed that their software might have a bug with IIS7.5. They suggested a quick hack/fix, which I tested and discovered worked.
Mr. Dispatch then quickly implemented this hack/fix into his software, and lo! I had a fully working copy of Dispatch... So no need for a replacement any more!
(And from what I've seen, there isn't even any other plug-ins offering this functionality, so it's just as well.)
Just an update - Dispatch does not work with VS 2013 so if you have VS 2012 with Dispatch installed, Keep it. Also the website is gone so it looks like all development has ceased. I have been using Dispatch since VS2005 and it has been great for just sending single files up when I need to. Too bad it is gone.
I built a very simple one for myself - you right click the file in Solution Explorer and it then uploads that file based on a settings file you create.
It's super crude but it works and the source is there to make it better if you like -
https://github.com/garazy/vs-2017-ftp-upload
Big enhancements have been added to VS2008, VS2010, VS2012. Below is the article. I found that Microsoft did all the above while I was searching. Since this came up high in what I was searching, thought should share this knowledge.
Deploy a Web Application Project Using One-Click Publish Without Web Deploy

Resources