It seems like Razor doesn't understand the ValueTuple
. In my Razor page:
@{
var x = (1, "a");
}
The code above gives me:
An error occurred during the compilation of a resource required to process this request. Please review the following specific error details and modify your source code appropriately.
I tried the same code in my controller and it's working, I already added the following in my csproj
:
<PackageReference Include="System.ValueTuple" Version="4.3.0" />
UPDATE
I added this but still not working:
<PackageReference Include="Microsoft.Net.Compilers" Version="2.1.0" />