Other .aar library not included in .aar library after build - android-studio

I have a library project A, which contains a custom library B in aar format, which is hosted on a Maven Server.
If I build A now and export it as an aar, B is not included in the file, whereas several jar libs are included.
I´ve checked the .iml file of my module and found the following lines:
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.libs/libraryb/0.0.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.2.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-ads/7.8.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-analytics/7.8.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-appindexing/7.8.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-base/7.8.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-plus/7.8.0/jars" />
Those contents seem to be excluded completely.
Is it possible to have the aar included in any way or does it only work with jar files?

Related

Azure Devops Pipeline build fails Could not resolve this reference Could not locate the assembly

First time using the Azure Devops and the first pipeline I set up keeps on failing. I have a project created in VS 2019 to test the new Xero Oauth 2.0 implementation. I have installed the Xero.NetStandard nuget packages and all other nuget packages it requires. Everything is building fine on my work machine.
I then checked-in all my source code items in our Azure Devops, then created a pipeline to test if the solution will build.... guess what it failed.
I've got a whole heaps of warnings saying that the dlls for Xero, basically all dlls installed on my project when I installed Xero.NetStandard nuget packages cannot be resolved because they are not on the disk.
I was under the impression that the Nuget restore part of the pipeline is responsible for making sure all these nuget packages will be installed in the build agent. The nuget restore part of my pipeline says "All packages listed in packages.config are already installed."
So I am lost why these warnings are appearing. Am i missing a step in building the pipepline?
Would really appreciate any thoughts and help. Thank you.
These are some warnings I am receiving which in turns create errors on the build.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=e7877f4675df049f, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "JsonSubTypes, Version=1.5.2.0, Culture=neutral, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "KellermanSoftware.Compare-NET-Objects, Version=4.57.0.0, Culture=neutral, PublicKeyToken=d970ace04cc85217, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Extensions.Configuration, Version=3.1.8.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Extensions.Configuration.Abstractions, Version=3.1.8.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Extensions.Configuration.Binder, Version=3.1.8.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Extensions.DependencyInjection, Version=3.1.8.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Extensions.DependencyInjection.Abstractions, Version=3.1.8.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Extensions.Http, Version=3.1.8.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Extensions.Logging, Version=3.1.8.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Extensions.Logging.Abstractions, Version=3.1.8.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Extensions.Options, Version=3.1.8.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Extensions.Primitives, Version=3.1.8.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "RestSharp, Version=106.11.4.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.ComponentModel.Annotations, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Text.Json, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Xero.NetStandard.OAuth2, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Xero.NetStandard.OAuth2Client, Version=1.3.1.0, Culture=neutral, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.CodeDom.Providers.DotNetCompilerPlatform". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\8\s\$(SourceDir)\XeroIntegration\XeroIntegration\XeroIntegration.vbproj]
This is my Agent's job YAML
pool:
name: Azure Pipelines
demands:
- msbuild
- visualstudio
#Your build pipeline references an undefined variable named ‘Parameters.solution’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
#Your build pipeline references an undefined variable named ‘Parameters.solution’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
#Your build pipeline references the ‘BuildPlatform’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘BuildPlatform’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references an undefined variable named ‘Parameters.ArtifactName’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
steps:
- task: NuGetToolInstaller#1
displayName: 'Use NuGet 5.8.1'
inputs:
versionSpec: 5.8.1
checkLatest: true
- task: NuGetCommand#2
displayName: 'NuGet restore'
inputs:
restoreSolution: '$(Parameters.solution)'
feedsToUse: config
nugetConfigPath: '$/XeroAppTest/XeroIntegration/nuget.config'
- task: VSBuild#1
displayName: 'Build solution'
inputs:
solution: '$(Parameters.solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\"'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
restoreNugetPackages: true
- task: VSTest#2
displayName: 'Test Assemblies'
inputs:
testAssemblyVer2: |
**\$(BuildConfiguration)\*test*.dll
!**\obj\**
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
enabled: false
- task: PublishSymbols#2
displayName: 'Publish symbols path'
inputs:
SearchPattern: '**\bin\**\*.pdb'
PublishSymbols: false
enabled: false
continueOnError: true
- task: PublishBuildArtifacts#1
displayName: 'Publish Artifact'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: '$(Parameters.ArtifactName)'
condition: succeededOrFailed()
Below is the packages.config
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CompareNETObjects" version="4.57.0" targetFramework="net472" />
<package id="IdentityModel" version="4.0.0" targetFramework="net472" />
<package id="JsonSubTypes" version="1.5.2" targetFramework="net472" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="1.1.1" targetFramework="net472" />
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net472" />
<package id="Microsoft.Extensions.Configuration" version="3.1.8" targetFramework="net472" />
<package id="Microsoft.Extensions.Configuration.Abstractions" version="3.1.8" targetFramework="net472" />
<package id="Microsoft.Extensions.Configuration.Binder" version="3.1.8" targetFramework="net472" />
<package id="Microsoft.Extensions.DependencyInjection" version="3.1.8" targetFramework="net472" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="3.1.8" targetFramework="net472" />
<package id="Microsoft.Extensions.Http" version="3.1.8" targetFramework="net472" />
<package id="Microsoft.Extensions.Logging" version="3.1.8" targetFramework="net472" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="3.1.8" targetFramework="net472" />
<package id="Microsoft.Extensions.Options" version="3.1.8" targetFramework="net472" />
<package id="Microsoft.Extensions.Primitives" version="3.1.8" targetFramework="net472" />
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net472" />
<package id="RestSharp" version="106.11.4" targetFramework="net472" />
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
<package id="System.ComponentModel.Annotations" version="4.7.0" targetFramework="net472" />
<package id="System.Memory" version="4.5.4" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.7.1" targetFramework="net472" />
<package id="System.Text.Encodings.Web" version="4.7.1" targetFramework="net472" />
<package id="System.Text.Json" version="4.7.2" targetFramework="net472" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
<package id="Xero.NetStandard.OAuth2" version="3.16.1" targetFramework="net472" />
<package id="Xero.NetStandard.OAuth2Client" version="1.3.1" targetFramework="net472" />
</packages>
And finally, this is my nuget.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="My Packages" value="https://dev.azure.com/mycompany/XeroAppTest/_versionControl?path=$/XeroAppTest/XeroIntegration/packages" />
<add key="NuGet official package source" value="https://nuget.org/api/v2/" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
</configuration>
For anyone, having the same issue like mine, I found an issue, rookie mistake. The reason mine is failing is because I also checked in the packages folder that is on my local machine. When I deleted the folder from my repo, the pipeline builds ok. Thank you everyone

