FS#70018 - dotnet-sdk: Incomplete package?

Attached to Project: Community Packages
Opened by IMBJR (IMBJR) - Tuesday, 16 March 2021, 17:38 GMT
Last edited by Maxime Gauduin (Alucryd) - Monday, 19 April 2021, 07:03 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Maxime Gauduin (Alucryd)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
In attempting to create a webasm project with Visual Studio Code, the OmniSharp installation reports, in part:

[fail]: OmniSharp.MSBuild.ProjectLoader
The "Microsoft.AspNetCore.Razor.Tasks.DiscoverDefaultScopedCssItems" task could not be loaded from the assembly /usr/share/dotnet/sdk/5.0.103/Sdks/Microsoft.NET.Sdk.Razor/build/netstandard2.0/../../tasks/net46/Microsoft.NET.Sdk.Razor.Tasks.dll. Invalid Image Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

The location that ends in ../../tasks/net46/Microsoft.NET.Sdk.Razor.Tasks.dll does not exist as part of the packaging of dotnet-sdk.

Downloading the Microsoft official release of shows that @ /sdk/5.0.103/Sdks/Microsoft.NET.Sdk.Razor/tasks there is indeed a net46 directory, suggesting that the Arch package is missing that directory.

Additional info:
Package dotnet-sdk version 5.0.3.sdk103-2
This task depends upon

Closed by  Maxime Gauduin (Alucryd)
Monday, 19 April 2021, 07:03 GMT
Reason for closing:  Upstream
Additional comments about closing:  https://github.com/dotnet/source-build/i ssues/2006
Comment by IMBJR (IMBJR) - Tuesday, 16 March 2021, 17:42 GMT
Looks like other distros have had similar issues:

https://github.com/OmniSharp/omnisharp-vscode/issues/4360
Comment by Rasmus Wennerström (mausworks) - Thursday, 18 March 2021, 14:33 GMT
I posted a quick and dirty fix in the thread @IMBJR

https://github.com/OmniSharp/omnisharp-vscode/issues/4360#issuecomment-801181468

It is indeed a packaging issue, but I'm not sure whether the fault lies with the dotnet-team or with the maintainer.
There are later releases out of the dotnet SDK (e.g. 5.0.201), hopefully it will be resolved there.
Comment by Maxime Gauduin (Alucryd) - Thursday, 15 April 2021, 14:04 GMT
Just pushed 5.0.5.sdk202, is that still an issue?
Comment by IMBJR (IMBJR) - Thursday, 15 April 2021, 18:04 GMT
Yes, still getting those net46 references in there.

...
[fail]: OmniSharp.MSBuild.ProjectLoader
The "Microsoft.AspNetCore.Razor.Tasks.DiscoverDefaultScopedCssItems" task could not be loaded from the assembly /usr/share/dotnet/sdk/5.0.202/Sdks/Microsoft.NET.Sdk.Razor/build/netstandard2.0/../../tasks/net46/Microsoft.NET.Sdk.Razor.Tasks.dll. Invalid Image Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file '/home/imbjr/projects/blazor/blazor.csproj'.
/home/imbjr/projects/blazor/blazor.csproj
/usr/share/dotnet/sdk/5.0.202/Sdks/Microsoft.NET.Sdk.Razor/build/netstandard2.0/Microsoft.NET.Sdk.Razor.ScopedCss.targets(118,3): Error: The "Microsoft.AspNetCore.Razor.Tasks.DiscoverDefaultScopedCssItems" task could not be loaded from the assembly /usr/share/dotnet/sdk/5.0.202/Sdks/Microsoft.NET.Sdk.Razor/build/netstandard2.0/../../tasks/net46/Microsoft.NET.Sdk.Razor.Tasks.dll. Invalid Image Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
Comment by Maxime Gauduin (Alucryd) - Monday, 19 April 2021, 06:22 GMT
Thanks for the heads up, looks like it's on Microsoft. They're specifically disabling it because it fails on many OSes [0]. I'll try building with the patch disabled, but if it fails you'll have to take it to them, and I'll close this bug as upstream.

[0] https://github.com/dotnet/source-build/issues/2006
Comment by Maxime Gauduin (Alucryd) - Monday, 19 April 2021, 07:03 GMT
And it fails, as upstream describes, closing this then.

Loading...