Skip to content

Conversation

@jonathanpeppers
Copy link
Member

Context: dotnet/android#1747

Downstream in xamarin-android, I started getting a build failure on
Windows such as:

xamarin-android\external\Java.Interop\src\Xamarin.Android.Cecil\Xamarin.Android.Cecil.targets(23,5): error MSB3375: The file "..\..\bin\Debug\\Xamarin.Android.Cecil.dll" does not exist.
xamarin-android\external\Java.Interop\src\Xamarin.Android.Cecil\Xamarin.Android.Cecil.targets(23,5): error MSB3375: The file "..\..\bin\Debug\\Xamarin.Android.Cecil.Mdb.dll" does not exist.

Looking in my external\Java.Interop\bin\Debug directory, the
Mono.Cecil assemblies were named Mono.Cecil.* instead of
Xamarin.Android.*.

I think this was an oversight, but I don't know how the builds were
green...

Looking at Mono.Cecil.csproj in
xamarin-android/external/mono/external/cecil there was no way to
override AssemblyName. But we can use the <Move /> task instead.

To fix this:

  • Added a _MonoCecilAssemblies to check for any files named
    Mono.Cecil.*
  • <Move /> the files to start with Xamarin.Android.* instead.

…ctory)

Context: dotnet/android#1747

Downstream in xamarin-android, I started getting a build failure on
Windows such as:

    xamarin-android\external\Java.Interop\src\Xamarin.Android.Cecil\Xamarin.Android.Cecil.targets(23,5): error MSB3375: The file "..\..\bin\Debug\\Xamarin.Android.Cecil.dll" does not exist.
    xamarin-android\external\Java.Interop\src\Xamarin.Android.Cecil\Xamarin.Android.Cecil.targets(23,5): error MSB3375: The file "..\..\bin\Debug\\Xamarin.Android.Cecil.Mdb.dll" does not exist.

Looking in my `external\Java.Interop\bin\Debug` directory, the
`Mono.Cecil` assemblies were named `Mono.Cecil.*` instead of
`Xamarin.Android.*`.

I think this was an oversight, but I don't know how the builds were
green...

Looking at `Mono.Cecil.csproj` in
`xamarin-android/external/mono/external/cecil` there was no way to
override `AssemblyName`. But we can use the `<Move />` task instead.

To fix this:
- Added a `_MonoCecilAssemblies` to check for any files named
  `Mono.Cecil.*`
- `<Move />` the files to start with `Xamarin.Android.*` instead.
@jonathanpeppers jonathanpeppers requested a review from jonpryor May 30, 2018 17:25
@jonpryor
Copy link
Contributor

The fix lies in xamarin-android, and I'm sorry I didn't fix it at the same time.

This code: dotnet/android@9bc51ae#diff-b67911656ef5d18c4ae36cb6741b7965R114

 prepare-props: prepare-deps
 +	cp $(call GetPath,JavaInterop)/external/Mono.Cecil* "$(call GetPath,MonoSource)/external"
 +	cp "$(call GetPath,JavaInterop)/product.snk" "$(call GetPath,MonoSource)"

Needs to be done within Windows/MSBuild as well, not just in the Makefile. It's the above two lines which causes the xamarin-android/external/mono/external/cecil build to produce Xamarin.Android.Cecil.dll instead of Mono.Cecil.dll.

@jonpryor jonpryor closed this May 30, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Apr 14, 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.

2 participants