ClickOnce and both Update and Install folder - configuration

I'm refactoring some msbuild scripts for a project, that uses ClickOnce to package the application. The project packages both an install and an update version and puts then in seperate folders on the webserver. Any reason for this? The only difference when publishing the ClickOnce package, the the publish url (e.g. somesite.com/update and somesite.com/install).
I'm not an ClickOnce expert, but would it not be enough with just a single folder og both installing the client and updating it?
Thanks in advance.
NB. The update url always points towards the update folder.

Yes, it is enough to have single folder for installing and updating application. ClickOnce will do everything automatically. The only thing is that when publishing the application, you have to specify what will be the update url (and it can be exactly the same as install url)...so basically, you can give your clients that "update" url as a location from where they can install the application.

Related

TKCustomMap Version Conflict

This issue has been reported on GitHub here -
https://github.com/TorbenK/TK.CustomMap/issues/325
Has anyone else has struggled with this? I was stoked to find this nuget package because it does exactly what I'm looking for but it needs Places and some other GooglePlayServices installed and I can't install them because of this conflict.
I'm also not sure if uninstalling TK.CustomMap and then installing the Play Services would even help because the person who reported the issue on GitHub said-
I converted my app to .net 2.0 and had to use the newest Google play services
60.1142.1 for AdMob to work. It wouldn't install until I uninstalled TK.CustomMap, and now TK.CustomMap won't reinstall because it only want to use GooglePlayServices 42.1021.1
Severity Code Description Project File Line Suppression State
Error NU1107 Version conflict detected for Xamarin.GooglePlayServices.Tasks. Reference the package directly from the project to resolve this issue.
HunterTracker.Android -> Xamarin.GooglePlayServices.Base 60.1142.1 -> Xamarin.GooglePlayServices.Tasks (= 60.1142.1)
HunterTracker.Android -> HunterTracker -> TK.CustomMap 2.0.1 -> Xamarin.GooglePlayServices.Location 42.1021.1 -> Xamarin.GooglePlayServices.Tasks (= 42.1021.1).
That's pretty much the exact error I'm getting trying to install the other packages. There's no resolution on github.
Anybody found a work around? Or does anyone know how to "Reference the package directly from the project"?
Thanks to SushiHangover's comments above pointing me in the right direction I was able to discover what I needed to do here. I had an error updating the nuget packages of TK.CustomMap at first because v26 Xamarin.Android.Support.Vector.Drawable was targeting MonoAndroid8.0 and the update to v27 must target MonoAndroid8.1 So it took quite a bit just to be able to update the nuget packages in order to get the assemblies with later versions so I could use TK.CustomMap in my solution. But I was eventually able to get there. Here were the steps I followed (as best I can remember). I am unable to compile ios right now because I don't have a MAC so that fix will have to come later. This fix is for the shared project and Android project only
Download the TK.CustomMap-master from github
Extract it and delete the Sample project completely (I also deleted the UWP project as I'm not really interested in that at this time)
Opened and built then closed. Deleted packages folder, vs folder, bin and obj from Android and Shared Project (this step is probably not necessary but I did it so...)
In the packages.config in Android changed all targets from monoandroid80 to monoandroid81 save file
In the TK.CustomMap.Android.csproj for every v26.0.1 of any Xamarin.Android.Support or other Xamarin.Android util package changed 26.0.1\lib\MonoAndroid80 to 27.0.2.1\lib\MonoAndroid81 - save file
In the nuget folder in TK.CustomMap.nuspec changed the target framework in this section
<group targetFramework="lib\MonoAndroid7.0">
<dependency id="Xamarin.GooglePlayServices.Location" version="42.1021.1" />
<dependency id="Xamarin.GooglePlayServices.Places" version="42.1021.1" />
<dependency id="Xamarin.Android.Maps.Utils" version="0.5.0" />
<dependency id="Xamarin.Forms" version="2.5.0.91635" />
<dependency id="Newtonsoft.Json" version="10.0.3" />
</group>
to
<group targetFramework="lib\MonoAndroid">
so it could target any version
Opened and updated all nuget packages using package manager (not console). Built debug and release builds
At this point opened solution I had tried to implement TK.CustomMap in previously to attempt the fix. Remember the original issues was that the latest frameworks could not be used and 42.1021.1 frameworks were unable to locate com.google.gms.location and com.google.gms.places.ui files so they had to be updated or no TK.CustomMap
In the problem solution uninstalled TK.CustomMap from all projects
In the problem solution Android project added reference to all the dlls in the release folder of the Android bin file from TK.CustomMap project.
Installed updates for all Xamarin.Android frameworks in problem solution through Package Manager (not console)
Installed updates of all other nuget packages for all projects using Package Manager (not console)
Installed TK.CustomMap to Shared project using Package Manager (not console)
Added the References to the android project a second time. May or may not have helped.
Installed TK.CustomMap Nuget Package using Package Manager (not console)
Built and ran on Live Player successfully!!
Thanks to Sushi Hangover for the advice. I haven't seen any comprehensive tutorials anywhere on how to accomplish this so I figured I would post my own answer in case anyone else was looking. Definitely if you are new to VS all this stuff is no walk in the park in the beginning.
Thanks to #Travis Fleenor. This is my solution. I change a bit your sequence in order to work on mine.
1. Make sure the original proyect from github (https://github.com/TorbenK/TK.CustomMap) works and you can run it.
2. Update the nugets where you get the conflict. In my case I got conflicted in googleplay library version. I updated it in the original proyect and then assure it could run it.
3. Compile entire solution in release mode. Then, copied the generated dll from bin/release and pasted them in a folder in my desktop.
4. I referenced those dll to shared proyect and android proyect. I only used nuget package manager to install some missing packages needed for the tk.custom. Notice that you only will reference some dll that the proyect accept. For the mayority Visual will prompt ' dll already referenced' something.
5. first reference your shared proyect, later your android one. That's all. make sure the you ca recompile solution.
Hope this helps

Openshift: how to import MySQL driver to the tomcat/lib directory

I would like to connect my web application (running on tomcat 7) to MySQL (v5.6.20). It is ok if I include the driver mysql-connector-java-5.1.31-bin.jar into my web application. But would like to have it for all my apps. On my local computer, I put the file in tomcat/lib and everything is fine.
How to do the same with openshift? Is it a bad idea to do so?
I am a total beginner. What I do to upload my application (war files) is
git add --all
git commit --m "text"
git push
Thanks a lot for your help!!
Here are two KB articles from the Help Center that I think will help you get going, the first shows how to use the pre-configured database connections that come with each of the Java containers on OpenShift (https://help.openshift.com/hc/en-us/articles/202399720-How-to-use-the-pre-configured-MySQLDS-and-PostgreSQLDS-data-sources-in-the-Java-cartridges), They are very easy to use.
The second shows you how to include external libraries (jar files) inside your application without using maven (https://help.openshift.com/hc/en-us/articles/202399730-How-to-include-libraries-jar-files-in-your-java-application-without-using-Maven).
A third option, if you are using a Maven based project (similar to the default applications that come with the Java cartridges), is to add the mysql driver as a dependency to your pom.xml file, and it will be loaded into the correct place in your application when you do a git push. If you want to go that route, I think that this article will help: http://www.java-tutorial.ch/core-java-tutorial/mysql-with-java-and-maven-tutorial

Testing yeoman generator locally

I'm creating a yeoman generator for my web projects.
But I wonder how I can try and test my changes before publishing it?
Since I have installed it once, it will not run my local development version, instead it runs my installed version.
Any suggestions on how can test-run my local development version?
I finally found some information on how to accomplish this:
if you wish to develop on the generators code base, and debug locally, a common way to do so is to rely on npm link
git clone the generators repo locally
cd into that repository and run npm link. It'll install required dependencies and install the package globally, using a symbolic link to your local version.
If you want to install sub generators, you need to do so in the context of a yeoman-generator package linked earlier. Cd into the sub generators package you have cloned locally and run npm link.
We now have everything linked and known on the system, we now need to link the sub-generator repo into the parent one, yeoman-generator cloned and linked in step 1 & 2.
https://github.com/yeoman/generator/wiki/Testing-generators
EDIT:
Updated link for info: https://yeoman.io/authoring/index.html
If by "running locally" you mean the ability to test your generator and its flow you can simply do this.
In your project directory folder run npm link. If this passes in flying colors, go to step 2.
Open a terminal and cd into the folder you wish to initiate a project.
Run yo generator-theNameOfYourGenerator. This will run your generator.

Updating a mercurial webserver

I have a server running mercuial 1.7.2 and want to upgrade to the newest version. What is the best way to go about deploying a new version? Do I need to recopy the templates folder and mercurial folder for python?
Generally speaking, you can simply replace your installed Mercurial with a new version and have it work.
old CGI and WSGI scripts are all forward-compatible and you don't need to update them
you shouldn't need to update config files
new Mercurial versions will read and write old repositories without issue
The only thing you need to worry about is if you've modified the stock web templates, in which case you'll want to back them up and restore them.
See this page for other notes on upgrading:
https://www.mercurial-scm.org/wiki/UpgradingMercurial

binary files in wix install package

I can't figure it out: do the files which are referenced in the Binary element of .wxs file get copied to the target machine, or are they resources of the install package?
They are definitely the resources of the install package. This means that they don't get installed to your application folder, but Windows Installer is supposed to extract it internally to some temporary location to address the functionality in it. And it is supposed to clean after itself. But this is definitely not visible to the end users of your installation.
At least, this is how I understand it.