Skip to content

[Xamarin.Android.Build.Tasks] Warning when building Forms app: MSB324 7 Found conflicts between different versions of the same dependent assembly - #273

Merged
jonpryor merged 1 commit into
dotnet:masterfrom
dellis1972:Bug44193
Oct 24, 2016
Merged

jonpryor merged 1 commit into
dotnet:masterfrom
dellis1972:Bug44193

Conversation

@dellis1972

Copy link
Copy Markdown
Contributor

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=44193

Recent changes to support .Net Standard resulted in builds
producing the following warnings

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2113,3): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: (MSB3247)

This is a result of Facade assemblies having different (lower)
version numbers to the ones which are used in the final app. It also
effects situations where the assemblies are picked out of the GAC rather
than the local framework directory (Mandroid/vX.0).

This commit adds code similar to what is used in the iOS/Mac
projects (xamarin-macios/3fcb2ed8) to remove the GAC search from the
search path for assemblies. This will ensure that we never pick out
a reference from the GAC for Android based projects.

It also adds the AutoUnify property to the ResolveAssemblyReferences
task to get rid of the warning when resolving _ResolveSatellitePaths.

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />

<!-- Do not resolve from the GAC under any circumstances in Mobile -->
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == 'MonoAndroid'" >

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any (supported?) circumstances in which Xamarin.Android.Bindings.targets will be used when $(TargetFrameworkIdentifier) isn't MonoAndroid? This Condition seems weird.

Rephrased: shouldn't we always do this?

</Choose>

<!-- Do not resolve from the GAC under any circumstances in Mobile -->
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == 'MonoAndroid'" >

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

…7 Found conflicts between different versions of the same dependent assembly

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=44193

Recent changes to support .Net Standard resulted in builds
producing the following warnings

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2113,3): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file:   (MSB3247)

This is a result of Facade assemblies having different (lower)
version numbers to the ones which are used in the final app. It also
effects situations where the assemblies are picked out of the GAC rather
than the local framework directory (Mandroid/vX.0).

This commit adds code similar to what is used in the iOS/Mac
projects (xamarin-macios/3fcb2ed8) to remove the GAC search from the
search path for assemblies. This will ensure that we never pick out
a reference from the GAC for Android based projects.

It also adds the AutoUnify property to the ResolveAssemblyReferences
task to get rid of the warning when resolving _ResolveSatellitePaths.
@dellis1972

Copy link
Copy Markdown
Contributor Author

@jonpryor should be good to go

@jonpryor
jonpryor merged commit 78b0ff9 into dotnet:master Oct 24, 2016
dellis1972 added a commit that referenced this pull request Nov 1, 2016
…#273)

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=44193

Recent changes to support .Net Standard resulted in builds
producing the following warnings

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2113,3): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file:   (MSB3247)

This is a result of Facade assemblies having different (lower)
version numbers to the ones which are used in the final app. It also
effects situations where the assemblies are picked out of the GAC rather
than the local framework directory (Mandroid/vX.0).

This commit adds code similar to what is used in the iOS/Mac
projects (xamarin-macios/3fcb2ed8) to remove the GAC search from the
search path for assemblies. This will ensure that we never pick out
a reference from the GAC for Android based projects.

It also adds the AutoUnify property to the ResolveAssemblyReferences
task to get rid of the warning when resolving _ResolveSatellitePaths.
dellis1972 added a commit that referenced this pull request Nov 1, 2016
…#273)

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=44193

Recent changes to support .Net Standard resulted in builds
producing the following warnings

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2113,3): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file:   (MSB3247)

This is a result of Facade assemblies having different (lower)
version numbers to the ones which are used in the final app. It also
effects situations where the assemblies are picked out of the GAC rather
than the local framework directory (Mandroid/vX.0).

This commit adds code similar to what is used in the iOS/Mac
projects (xamarin-macios/3fcb2ed8) to remove the GAC search from the
search path for assemblies. This will ensure that we never pick out
a reference from the GAC for Android based projects.

It also adds the AutoUnify property to the ResolveAssemblyReferences
task to get rid of the warning when resolving _ResolveSatellitePaths.
radical pushed a commit that referenced this pull request May 8, 2018
Fixes: #1396

If `//constructor/@deprecated` has a value of `deprecated`, then the
constructor should be `[Obsolete]`.

This is what is already done with methods.
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants