Remove prerequisites validation from Windows Installer setup project uninstallation - setup-project

We are using Setup Project with windows C# and are using launch conditions to validate some prerequisites while installation. But it occurs in UNINSTALL time also. Can any body suggests, how to remove the launch condition validation while uninstall ...
Please let me know any possible solutions.

The REMOVE property is set to "ALL" when you uninstall.
The condition would include '... AND NOT REMOVE = "ALL" '.

Related

Asp.net core razor view is not formatted

The razor view formatting is so bad
even when I tried ctrl k + ctrl d
the page is so missed up
any help, please!
#if (item.Details.Length > 10)
{
#item.Details.ToString().Substring(0, 10) }
else
{
#item.Details}
You can enable the new Razor editor first, and then restart VS.
New experimental Razor editor for Visual Studio
Then you can choose Edit->Advanced->Format Document.
✎[Edit]
You can try the following methods:
Check whether three-party plug-ins are installed.
If there are three-party plug-ins installed, temporarily disable them, and then test it.
You can try reset VS settings.
https://learn.microsoft.com/en-us/visualstudio/ide/environment-settings?view=vs-2019#reset-settings
Change the fourth step to select the General option.
Repair VS (repair in VS Installer)
Create a new project and check if the same problem occurs.
Clean up the program /project/VS cache, then restart VS and try again.
The project is cached in the solution/project folder,you need to delete the bin, obj and .vs files.
VS is cached in this path: C:\Users[user name]\AppData\Local\Microsoft\VisualStudio\16.0_XXXXXXXXX, delete all ComponentModelCache folder.
Give feedback to the VS product group from VS-> Help-> Send Feedback-> Report a Problem...

Why isn't "Path to project(s)" modifiable?

In an Azure DevOps build, a .NET Core Test step has a "Path to project(s)" property, which is set to **/*[Tt]ests/*.csproj.
Why can't I change it?
It's editable if one manually adds a .NET Core build step to a build switched to the "Test" command instead of using the "Test" step from the default .NET Core sequence of build steps.
Because by default this setting will be linked to **\*.sln
You need to unlink it.To do this you have a link at the top right corner called link settings where other links like view yaml and remove can be found nearby.
Click the link settings and unlink the defaullt value of the solution.

How to define firebase-remote-config parameters based on app version

I need to distribute some settings based on the app version e.g. if app version equals "4.0.1" then a else b. I found the possibility to define a condition named "version" but the documentation says it is bound to the package name of the app and not the version or version code.
see here https://firebase.google.com/docs/remote-config/parameters
I tried it though specifying the app version through a "version" condition but it does not work. Any ideas on this would be much appreciated.
The main problem is that Remote config's "Version" is the build number and not the actual version number.
The way I found around this is you can add a "User Property" in Firebase like "app_version". Then when the app launches add the following code:
let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as! String
Analytics.setUserProperty(version, forName: "app_version")
You can then use this User Property in Remote Config as a condition and voila you can base some Remote Config value of of the version number. Note this will require the use of Firebase Analytics as well.
Creating a condition, which targets an app version via regular expression appears to be the only solution in this case.
For my app I use the following configuration:
Here, users who have versions 1.8.* and below receive an alternate version of a backend configuration parameter.
If you need to target only a specific version of the app, then a regular expression is not really necessary, so the approach that you took should work.
Alternatively, you can have far more control if you create a user audience based on app version, and then target the audience.

Qt Installer Framework: Auto Update

I'm currently using the Qt Installer Framework and managed to set up an online repository. What I want to know is:
Does the Framework provide some kind of "auto-update" mechanism, e.g. a plugin/service that checks for updates every time the program/system starts?
Check for updates would be enough, since the installation itself can be done using the maintanance tool.
All I could find about this topic was this small sentence:
End users can use the maintenance tool to install additional components from the server after the initial installation, as well as to receive automatic updates to content as soon as the updates are published on the server.
from here: http://doc.qt.io/qtinstallerframework/ifw-overview.html#choosing-installer-type
Thanks for your help!
Edit: Suggestion
Based on this question's accepted answere I created a small library to automatically check for updates using the installer framework - https://github.com/Skycoder42/QtAutoUpdater
What I do, is run the maintenance tool using QProcess, and then check the output. It has a mode where it doesn't run the GUI but only outputs update information if available.
Note that I set the working directory to the application's path when the applications starts, so I can just run maintenancetool.
QProcess process;
process.start("maintenancetool --checkupdates");
// Wait until the update tool is finished
process.waitForFinished();
if(process.error() != QProcess::UnknownError)
{
qDebug() << "Error checking for updates";
return false;
}
// Read the output
QByteArray data = process.readAllStandardOutput();
// No output means no updates available
// Note that the exit code will also be 1, but we don't use that
// Also note that we should parse the output instead of just checking if it is empty if we want specific update info
if(data.isEmpty())
{
qDebug() << "No updates available";
return false;
}
// Call the maintenance tool binary
// Note: we start it detached because this application need to close for the update
QStringList args("--updater");
bool success = QProcess::startDetached("maintenancetool", args);
// Close the application
qApp->closeAllWindows();
In the latest Qt Installer Framework 4.1 --checkupdates returns nothing, use ch or check-updates instead.
Commands:
in, install - install default or selected packages - <pkg ...>
ch, check-updates - show available updates information on maintenance tool
up, update - update all or selected packages - <pkg ...>
rm, remove - uninstall packages and their child components - <pkg ...>
li, list - list currently installed packages - <regexp>
se, search - search available packages - <regexp>
co, create-offline - create offline installer from selected packages - <pkg ...>
pr, purge - uninstall all packages and remove entire program directory
I just found a pretty nice implementation on GitHub:
https://github.com/ioriayane/TheArtOfQt2/blob/master/src/HelloWorld/maintenancetool.cpp
It takes care of handling Windows, MacOS and Linux. + It is written to use in QML / Qt Quick bindings (+ example).
It has some Japanese comments, but is Apache 2.0 licensed, so freely to use (following Apache 2.0 requirement).
There's a section in the guide about how to do it, but they call it promoting updates rather than auto updates, IFW Updates on doc.qt.io.

String substitution in Visual Studio Team Services

I am setting up a build in Visual Studio Team Services (formerly Visual Studio Online) for my NopCommerce application. The database connection string is defined in a file called Settings.txt and I would like the value to be updated by my build using a build variable.
I have tried using the $(varName) placeholder as suggested here , but it didn't do anything. Any suggestions? Thanks.
You can't use the variable placeholder directly in the file and there's currently no task available OOTB which does replace values inside of files. You'll need to pass it to a Script (PowerShell, Batch, etc) which replaces the value in the file.
You can use the tokenizer task to achieve this. I don't think that it is available in VSTS by default but you can upload it. You can find the instructions to upload and use in Readme.MD
More details at these two links
http://blogs.ripple-rock.com/rorystreet/2015/11/25/UsingVSTSReleaseWithTokenisationToDeployWebsites.aspx
https://github.com/TotalALM/VSO-Tasks/tree/master/VSO%20Tasks/Tokenization

Resources