dotnet/Silk.NET

RequiresLocation Attributes Throws errors CS8335

Opened this issue · 1 comments

Trying to do a clean build on Visual Studio Community 17.14.12 I am getting the following compilation errors:

Do not use 'System.Runtime.CompilerServices.RequiresLocationAttribute'. This is reserved for compiler usage.

$ dotnet sdk check
.NET SDKs:
Version Status

7.0.410 .NET 7.0 is out of support.
8.0.413 Up to date.
9.0.304 Up to date.

.NET Runtimes:
Name Version Status

Microsoft.AspNetCore.App 3.1.32 .NET 3.1 is out of support.
Microsoft.NETCore.App 3.1.32 .NET 3.1 is out of support.
Microsoft.WindowsDesktop.App 3.1.32 .NET 3.1 is out of support.
Microsoft.AspNetCore.App 5.0.17 .NET 5.0 is out of support.
Microsoft.NETCore.App 5.0.17 .NET 5.0 is out of support.
Microsoft.WindowsDesktop.App 5.0.17 .NET 5.0 is out of support.
Microsoft.AspNetCore.App 6.0.36 .NET 6.0 is out of support.
Microsoft.NETCore.App 6.0.36 .NET 6.0 is out of support.
Microsoft.WindowsDesktop.App 6.0.36 .NET 6.0 is out of support.
Microsoft.AspNetCore.App 7.0.20 .NET 7.0 is out of support.
Microsoft.NETCore.App 7.0.20 .NET 7.0 is out of support.
Microsoft.WindowsDesktop.App 7.0.20 .NET 7.0 is out of support.
Microsoft.AspNetCore.App 8.0.19 Up to date.
Microsoft.NETCore.App 8.0.19 Up to date.
Microsoft.WindowsDesktop.App 8.0.19 Up to date.
Microsoft.AspNetCore.App 9.0.8 Up to date.
Microsoft.NETCore.App 9.0.8 Up to date.
Microsoft.WindowsDesktop.App 9.0.8 Up to date.

I've decided to just fix this, originally this was to avoid breaking old compilers that didn't know about ref readonly (as the ABI for this would appear as ref for those compilers, not in) but I feel like it's been long enough now.