Fix PrereleaseResolveNuGetPackageAssets on Mono#255
Conversation
|
/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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
c0ba6dd to
910f7a5
Compare
|
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? |
|
I think you can already get what you want using System.Relection.Metadata: https://github.com/dotnet/corefx/issues/3125#issuecomment-138665105 |
7ab6768 to
628e968
Compare
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
Other than cleaning out the code that isn't needed any longer it looks good. |
628e968 to
ea4b702
Compare
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.
ea4b702 to
7f441a0
Compare
|
Thanks @weshaggard, you are correct about the code being able to be removed. |
Fix PrereleaseResolveNuGetPackageAssets on Mono
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.
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.
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.