VS 2010 Bootstrapper package - visual-studio-2010

I'm trying to create bootstrapper package for Visual Studio 2010. It has appeared in prerequisites window. Here is my product.xml
<?xml version="1.0" encoding="utf-8"?>
<Product ProductCode="FaroLS" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
<PackageFiles CopyAllPackageFiles="true">
<PackageFile Name="faro ls 5.2.0.35213 x64 setup.exe" />
<PackageFile Name="example.faro.ls.exe.manifest" />
<PackageFile Name="faro.ls_5.2.0.35213.msi" />
<PackageFile Name="farolsdemoscans.zip" />
<PackageFile Name="faroopendemoapp.zip" />
<PackageFile Name="farosdkdemoapp.zip" />
<PackageFile Name="unins000.dat" />
<PackageFile Name="unins000.exe" />
<PackageFile Name="vcredist_x64.exe" />
<PackageFile Name="vcredist_x64_90.exe" />
</PackageFiles>
<InstallChecks>
<RegistryCheck Property="IsInstalled" Key="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FARO LS_is1\" Value="Inno Setup: Setup Version"/>
</InstallChecks>
<Commands Reboot="Defer">
<Command PackageFile="faro ls 5.2.0.35213 x64 setup.exe">
<InstallConditions>
<BypassIf Property="IsInstalled" Compare="VersionGreaterThanOrEqualTo" Value="5.1.6" />
</InstallConditions>
<ExitCodes>
<DefaultExitCode Result="Fail" String="Anunexpectedexitcodewasr" FormatMessageFromSystem="true" />
</ExitCodes>
</Command>
</Commands>
</Product>
File example.faro.ls.exe.manifest
<?xml version="1.0" encoding="utf-8"?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='FARO.LS' version='1.1.502.0' processorArchitecture='amd64' publicKeyToken="1d23f5635ba800ab"/>
</dependentAssembly>
</dependency>
</assembly>
To determine whether i have already installed this product i'm checking registry entry
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FARO LS_is1\Inno Setup: Setup Version
And now the bad things. Registry check does not work. Every time i launch product setup it asks me to install additional component, even if it is already installed.
And when installation starts i get error:
Setup has detected that the file 'C:\Users\user\AppData\Local\Temp\VSD1F0C.tmp\FaroLS\faro ls 5.2.0.35213 x64 setup.exe'
has either changed since it was initially published or may be corrupt.
See the setup log file located at
'C:\Users\user\AppData\Local\Temp\VSD1F0C.tmp\install.log' for more information.
I found some similar topics on stackoverflow, where .net 4.5 caused this problem. But i don't have one installed.
File faro ls 5.2.0.35213 x64 setup.exe does not have digital signature. Can it cause errors? Are there any ways to make it work?

Related

MSIX randomly not installing Windows service

I have a Windows desktop application build using Maui and installed using an MSIX installer. A key part of the desktop application is a Windows service which should be installed by the MSIX installer.
I've found that randomly however it does not install the service. The installer also does not throw any error causing end users to open up the app only for it to crash (because of a missing service).
What I've found:
On a system where the app has not been installed before the service gets installed without problems
At any point when updating the app with a newer version or simply reinstalling the app the service might be missing afterwards
Once you get in a state where the service is missing no amount of reboots or reinstalls can fix the problem with one exception: installing a completely new version can fix the problem (for example: upgrading from 1.6.0 to 1.7.0 can fix the problem, same for downgrading).
Windows event viewer does not report any errors or problems as far as I've found (checked the AppXDeployment-Server logs)
The installer does prompt for elevated rights
I'm sure I probably made a mistake in my appxmanifest but I don't see it. Any help would be appreciated.
Our appxmanifest looks like this
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
xmlns:desktop6="http://schemas.microsoft.com/appx/manifest/desktop/windows10/6"
IgnorableNamespaces="uap rescap">
<Identity Name="NAME" Publisher="PUBLISHER" Version="0.0.0.0" />
<Properties>
<DisplayName>NAME</DisplayName>
<PublisherDisplayName>NAME</PublisherDisplayName>
<Logo>$placeholder$.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<PackageDependency Name="Microsoft.VCLibs.140.00.UWPDesktop" MinVersion="14.0.24217.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="$placeholder$"
Description="$placeholder$"
Square150x150Logo="$placeholder$.png"
Square44x44Logo="$placeholder$.png"
BackgroundColor="transparent">
<uap:DefaultTile Square71x71Logo="$placeholder$.png" Wide310x150Logo="$placeholder$.png" Square310x310Logo="$placeholder$.png" />
<uap:SplashScreen Image="$placeholder$.png" />
</uap:VisualElements>
<Extensions>
<desktop:Extension Category="windows.startupTask" Executable="NAME.exe" EntryPoint="MauiProgram.CreateMauiApp">
<desktop:StartupTask TaskId="NAME" Enabled="true" DisplayName="NAME" />
</desktop:Extension>
<desktop6:Extension
Category="windows.service"
Executable="SERVICE_EXECUTABLE.exe"
EntryPoint="SERVICE_NAMESPACE.Program">
<desktop6:Service
Name="SERVICE_NAME"
StartupType="auto"
StartAccount="localSystem"
Arguments="/manage"
>
</desktop6:Service>
</desktop6:Extension>
</Extensions>
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
<rescap:Capability Name="allowElevation" />
<rescap:Capability Name="packagedServices" />
<rescap:Capability Name="packageManagement" />
<rescap:Capability Name="localSystemServices" />
</Capabilities>
</Package>

