Skip to content

Conversation

@chamons
Copy link
Contributor

@chamons chamons commented Mar 8, 2017

  • Significant changes to target file under msbuild, ImplicitFacade processing in particular
  • Tests are disabled due to https://bugzilla.xamarin.com/show_bug.cgi?id=53164 where we can't tests local target files only global
  • Requires a mono msbuild with mono/msbuild@95ab657 for tests to pass
  • Until then, this is a workaround:
    sudo cp /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/Roslyn/System.Reflection.Metadata.dll /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/

- Significant changes to target file under msbuild, ImplicitFacade processing in particular
- Tests are disabled due to https://bugzilla.xamarin.com/show_bug.cgi?id=53164 where we can't tests local target files only global
- Requires a mono msbuild with mono/msbuild@95ab657 for tests to pass
- Until then, this is a workaround:
    sudo cp /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/Roslyn/System.Reflection.Metadata.dll /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/
@monojenkins
Copy link
Collaborator

Build success

-->

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Unfortuntly Microsoft.NETFramework.CurrentVersion.targets defines this and is not included in Mobile/Modern builds so we'll add it here -->
Copy link
Member

Choose a reason for hiding this comment

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

Unfortuntly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately my spelling is as bad as it looks...

Copyright (C) 2015 Xamarin Inc. All rights reserved.
***********************************************************************************************
-->
<!-- Rename file -->
Copy link
Member

Choose a reason for hiding this comment

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

Maybe delete this comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Woops.

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="Xamarin.Mac.ObjCBinding.Common.targets" />

<PropertyGroup>
Copy link
Member

Choose a reason for hiding this comment

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

Will this work with F# projects too (does XM even have support for F#)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does in theory. I did not look into getting it working with msbuild, but let me see how bad it is...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I tested it out and with msbuild fsharp works with this change, I did not dig into why.

Now, that file in particular is with binding project, but they really don't have F# support (you can bind the libs and use them in F# though).

@monojenkins
Copy link
Collaborator

Build success

@rolfbjarne rolfbjarne requested a review from jstedfast March 10, 2017 11:40
<!-- Implicitly references all portable design-time facades if the user is referencing a System.Runtime-based portable library -->
<Target Name="ImplicitlyExpandDesignTimeFacades" DependsOnTargets="$(ImplicitlyExpandDesignTimeFacadesDependsOn)">

<PropertyGroup>
Copy link
Member

Choose a reason for hiding this comment

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

Indent all the elements under the Target.

-->

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Microsoft.NETFramework.CurrentVersion.targets defines this and that target file is not pulled in to Mobile/Modern builds -->
Copy link
Member

Choose a reason for hiding this comment

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

IMHO, it would be useful to make this more prominent/visible for future readers, especially the part that the default targets file will not be pulled in for Mobile/Modern builds.

Copy link
Member

Choose a reason for hiding this comment

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

Also, mention or mark the portions of this file which are from Microsoft.NETFramework.CurrentVersion.targets, and point out any changes from that. It will be useful for debugging in future or sync'ing up changes from that file.

this file. This file also defines targets to produce an error if the specified targets
file does not exist, but the project is built anyway (command-line or IDE build).

Copyright (C) 2015 Xamarin Inc. All rights reserved.
Copy link
Member

Choose a reason for hiding this comment

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

Copyright needs an update?

Condition="'$(UseXamMacFullFramework)' == 'true' And '$(IsXBuild)' == 'true' "/>

<Import Project="$(MSBuildThisFileDirectory)Xamarin.Mac.msbuild.targets"
Condition="'$(IsXBuild)' == 'false' "/>
Copy link
Member

Choose a reason for hiding this comment

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

The usual pattern is - '$(IsXBuild)' != 'true', that way the default/empty value "means" false. Just a nitpick.

@chamons chamons added the do-not-merge Do not merge this pull request label Mar 13, 2017
@chamons
Copy link
Contributor Author

chamons commented Mar 13, 2017

The was marked dont-merge because it started failing tests locally for me, but it turns out after research that I reinstalled mono and "lost" the System.Reflection.Metadata.dll hack noted above.

That meant it would fail first build and pass second.

With the hack it works first and second time.

@chamons chamons removed the do-not-merge Do not merge this pull request label Mar 13, 2017
@chamons
Copy link
Contributor Author

chamons commented Mar 13, 2017

@radical 's code review requests are in.

@radical
Copy link
Member

radical commented Mar 13, 2017

LGTM! 👍

@monojenkins
Copy link
Collaborator

Build success

@chamons
Copy link
Contributor Author

chamons commented Mar 14, 2017

While reviewing the diff one last time, I noticed my (commented out for now) tests were not executing the built project. While technically it isn't needed, seeing if the app actually works seems like a great idea.

Landed change in PR. Will submit when it builds green.

@monojenkins
Copy link
Collaborator

Build failure

@chamons
Copy link
Contributor Author

chamons commented Mar 14, 2017

Test failure was a random one:

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

@chamons chamons merged commit abf0f4a into master Mar 14, 2017
@chamons chamons deleted the xm_netstd_msbuild branch March 14, 2017 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants