Skip to content
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

RuntimeConfigParserTasksAssemblyPath in Microsoft.NET.Runtime.RuntimeConfigParser.Task is wrong #53811

Closed
rolfbjarne opened this issue Jun 7, 2021 · 4 comments · Fixed by #53827
Assignees
Labels
area-Infrastructure-mono untriaged New issue has not been triaged by the area owner

Comments

@rolfbjarne
Copy link
Member

Description

The RuntimeConfigParserTasksAssemblyPath property in the Microsoft.NET.Runtime.RuntimeConfigParser.Task NuGet is wrong:

$ cat Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/Sdk/Sdk.props
<Project>
  <PropertyGroup>
    <RuntimeConfigParserTasksAssemblyPath>$(MSBuildThisFileDirectory)..\tasks\RuntimeConfigParser.dll</RuntimeConfigParserTasksAssemblyPath>
  </PropertyGroup>
  <UsingTask TaskName="RuntimeConfigParserTask" AssemblyFile="$(RuntimeConfigParserTasksAssemblyPath)" />
</Project>

The RuntimeConfigParserTasksAssemblyPath variable points to tasks\RuntimeConfigParser.dll inside the NuGet, but the assembly is in a different folder:

$ find Microsoft.NET.Runtime.RuntimeConfigParser.Task/
Microsoft.NET.Runtime.RuntimeConfigParser.Task/
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/Icon.png
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/tasks
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/tasks/net6.0
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/tasks/net6.0/RuntimeConfigParser.dll
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/tasks/net472
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/tasks/net472/RuntimeConfigParser.dll
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/Microsoft.NET.Runtime.RuntimeConfigParser.Task.nuspec
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/Sdk
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/Sdk/Sdk.props
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/THIRD-PARTY-NOTICES.TXT
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/build
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/build/Microsoft.NET.Runtime.RuntimeConfigParser.Task.props
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/LICENSE.TXT
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/Microsoft.NET.Runtime.RuntimeConfigParser.Task.nupkg

The assembly seems to come in two variants, so it's in two folders: tasks/net6.0 and tasks/net472.

CC @steveisok

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Jun 7, 2021
@steveisok steveisok self-assigned this Jun 7, 2021
@ghost
Copy link

ghost commented Jun 7, 2021

Tagging subscribers to this area: @directhex
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

The RuntimeConfigParserTasksAssemblyPath property in the Microsoft.NET.Runtime.RuntimeConfigParser.Task NuGet is wrong:

$ cat Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/Sdk/Sdk.props
<Project>
  <PropertyGroup>
    <RuntimeConfigParserTasksAssemblyPath>$(MSBuildThisFileDirectory)..\tasks\RuntimeConfigParser.dll</RuntimeConfigParserTasksAssemblyPath>
  </PropertyGroup>
  <UsingTask TaskName="RuntimeConfigParserTask" AssemblyFile="$(RuntimeConfigParserTasksAssemblyPath)" />
</Project>

The RuntimeConfigParserTasksAssemblyPath variable points to tasks\RuntimeConfigParser.dll inside the NuGet, but the assembly is in a different folder:

$ find Microsoft.NET.Runtime.RuntimeConfigParser.Task/
Microsoft.NET.Runtime.RuntimeConfigParser.Task/
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/Icon.png
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/tasks
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/tasks/net6.0
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/tasks/net6.0/RuntimeConfigParser.dll
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/tasks/net472
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/tasks/net472/RuntimeConfigParser.dll
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/Microsoft.NET.Runtime.RuntimeConfigParser.Task.nuspec
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/Sdk
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/Sdk/Sdk.props
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/THIRD-PARTY-NOTICES.TXT
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/build
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/build/Microsoft.NET.Runtime.RuntimeConfigParser.Task.props
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/LICENSE.TXT
Microsoft.NET.Runtime.RuntimeConfigParser.Task//6.0.0-preview.6.21276.13/Microsoft.NET.Runtime.RuntimeConfigParser.Task.nupkg

The assembly seems to come in two variants, so it's in two folders: tasks/net6.0 and tasks/net472.

CC @steveisok

Author: rolfbjarne
Assignees: steveisok
Labels:

area-Infrastructure-mono, untriaged

Milestone: -

steveisok pushed a commit to steveisok/runtime that referenced this issue Jun 7, 2021
Fixes dotnet#53811

The props were not taking into account the right paths.
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jun 7, 2021
@jonathanpeppers
Copy link
Member

I got this to work for now with:

https:/xamarin/xamarin-android/pull/6009/files#diff-877a4ddadcd23b4b90fc9d7ecdec77ec430f02baeee9018b1df77c9b832a29dfR17

@steveisok I also had to do:

<Import Sdk="Microsoft.NET.Runtime.RuntimeConfigParser.Task" Project="Sdk.props" />

Should the Mono.Toolchain's WorkloadManifest.targets do this for us?

@steveisok
Copy link
Member

@steveisok I also had to do:

<Import Sdk="Microsoft.NET.Runtime.RuntimeConfigParser.Task" Project="Sdk.props" />

Should the Mono.Toolchain's WorkloadManifest.targets do this for us?

Yes, I'll add it.

steveisok added a commit that referenced this issue Jun 8, 2021
Fixes #53811

The props were not taking into account the right paths.
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jun 8, 2021
jonathanpeppers added a commit to dotnet/android that referenced this issue Jun 21, 2021
Context: dotnet/runtime#53811

dotnet/runtime#53811 is now solved, so we can remove the workaround.
jonathanpeppers added a commit to dotnet/android that referenced this issue Jun 21, 2021
Context: dotnet/runtime#53811

dotnet/runtime#53811 is now solved, so we can remove the workaround.
jonathanpeppers added a commit to dotnet/android that referenced this issue Jun 23, 2021
Changes: dotnet/installer@abb57b4...38e12ca
Changes: dotnet/linker@21df7db...c739a81
Changes: dotnet/runtime@5b8e178...24950a3

Updates:

* Microsoft.Dotnet.Sdk.Internal: from 6.0.100-preview.6.21313.2 to 6.0.100-preview.7.21321.2
* Microsoft.NET.ILLink.Tasks: from 6.0.100-preview.6.21304.2 to 6.0.100-preview.6.21317.4
* Microsoft.NETCore.App.Ref: from 6.0.0-preview.6.21306.1 to 6.0.0-preview.7.21319.2

* Remove workarounds for <RuntimeConfigParserTask/>

Context: dotnet/runtime#53811

dotnet/runtime#53811 is now solved, so we can remove the workaround.

* Update .apkdesc files

* [tests] temporarily skip asserts in BuildBasicBindingLibrary

Context: dotnet/msbuild#6609

It seems that properties are missing from MSBuild logs, ignoring part of this test for now.

* [templates] set .png files to `copyOnly`

Context: dotnet/templating#3325
Context: https:/dotnet/templating/wiki/Reference-for-template.json#content-manipulation

In the current bump, `dotnet new android` + `dotnet build` fails with:

    Resources\mipmap-xxxhdpi\ic_launcher_round.png error APT2000: failed reading from input: PNG chunk type 49444154 is too large: chunk length is 10836 but chunk starts at byte 45/8187.

The .NET templating system has a `copyOnly` mode for files that do not
need any text replaced. This is a performance feature, but it also
happens to workaround this issue.

We should be doing this on `.png` files *anyway*, as we don't need
potential "text" to be replaced. I will probably need to make similar
changes in xamarin/xamarin-macios and dotnet/maui.

Co-authored-by: Jonathan Peppers <[email protected]>
@ghost ghost locked as resolved and limited conversation to collaborators Jul 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure-mono untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants