Good Day.
I have the following problem: Recently I migrated my web project asp .net mvc 4 to mvc 5 everything came out normal except for this part:
@if (Model.nombresAutocompletado.Count > 0)
{
var empty = Model.nombresAutocompletado.ToArray();
<script>
$(function () {
var availableTags = [
@Html.Raw(
string.Join(",\n\t",
empty.Select(x => String.Format("\"{0}\"", x.nombre))
)
)
];
$('#asociarCliente').autocomplete({
source: availableTags
});
});
</script>
}
My error is in @Html.Raw(
, because when I open that page it shows compilation error I show you the capture.
If the page tells me this message
Compiler error message: CS0012: The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to the assembly 'System.Runtime, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a'.
I do not know how and where to add that reference I'm new to asp.net mvc 5.