Test error :Could not load file or assembly 'Castle.Core, Version=4.0.0.0, Culture=neutral

I installed the free startup template of ASP.NET Boilerplate with the architecture Asp.Net Mvc5.x and Single Page Web Application Angular JS
and when I run the already added test to template as an example which is called Should_Get_Current_User_And_Tenant_When_Logged_In_As_Tenant() which is found in the project
SpecificDownloadedProjectName.Tests
I get the error
Could not load file or assembly 'Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
my current version of castle.core is v4.3.1
and of Abp 3.8.3
and these versions are the last latest available ones in NuGet packages
I tried to update Castle.core via NuGet Package Manager to be 4.0.0 as the exception message mentions but I couldn't with the following error
Severity Code Description Project File Line Suppression State
Error Unable to resolve dependencies. 'Castle.Core 4.0.0' is not compatible with 'Abp 3.8.3 constraint: Castle.Core (>= 4.3.1)', 'Castle.Core-log4net 4.3.1 constraint: Castle.Core (= 4.3.1)', 'Castle.DynamicProxy 2.2.0 constraint: Castle.Core (= 1.2.0)'. 0
what should I do in order to resolve this exception
This is the issue with the Nuget, it doesn't resolve it sometime, so you have to manually add the below lines in the web.config or app.config. You have to make sure the order of the lines also.
<dependentAssembly>
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.0.0.0" />
</dependentAssembly>
Note: You can set the oldVersion and newVersion values as per the requirement.

