This was all working fine until I had to create a controller used for Ajax calls to a Kendo ListView MVC Wrapper.
Here's the HTML:
@(Html.Kendo().ListView(Model.Top100ResortList)
.Name("Top100Resort")
.TagName("ul")
.ClientTemplateId("top100template")
.DataSource(ds =>
{
ds.Read(read => read.Action("_ResortCourses_Read", "Courses"));
ds.PageSize(10);
})
.Pageable()
)
Here's the controller code initially. It does not have the Kendo namespace in the method itself. The namespace is in the class usings:
using Kendo.Mvc.UI;
public virtual ActionResult _ResortCourses_Read([DataSourceRequest] DataSourceRequest request)
{
var json = _coursesService.GetTop100Courses(Top100Types.GolfWeekResort).ToDataSourceResult(request);
return Json(json);
}
Here's the controller code after I saw the build fail, so I removed the class using, and added it directly to the method. Everything still works, but the build still fails in VS Online.
public virtual ActionResult _ResortCourses_Read([Kendo.Mvc.UI.DataSourceRequest] Kendo.Mvc.UI.DataSourceRequest request)
{
var json = _coursesService.GetTop100Courses(Top100Types.GolfWeekResort).ToDataSourceResult(request);
return Json(json);
}
Any idea why my builds are failing and why VS Online tells me it cannot find the type or namespace for Kendo?
9 Answers, 1 is accepted
The only reason we can think if is a missing assembly reference. If the Kendo.Mvc.dll isn't correctly deployed compilation will fail.
Regards,
Atanas Korchev
Telerik
Is there a different way to deploy to Visual Studio Online than to anywhere else? Just to clarify, the application has been working and building fine for a month, before I created those methods where I needed the Kendo DataSourceRequest objects in the arguments of the action method. The prior builds were not complaining about not finding Kendo previously.
The Kendo.Mvc assembly is marked as "Copy Local".
Ok, I just looked at my Visual Studio Online Code section and it's weird that there's no /bin folder for any project in my solution, but all the prior publishes have built. I'm also noticing that on the successful builds there's also a warning about the missing Kendo.Mvc reference.
I'll continue to try and figure this out.
We don't know if Visual Studio Online has a different option of deploying dll files. Kendo UI is just another assembly and should be deployed with the rest of your application. What happens with any other third party dlls that your application is using?
Regards,
Atanas Korchev
Telerik
The other third-party assemblies like Ninject seem to work fine. I'll keep digging.
Thanks.
I know this is from a long time ago and has probably been figured out elsewhere, but this page is a top hit when searching the problem.
Visual Studio and its source control features allow you to ignore particular files and folders from being checked in. Typically the entire nuget Packages folder is ignored. The idea is you shouldn't have to waste space/time on checking in specific api binaries. Wherever you build should have the ability to restore nuget packages independently and use those to build your project against.
Now when using Telerik's special nuget server to install your Kendo.MVC api, Visual Studio can fetch and refresh the Kendo.MVC binaries, but Visual Studio Online, and it's build system, does not have that same access to Telerik's private nuget server. It cannot get the binaries and thus cannot build your project.
I am still researching to best solution. Ideally Visual Studio Online would allow you to add private binaries to its build system, without needing to check them in per project.
Telerik has a few pages dealing with nuget in their documentation, which is one of the reasons I have always preferred Telerik: Extensive documentation (and forums with a lot of troubleshooting history).
Anywho - If you are using VSTS aka VSO, you can figure out what you need to do with your build definitions and nuget.config files here:
https://docs.telerik.com/aspnet-core/how-to/setup-private-nuget-feed-azure
In my case, I did need to create a new nuget.config file and point my nuget restore task to that file.
Cheers.
how you created the new nuget.config file ???????????????
Regards,
Petya
Progress Telerik