VS Online Build Failed - Kendo namespace not found

10 posts, 0 answers
  1. King Wilder
    King Wilder avatar
    240 posts
    Member since:
    Oct 2007

    Posted 04 Feb 2014 Link to this post

    I've been building an an MVC 4.5 app in VS 2013 and checking it into my Visual Studio Online account.  I then set it up for automatic Windows Azure deployment after it builds.

    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?

  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 05 Feb 2014 Link to this post

    Hello,

    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
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. King Wilder
    King Wilder avatar
    240 posts
    Member since:
    Oct 2007

    Posted 05 Feb 2014 in reply to Atanas Korchev Link to this post

    Hi Atanas,

    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.
  4. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 06 Feb 2014 Link to this post

    Hello King,

    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
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. King Wilder
    King Wilder avatar
    240 posts
    Member since:
    Oct 2007

    Posted 06 Feb 2014 in reply to Atanas Korchev Link to this post

    Hi Atanas,

    The other third-party assemblies like Ninject seem to work fine.  I'll keep digging.

    Thanks.
  6. Mark
    Mark avatar
    10 posts
    Member since:
    Dec 2012

    Posted 16 Sep 2015 in reply to King Wilder Link to this post

    Did you find a solution to this?  I am experiencing the same issue with VS online and my deployed Azure site not picking up my Kendo.MVc.dll - it doesn't look like the Kendo binary is being copied across, and igoring Copy Local set to true.
  7. King Wilder
    King Wilder avatar
    240 posts
    Member since:
    Oct 2007

    Posted 16 Sep 2015 in reply to Mark Link to this post

    Hi Mark, this was such a long time ago, I honestly don't remember what I did to fix the issue, but it's working on my live site, but it's not on Azure.  If I remember anything, I'll post what I remembered here.
  8. Ody
    Ody avatar
    11 posts
    Member since:
    Oct 2016

    Posted 06 Dec 2017 Link to this post

    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.

     

  9. Ody
    Ody avatar
    11 posts
    Member since:
    Oct 2016

    Posted 06 Dec 2017 in reply to Ody Link to this post

    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.

  10. Petya
    Admin
    Petya avatar
    987 posts

    Posted 12 Dec 2017 Link to this post

    Thanks for following-up with the solution you found, Ody. I'm happy to hear you figured it out.

    Regards,
    Petya
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top