Already Installed Error Message not showing

I am building an MSI with custom dialogs, but I am not customizing the Welcome Dialog. I have a valid Product ID and Upgrade ID and AllowSameVersionUpgrades is also not there. The following is the UI code, which is being referenced in my Product.wxs.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<WixVariable Id="WixUIBannerBmp" Value="Images\Banner.bmp" />
<WixVariable Id="WixUIDialogBmp" Value="Images\dialog.bmp" />
<UI Id="CustomUI">
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
<!--Standard Dialog References needed to compile-Starts-->
<DialogRef Id="WelcomeDlg" />
<DialogRef Id="DiskCostDlg" />
<DialogRef Id="ErrorDlg" />
<DialogRef Id="FatalError" />
<DialogRef Id="FilesInUse" />
<DialogRef Id="UserExit" />
<!--Standard Dialog References needed to compile-Ends-->
<DialogRef Id="CustLicenseAgmtDlg"/>
<DialogRef Id="InstallDlg"/>
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="CustLicenseAgmtDlg">NOT Installed AND NOT PATCH</Publish>
<Publish Dialog="CustLicenseAgmtDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
<Publish Dialog="CustLicenseAgmtDlg" Control="Next" Event="NewDialog" Value="BrowsePathDlg">1</Publish>
<Publish Dialog="BrowsePathDlg" Control="Back" Event="NewDialog" Value="CustLicenseAgmtDlg">1</Publish>
<Publish Dialog="BrowsePathDlg" Control="Next" Event="NewDialog" Value="InstallDlg">1</Publish>
<Publish Dialog="InstallDlg" Control="Back" Event="NewDialog" Value="BrowsePathDlg">1</Publish>
</UI>
<InstallUISequence>
<Show Dialog="WelcomeDlg" Before="ProgressDlg">NOT Installed OR PATCH</Show>
</InstallUISequence>
<UIRef Id="WixUI_Common" />
<UIRef Id="WixUI_ErrorProgressText" />
</Fragment>
</Wix>
First time, the installer runs fine and installs the files. But from the next time, it is not showing the error that, it is already installed. Rather it jumps from the first to the last screen in a flash. But if I rebuild this MSI project in VS and run the new installer, it shows the error. I am not sure what am I doing wrong. Can anyone please help?
You are confusing what 'being installed' means.
You explicitly have a condition on showing your WelcomeDlg of NOT Installed OR PATCH this means you'll never show your WelcomeDlg when your product is already installed. "Installed" in this case is the special property that is set when this product is already installed.
The confusion is probably around "this product". What this means is that the installer with the same product GUID is already present on the system.
I'm guessing you have <Product Id="*"> in your installer. When you rebuild you get another Product GUID so when you run that new installer you built, even though it has everything else exactly the same as your old installer, the Product GUID is different. In Windows' eyes, this is a completely separate product so it will not set the "Installed" property and you'll show your welcome dialog. Since you, I assume, have some property that is set when your product is installed, it will show your "Already installed" error.
If you set your display condition to just 1 I think you'll get the behaviour you are expecting.
<InstallUISequence>
<Show Dialog="WelcomeDlg" Before="ProgressDlg">1 AND NOT REMOVE~="ALL"</Show>
</InstallUISequence>
I added the AND NOT REMOVE~="ALL" becuase I'm not too sure what will happen if you try to uninstall your product without that there. I think it would show the welcome dialog when you uninstall maybe? You'll have to test it with and without the extra AND on the dialog condition.
I think you should re-evaluate whether or not this is actually what you want to do because this seems kind of a weird behaviour to implement in your installer. It should already know its installed by default.
There are 4 elements that control this behavior
Product Id
Product UpgradeCode
Product Version
MajorUpgrade
If you want your installer to correctly block if it's version is installed (and replace itself if you are installing a new version) then you need those values to look like this
Product Id = * - essentially different each time you build the installer
Product UpgradeCode = Same GUID each time - use uuidgen to generate a guid and hardcode this into your element
Product Version = a Major.Minor.Revision version number set appropriately
<Product Id="*" UpgradeCode="guid" Version="1.0.1"
A MajorUpgrade element exists
<MajorUpgrade AllowSameVersionUpgrades="no" DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." />
With those elements set, once 1.0.1 is installed, future attempted installs (even if you have rebuilt the installer) will fail.
Bumping the version number to 1.0.2, rebuilding the installer, and running the install will result in 1.0.1 being uninstalled, and 1.0.2 being installed.
Note that you can set the "AllowSameVersionUpgrades" to "Yes" to allow the same version to be "reinstalled" over the existing one

