Skip to content
This repository was archived by the owner on Jan 11, 2024. It is now read-only.

Fix PrereleaseResolveNuGetPackageAssets on Mono#255

Merged
ellismg merged 1 commit intodotnet:masterfrom
ellismg:cross-plat-version-reader
Sep 8, 2015
Merged

Fix PrereleaseResolveNuGetPackageAssets on Mono#255
ellismg merged 1 commit intodotnet:masterfrom
ellismg:cross-plat-version-reader

Conversation

@ellismg
Copy link
Copy Markdown

@ellismg ellismg commented Sep 4, 2015

When using the build tools on MSBuild running on Mono (which is what
corefx does in build.sh) we were running into a few exceptions due to
some differences in the two environments.

  • We end up using some MSBuild assemblies implemented by Mono which
    seem to have slightly different semantics in when the Log property on
    a task is actually set. Unlike Microsoft's implementation, which
    sets the property during construction of the Task object, Mono
    appears to defer this work until the task is assigned a BuildEngine.
    The fix is to just move our setup of the resource manager for the log
    to before we execute the task.
  • The task in question wants to use some exports on mscoree to parse
    CLR version information from metadata. This doesn't work on non
    windows platforms. MSBuild already faced this problem internally and
    wrote a light weight PE Reader to pull out the info, so we pick that
    up and fall back to it when we can't find the entry point we want on
    mscoree.

@ellismg
Copy link
Copy Markdown
Author

ellismg commented Sep 4, 2015

/cc @weshaggard @FiveTimesTheFun

This was starting to get frustrating, so I cleaned up the debt here. My understanding is that @pgavlin was also feeling pain and has basically locked him self back to earlier build tools so he didn't hit this issue.

With the changes, most projects build via build.sh in corefx again, three fail, two of which are due to file casing issues in a csproj and the other is something I don't understand yet but doesn't seem to be related to build tools at all.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@ellismg ellismg force-pushed the cross-plat-version-reader branch from c0ba6dd to 910f7a5 Compare September 8, 2015 18:14
@ellismg
Copy link
Copy Markdown
Author

ellismg commented Sep 8, 2015

Rebased on top of master, moved all paths to use the managed version reader, opened dotnet/corefx#3125 to track exposing an API to do this from the Metadata Reader.

Also build CoreFX locally with these changes.

@weshaggard Can you take a look again?

@nguerrera
Copy link
Copy Markdown

I think you can already get what you want using System.Relection.Metadata: https://github.com/dotnet/corefx/issues/3125#issuecomment-138665105

@ellismg ellismg force-pushed the cross-plat-version-reader branch 2 times, most recently from 7ab6768 to 628e968 Compare September 8, 2015 20:21

This comment was marked as spam.

@weshaggard
Copy link
Copy Markdown
Member

Other than cleaning out the code that isn't needed any longer it looks good.

@ellismg ellismg force-pushed the cross-plat-version-reader branch from 628e968 to ea4b702 Compare September 8, 2015 21:32
When using the build tools on MSBuild running on Mono (which is what
corefx does in build.sh) we were running into a few exceptions due to
some differences in the two environments.

 - We end up using some MSBuild assemblies implemented by Mono which
   seem to have slightly different semantics in when the Log property on
   a task is actually set.  Unlike Microsoft's implementation, which
   sets the property during construction of the Task object, Mono
   appears to defer this work until the task is assigned a BuildEngine.
   The fix is to just move our setup of the resource manager for the log
   to before we execute the task.

 - The task in question wants to use some exports on mscoree to parse
   CLR version information from metadata. This doesn't work on non
   windows platforms. The MetadataReader provides some methods we can
   use instead, which will work cross platform.
@ellismg ellismg force-pushed the cross-plat-version-reader branch from ea4b702 to 7f441a0 Compare September 8, 2015 21:34
@ellismg
Copy link
Copy Markdown
Author

ellismg commented Sep 8, 2015

Thanks @weshaggard, you are correct about the code being able to be removed.

ellismg added a commit that referenced this pull request Sep 8, 2015
Fix PrereleaseResolveNuGetPackageAssets on Mono
@ellismg ellismg merged commit 2be8d92 into dotnet:master Sep 8, 2015
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.

5 participants