Dotfuscator command exited with code 1 xamarin.ios

I am trying to use PreEmptive Solutions - Dotfuscator with my Xamarin.IOS app, but the build fails and I am getting this error:
I have done all the steps from here:
https://www.preemptive.com/obfuscating-xamarin-with-dotfuscator
My Xamarin.Android works fine, but the IOS project fails.
The error:
The command ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\PreEmptive Solutions\Dotfuscator and Analytics Community Edition\dotfuscatorCLI.exe" /p:InDir="obj\iPhone\Release\DotfuscatorXamarin\dfin",OutDir="obj\iPhone\Release\DotfuscatorXamarin\dfout",ReportDir="DotfuscatorReports\iPhone\Release" "DotfuscatorConfig.xml"" exited with code 1.
Any idea how I can fix it?
Update 29-06-2017:
Content of DotfuscatorConfig.xml file for the Xamarin.IOS project
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE dotfuscator SYSTEM "http://www.preemptive.com/dotfuscator/dtd/dotfuscator_v2.3.dtd">
<dotfuscator version="2.3">
<propertylist>
<property name="InDir" value="obj\iPhone\Release\DotfuscatorXamarin\dfin" />
<property name="OutDir" value="obj\iPhone\Release\DotfuscatorXamarin\dfout" />
<property name="ReportDir" value="DotfuscatorReports\iPhone\Release" />
</propertylist>
<global>
<option>monocompat</option>
</global>
<input>
<asmlist>
<inputassembly refid="7cf160e1-e28e-4f81-bd8d-f10fdcbcc3f8">
<option>honoroas</option>
<option>stripoa</option>
<option>library</option>
<option>transformxaml</option>
<file dir="${configdir}\${InDir}" name="MyProject.dll" />
</inputassembly>
<inputassembly refid="2d40ee83-3b30-421c-8b1a-fa4d404fb2d9">
<option>honoroas</option>
<option>stripoa</option>
<option>library</option>
<option>transformxaml</option>
<file dir="${configdir}\${InDir}" name="MyProject.dll.mdb" />
</inputassembly>
<inputassembly refid="11652964-9a02-4f24-b042-25f260fada88">
<option>honoroas</option>
<option>stripoa</option>
<option>library</option>
<option>transformxaml</option>
<file dir="${configdir}\${InDir}" name="MyProject.iOS.exe" />
</inputassembly>
</asmlist>
</input>
<output>
<file dir="${configdir}\${OutDir}" />
</output>
<renaming>
<option>xmlserialization</option>
<mapping>
<mapoutput overwrite="true">
<file dir="${configdir}\${ReportDir}" name="Renaming.xml" />
</mapoutput>
</mapping>
<referencerulelist>
<referencerule rulekey="{6655B10A-FD58-462d-8D4F-5B1316DFF0FF}" />
<referencerule rulekey="{7D9C8B02-2383-420f-8740-A9760394C2C1}" />
<referencerule rulekey="{229FD6F8-5BCC-427b-8F72-A7A413ECDF1A}" />
<referencerule rulekey="{2B7E7C8C-A39A-4db8-9DFC-6AFD38509061}" />
<referencerule rulekey="{494EA3BA-B947-44B5-BEE8-A11CC85AAF9B}" />
<referencerule rulekey="{89769974-93E9-4e71-8D92-BE70E855ACFC}" />
<referencerule rulekey="{4D81E604-A545-4631-8B6D-C3735F793F80}" />
</referencerulelist>
</renaming>
<sos mergeruntime="true">
<option>version:v4</option>
<option>disable</option>
<option>dontsendtamper</option>
</sos>
<smartobfuscation>
<smartobfuscationreport verbosity="all" overwrite="true">
<file dir="${configdir}\${ReportDir}" name="SmartObfuscation.xml" />
</smartobfuscationreport>
</smartobfuscation>
</dotfuscator>
And for PreEmptive.Dotfuscator.Xamarin.targets file, I am using the one from the offical website.
PreEmptive.Dotfuscator.Xamarin.targets
As mentioned in the comments to the question, I work for PreEmptive Solutions.
This is a bug in the Dotfuscator-Xamarin targets file (PreEmptive.Dotfuscator.Xamarin.targets), so sorry about that.
Note: This issue has been corrected in version 1.1.0 of the targets file. The latest version of the file can be downloaded on this page.
Specifically, when generating the initial Dotfuscator config file (DotfuscatorConfig.xml), we were treating an MDB (Mono debug symbol) file as an input assembly.
The next version of the targets file will correct this issue.
To resolve this issue with version 1.0.0 of the targets file, please delete the following lines from DotfuscatorConfig.xml:
<inputassembly refid="2d40ee83-3b30-421c-8b1a-fa4d404fb2d9">
<option>honoroas</option>
<option>stripoa</option>
<option>library</option>
<option>transformxaml</option>
<file dir="${configdir}\${InDir}" name="MyProject.dll.mdb" />
</inputassembly>
The targets file will use your corrected version from then on.

Wix to remove previous version that was installed with Bootstrapper from control panel

I've got "ABC 10.1" program version installed on computer allready and I would like to remove it on each newer ABC.msi installation (for example when ABC 10.2 is going to be installed).
So far I've used a BOOTSTRAPPER to install new versions and it worked like a charm (the previous version was uninstalled and removed from the control panel and newest was appearing in the control panel).
Right now I would like to use ABC.msi for installation and to not use the BOOTSTRAPPER, but when I use ABC.msi installer the previous one is not being removed from the control panel and I have two "ABCs" 10.1 and 10.2 versions in the control panel.
How can I remove ABC previous version that was installed by BOOTSTRAPPER during newest ABC.msi installation (and avoid duplicating ABC in Control Panel)?
Bundle.wxs
<Bundle
Name="$(var.ProductName)"
Version="$(var.ShowVersion)"
Manufacturer="ABC"
UpgradeCode="33312c8d-64f1-4a04-a98e-4aa692de6aaf"
IconSourceFile="$(var.BaseDir)\Setup\UI\ABC.ico"
Condition="((VersionNT = v6.1 AND ServicePackLevel >= 1) OR (VersionNT > v6.1)) AND (WixBundleInstalled = 0)">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication
LicenseFile="$(var.BaseDir)\Setup\UI\License.rtf"
LogoFile="$(var.BaseDir)\Setup\UI\OticonAppIcon.png"
SuppressOptionsUI="yes"
ShowVersion="yes"/>
</BootstrapperApplicationRef>
<Chain>
<!-- Install .Net 4.6.1 -->
<PackageGroupRef Id='NetFx461Redist'/>
<!-- my packages to install -->
<PackageGroupRef Id="InstallerPackages" />
</Chain>
</Bundle>
<Fragment>
<PackageGroup Id ="InstallerPackages" >
<MsiPackage SourceFile="$(var.OutDir)\ABC.MSI" />
<MsiPackage SourceFile="$(var.OutDir)\DatabaseInstallerABC.msi" />
</PackageGroup>
</Fragment>
productABC.wxs (the file that is creating ABC.msi) is as following:
<?xml version="1.0" encoding="UTF-8"?>
<?include .\defines.wxi ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" xmlns:fire="http://schemas.microsoft.com/wix/FirewallExtension" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Id="$(var.ProductCode)"
Codepage="1252" Language="1033"
Manufacturer="ABC" Name="$(var.ProductName)"
UpgradeCode="{3338CE6B-D733-41AF-830B-DCAFE2E0CD58}"
Version="$(var.ProductVersion)">
<Package Id="*"
Compressed="yes"
InstallerVersion="300"
Languages="1033"
Manufacturer="ABC"
Platform="x86" />
<Media Id="1"
Cabinet="media1.cab"
EmbedCab="yes" />
----some directories and components----
<MajorUpgrade
Schedule="afterInstallInitialize"
DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit."
AllowSameVersionUpgrades="yes"/>
<InstallExecuteSequence>
<LaunchConditions After="AppSearch" />
<Custom Action="SetTargetDir" Before="CostFinalize"></Custom>
<Custom Action="SaveTargetDir" After="InstallValidate"></Custom>
</InstallExecuteSequence>
<WixVariable Id="WixUILicenseRtf" Value="$(var.BaseDir)\Setup\UI\License.rtf" />
<WixVariable Id="WixUIBannerBmp" Value="$(var.BaseDir)\Setup\UI\bannrbmp.bmp" />
<WixVariable Id="WixUIDialogBmp" Value="$(var.BaseDir)\Setup\UI\ABCbackground.bmp" />
</Product>
</Wix>
Generic answer: The wix bootstrapper is what writes the entry in the Control Panel for your "ABC 10.1" release. In order to remove that, your 10.2 release will need to have a custom action tell the previous bundle to uninstall itself ("previous-cached-bundle.exe /silent /uninstall" or something similar). Now, whether you tell the old bundle to remove itself first, or you allow your MSI to upgrade first is up to your own requirements.

Windows 10 IOT Foundation namespace is missing IOT

We are trying to add iot capabilities to our Package.appxmanifest for a cordova project. Visual studio complains that the capability we are trying to use cannot be found nor is it a child of the foundation name space.
The underlined iot:Capability shows the following when hovered over:
The element 'BackgroundTasks' in namespace 'http://schemas.microsoft.com/appx/manifest/foundation/winows10' has invalid child element 'Capabilities' in namespace 'http://schemas.microsoft.com/appx/manifest/iot/windows10'. List of possible elements expected: '...
The thing is I created this as a new project and let vs do all the work yet it cannot resolve it's own entries it's creating. We see this with both a new C# and JS project that VS generated. Can anyone help us? (Yes we added the references "Windows IoT Extensions for the UWP" 10.0.10586.0 to the project as well.). FYI We get the same error when adding as well.
Here's the package.appxmanifest:
<?xml version='1.0' encoding='utf-8'?>
<Package IgnorableNamespaces="uap mp iot" xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:iot="http://schemas.microsoft.com/appx/manifest/iot/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10">
<Identity Name="com.project.syndication.sitepad" Publisher="CN=$username$" Version="2.0.0.0" />
<mp:PhoneIdentity PhoneProductId="a885d1d0-453e-11e6-a59d-550bfa336405" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>SitePad App</DisplayName>
<PublisherDisplayName>ERT</PublisherDisplayName>
<Logo>images\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily MaxVersionTested="10.0.10586.0" MinVersion="10.0.10586.0" Name="Windows.Universal" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="com.project.syndication.sitepad" StartPage="ms-appx-web:///www/index.html">
<uap:VisualElements BackgroundColor="#464646" Description="CordovaApp" DisplayName="SitePad App" Square150x150Logo="images\Square150x150Logo.png" Square44x44Logo="images\Square44x44Logo.png">
<uap:SplashScreen Image="images\splashscreen.png" />
<uap:DefaultTile ShortName="SitePad App" Square310x310Logo="images\Square310x310Logo.png" Square71x71Logo="images\Square71x71Logo.png" Wide310x150Logo="images\Wide310x150Logo.png" />
</uap:VisualElements>
<uap:ApplicationContentUriRules>
<uap:Rule Match="ms-appx-web:///" Type="include" WindowsRuntimeAccess="all" />
</uap:ApplicationContentUriRules>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
<uap:Capability Name="picturesLibrary" />
<iot:Capability Name="systemManagement" />
</Capabilities>
</Package>
The hovering error looks like a bug with something(VS?), I'm seeing it multiple times, yet my code still compiles and runs OK.
No worries on this.

SQL Server CE 4 Clickonce deploy VS2013

According to MS, SQL Server CE is being deprecated, but for now, I really can't think about migrating to SQL Server Express or LocalDB, so, on VS 2013, there is a exclamation with a text "Prerequisite could not be found for bootstrapping". Is there a way to workaround? When my program is deployed, SQL Server CE need to be installed automatically.
Thanks in advance
I had got the same problem. SQL Server Compact Edition 4.0 was not existed in my VS 2013 Prerequisite list in publish section of my project. To solve the same problem I've used next steps:
Download install files for Microsoft® SQL Server® Compact 4.0 SP1
Go to C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper\Packages
Create SQL Server Compact Edition 4.0 folder in current location
Copy downloaded install files to created folder
Create product.xml file in created folder and copy next code in this file
product.xml:
<?xml version="1.0" encoding="utf-8"?>
<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="System.Data.SqlServerCe.4.0">
<InstallChecks>
<FileCheck Property="IsInstalled"
FileName="System.Data.SqlServerCe.dll" SearchPath="C:\Program Files\Microsoft SQL Server Compact Edition\v4.0\Desktop" />
</InstallChecks>
<PackageFiles CopyAllPackageFiles="false">
<PackageFile
Name="SSCERuntime_x86-ENU.exe"
HomeSite="sqllocaldb_32" />
<PackageFile
Name="SSCERuntime_x64-ENU.exe"
HomeSite="sqllocaldb_64" />
</PackageFiles>
<Commands Reboot="Defer">
<Command PackageFile="SSCERuntime_x86-ENU.exe" Arguments="">
<InstallConditions>
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
<BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel" />
<BypassIf Property="IsInstalled" Compare="ValueExists" Value="0" />
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success" />
<ExitCode Value="1641" Result="SuccessReboot" />
<ExitCode Value="3010" Result="SuccessReboot" />
<DefaultExitCode Result="Fail" String="GeneralFailure" FormatMessageFromSystem="true" />
</ExitCodes>
</Command>
<Command PackageFile="SSCERuntime_x64-ENU.exe" Arguments="" >
<InstallConditions>
<BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="amd64" />
<BypassIf Property="IsInstalled" Compare="ValueExists" Value="0" />
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success" />
<ExitCode Value="1641" Result="SuccessReboot" />
<ExitCode Value="3010" Result="SuccessReboot" />
<DefaultExitCode Result="Fail" String="GeneralFailure" FormatMessageFromSystem="true" />
</ExitCodes>
</Command>
</Commands>
</Product>
Create en folder in created folder
In en folder create package.xml file and copy next code in this file:
package.xml:
<?xml version="1.0" encoding="utf-8" ?>
<Package
xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
Name="DisplayName"
Culture="Culture">
<!-- Defines a localizable string table for error messages-->
<Strings>
<String Name="DisplayName">SQL Server Compact Edition 4.0</String>
<String Name="Culture">en</String>
<String Name="AdminRequired">Administrator permissions are required to install SQL Server Compact Edition 4.0. Contact your administrator.</String>
<String Name="GeneralFailure">A failure occurred attempting to install SQL Server Compact Edition 4.0.</String>
</Strings>
</Package>
Restart MS Visual Studio
And you can find SQL Server Compact Edition 4.0 in Prerequisite
If for one reason or another you can't (directly) apply the fix of Erik, then you can try the following workaround:
Get a hold on the SQL Server Compact Edition 4.0 bootstrap package, you might find it somewhere on your disk or you could get it from a colleague
Install that package in the C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper\Packages folder, as this folder is used by VS2013 to look for bootstrap packages
Restart VS and the prerequisite warning should be gone
You can simply include the SQLCE dll files with your app, I have several blog posts on how to do this

Resources