I'm getting a odd error when using v3.2.3 of Razor. The below method is throwing the error:
"Unable to compile template. The predefined type 'System.Tuple' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll'
Other compilation errors may have occurred. Check the Errors property for more information."
There is also this error in the errors property on the exception:
"The type 'System.Tuple' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' and 'c:\Program Files (x86)\IIS Express\Microsoft.VisualStudio.Utilities.Internal.Net35.dll'"
Our project was recently upgraded to .Net v4.6.1 so I'm sure this is what has caused the issue, however I don't know how I can resolve it.
For this error, it seems you reference the “Tuple” dll in multiple assemblies. I suggest you search “Ssytem.Tuple” in the Solution explorer, and then remove the repeated dll.
Best Regards,
Edward
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
None
0 Points
1 Post
Tuple Error When Using Razor
Apr 27, 2018 09:48 AM|Wizardskills|LINK
I'm getting a odd error when using v3.2.3 of Razor. The below method is throwing the error:
"Unable to compile template. The predefined type 'System.Tuple' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll'
Other compilation errors may have occurred. Check the Errors property for more information."
There is also this error in the errors property on the exception:
"The type 'System.Tuple' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' and 'c:\Program Files (x86)\IIS Express\Microsoft.VisualStudio.Utilities.Internal.Net35.dll'"
Our project was recently upgraded to .Net v4.6.1 so I'm sure this is what has caused the issue, however I don't know how I can resolve it.
Does anyone have any ideas on how I can fix this?
Contributor
3310 Points
1607 Posts
Re: Tuple Error When Using Razor
Apr 30, 2018 06:13 AM|Edward Z|LINK
Hi Wizardskills,
For this error, it seems you reference the “Tuple” dll in multiple assemblies. I suggest you search “Ssytem.Tuple” in the Solution explorer, and then remove the repeated dll.
Best Regards,
Edward
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.