Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TagHelpers version numbers

Status
Not open for further replies.

AndyH1

Programmer
Jan 11, 2004
350
0
0
GB
Ive been trying to develop a site in .net core MVC but have been getting a problem with TagHelpers and wonder if anyone might be able to suggest a solution

My site builds ok, but when I run it the web page displays the error

Cannot resolve TagHelper containing assembly 'Microsoft.AspNet.Mvc.TagHelpers'.
Error: Could not load file or assembly 'Microsoft.AspNet.Mvc.TagHelpers, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

1.@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"

In the _ViewImports.cshtml page

I have checked and I have the NuGet package installed and TagHelpers declared in the program.json, as below. I have tried changing the TagHelpers to v1.0.0-rc2 which is what intelligence shows, but doing so produces and incompatable with the Mvc assembly then, changing that, causes others and so on and so on.

I have tried

1.@addTagHelper *, Microsoft.AspNet.Mvc.TagHelpers

(ie no brackets) in the _ViewImports.cshtml page anfd that doesnt help


The project.json contains:

"dependencies": {
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Mvc": "1.0.0",
"Microsoft.AspNetCore.Mvc.TagHelpers":"1.0.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.EntityFrameworkCore": "1.0.0",
"Microsoft.EntityFrameworkCore.Design": {
"type": "build",
"version": "1.0.0-preview2-final"
},
"Microsoft.EntityFrameworkCore.SqlServer": "1.0.0",
"Microsoft.EntityFrameworkCore.Tools": {
"version":"1.0.0-preview2-final",
"type": "build"
},
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.NETCore.App": {
"version": "1.0.0",
"type": "platform"
}
},

"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
"imports": "portable-net45+win8",
"version": "1.0.0"
},
"Microsoft.EntityFrameworkCore.Tools": {
"imports": "portable-net45+win8",
"version": "1.0.0"
}

},

"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
]
}
},

If anyone can help I'd really appreciate it
Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top