System.MissingMethodException: Method not found: 'Microsoft .FSharp.Core.FSharpFunc`2

I've got a problem when launching a Canopy test in a Windows box:
Unhandled Exception: System.MissingMethodException: Method not found: 'Microsoft
.FSharp.Core.FSharpFunc`2<System.String,System.String> canopy.core.get_xpath()'.
at <StartupCode$UITest>.$Program.main#()
I guess this is because when compiling it, my Visual Studio 2012 restored Nuget packages and spitted this in the console output:
Consider app.config remapping of assembly "FSharp.Core, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.3.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\3.0\Runtime\v4.0\FSharp.Core.dll] to Version "4.4.0.0" [C:\Users\Andres\Documents\Code\endtoendtests\packages\FSharp.Core.4.0.0.1\lib\net40\FSharp.Core.dll] to solve conflict and get rid of warning.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly.
C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0\fsc.exe -o:obj\x86\Debug\UITest.exe -g --noframework --define:DEBUG --optimize- --tailcalls- --platform:x86 -r:C:\Users\Andres\Documents\Code\endtoendtests\packages\canopy.0.9.52\lib\canopy.dll -r:C:\Users\Andres\Documents\Code\endtoendtests\packages\FSharp.Core.4.0.0.1\lib\net40\FSharp.Core.dll -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Drawing.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Numerics.dll" -r:C:\Users\Andres\Documents\Code\endtoendtests\packages\Selenium.WebDriver.2.53.0\lib\net40\WebDriver.dll --target:exe --warnaserror:76 --vserrors --validate-type-providers --LCID:1033 --utf8output --fullpaths --flaterrors --highentropyva- "C:\Users\Andres\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.fs" AssemblyInfo.fs Program.fs
UITest -> C:\Users\Andres\Documents\Code\endtoendtests\UITest\bin\Debug\UITest.exe
How to exactly add this remapping to fix this problem?
Managed to get it to work with this App.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="4.3.0.0" newVersion="4.4.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
This must be because I've never installed F#, so that I'm using the version that comes with my VS2012 (v3.0). I know I know, I should upgrade to 3.1, or 4.0 even.

How to correctly exclude slf4j-jdk14 when using slfj-log4j12?

I am using Ivy for dependency management in my project. I want to use SLF4J for logging. I added
<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.7.5" />
And it downloads both slf4j-log4j12 and slf4j-jdk14, which cause a binding conflict. I tried to exclude it by using
<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.7.5">
<exclude module="slf4j-jdk14" />
</dependency>
But the module is still downloaded. I have put the exclude tag directly under the dependencies tag to exclude this module. Why?
Simplest way to solve this problem is to create a global exclude:
<dependencies>
<dependency ..
<dependency ..
<dependency ..
<exclude org="org.slf4j" module="slf4j-jdk14"/>
</dependencies>
To discover where transitive dependencies come from, I recommend always generating an ivy report:
<target name="resolve" description="Resolve dependencies using ivy">
<ivy:resolve/>
<ivy:report todir="${build.dir}/ivy-report" graph="false"/>
</target>

Resources