Skip to content

[Mono.Posix] Mono.Posix.csproj fixes. #64

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2016

Conversation

jonpryor
Copy link
Contributor

@jonpryor jonpryor commented Jun 9, 2016

Building xamarin-android/master with Mono 4.4.0 0 would result in a
build error within src/Mono.Posix:

CSC: error CS1703: An assembly `System.Runtime' with the same identity
has already been imported. Consider removing one of the references.

This was introduced by commit f2fed37, which added System.Runtime
as a @(Reference) to Mono.Posix.csproj.

Mono.Posix.csproj <Import/>s Xamarin.Android.CSharp.targets,
which indirectly adds System.Runtime, so there is no need for
Mono.Posix.csproj to directly refernce System.Runtime.

Additionally, msbuild is more stringent regarding property functions
and quoting: this resulted in an MSBuild error:

Condition="$(AndroidSupportedAbisForConditionalChecks.Contains (:x86:'))">

The fix is to properly quote the .Contains() method parameters.

Finally, re-order various elements to increase consistency with other
projects, e.g. @(Reference) should go with other @(Reference)
entries, Configuration.props should be imported as early as
possible, $(TargetFrameworkVersion) should be set to
$(AndroidFrameworkVersion) (which requires the earlirer
Configuration.props import), etc.

Building xamarin-android/master with Mono 4.4.0 [0] would result in a
build error within `src/Mono.Posix`:

	CSC: error CS1703: An assembly `System.Runtime' with the same identity
	has already been imported. Consider removing one of the references.

This was introduced by commit f2fed37, which added `System.Runtime`
as a `@(Reference)` to `Mono.Posix.csproj`.

`Mono.Posix.csproj` `<Import/>`s `Xamarin.Android.CSharp.targets`,
which indirectly adds `System.Runtime`, so there is no need for
`Mono.Posix.csproj` to directly refernce `System.Runtime`.

Additionally, `msbuild` is more stringent regarding property functions
and quoting: this resulted in an MSBuild error:

	Condition="$(AndroidSupportedAbisForConditionalChecks.Contains (:x86:'))">

The fix is to properly quote the `.Contains()` method parameters.

Finally, re-order various elements to increase consistency with other
projects, e.g. `@(Reference)` should go with other `@(Reference)`
entries, `Configuration.props` should be imported as early as
possible, `$(TargetFrameworkVersion)` should be set to
`$(AndroidFrameworkVersion)` (which requires the earlirer
`Configuration.props` import), etc.

[0]: mono-4.4.0-branch-c7-baseline/5995f74
@@ -12,7 +12,12 @@
<AndroidResgenClass>Resource</AndroidResgenClass>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AssemblyName>Mono.Posix</AssemblyName>
<TargetFrameworkVersion>v6.0</TargetFrameworkVersion>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\product.snk</AssemblyOriginatorKeyFile>
Copy link
Contributor

Choose a reason for hiding this comment

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

It does not seem to be in the repo. Do we actually need this?

Copy link
Contributor

Choose a reason for hiding this comment

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

nm, it DOES exist, looking at wrong directory.

@atsushieno atsushieno merged commit 9a50c66 into dotnet:master Jun 9, 2016
radical pushed a commit that referenced this pull request May 8, 2018
Relative paths -- used previously -- have some pros, but one large
con: it complicates submodule checkout.

For example (I assume?), [on Jenkins][0]:

	FATAL: Command "git submodule update --init --recursive" returned status code 128:
	stdout:
	stderr: Cloning into 'lib/mono.linq.expressions'...
	Permission denied (publickey).
	fatal: Could not read from remote repository.

	Please make sure you have the correct access rights
	and the repository exists.
	fatal: clone of 'git@github.com:jonpryor/mono.linq.expressions.git' into submodule path 'lib/mono.linq.expressions' failed

	hudson.plugins.git.GitException: Command "git submodule update --init --recursive" returned status code 128:

Use `https://` submodule urls.

[0]: https://jenkins.mono-project.com/view/Xamarin.Android/job/java-interop/62/console
@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