search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Trial ASP.net MVC pro will not run at all

Asked by jeff
4 years ago.

Using VS 2015
Error CS0234 The type or namespace name 'WebPages' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) Demo.....

I cannot find this reference anywhere!

Shouldn't this project just work "out of the box"?

Downloaded trial.
Opened solution.
can view everything.
cannot run.

Answer posted by Dan Letecky [DayPilot]
4 years ago.

The demo project in the download packages uses MVC4 which needs to be installed globally using this link:
https://www.microsoft.com/en-us/download/details.aspx?id=30683

See also:
https://mvc.daypilot.org/try/

If you want to try the MVC version I recommend one of the MVC 5 tutorials which use NuGet to handle the MVC 5 reference:
https://code.daypilot.org/tutorials/mvc5

Comment posted by jeff
4 years ago.

Thanks for the fast reply!
However...
I realize these are microsoft issues at the core.
But each of the two solutions given in the answer give a new issue.

After installing MVC4 globally I now get:
Error CS1705 Assembly 'DayPilot.Web.Mvc' with identity 'DayPilot.Web.Mvc, Version=2020.1.6007.0, Culture=neutral, PublicKeyToken=b8d928e6588028e4' uses 'System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc' with identity 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' Demo....

and the MVC5 version gives the following error:

.. well it looks like I can't copy the nuGet error text.

It basically says an error occurred while trying to restore packages: unable to find Version 3.2.2 of package Microsoft.AspNet.WebPages.

Nuget cannot uninstall it as it seems to try to restore it first and just errors. I cannot update to a higher version either.
If I run the application I get a yellow screen of death stating:
Could not load file or assembly 'System.Web.Helpers' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I really didn't think I was that inept at working these things out but it appears I am...

I really wanted the javascript version as I found that and got it up and running fairly quickly and was impressed. However I discovered I needed Pro to do what I needed. But it seems bait and switch. It is not javascript. It is either Angular or React for Pro. I really do not want to install those frameworks and deal with unknown (to me) syntax/Technology...

Thanks for any help...

Comment posted by Dan Letecky [DayPilot]
4 years ago.

I'd recommend using the JavaScript version since it offers the greatest flexibility and it doesn't have any dependencies so you can skip all this configuration. The JavaScript version includes React, Angular and Vue wrappers but the core is plain JavaScript that you can use in any HTML page.

You can download the JavaScript version here:
https://javascript.daypilot.org/try/

In that package, you'll find daypilot-all.min.js file which is all you need. The minimum boilerplate looks like this:

<script src="daypilot-all.min.js"></script>
<div id="dp"></div>
<script>
  var dp = new DayPilot.Scheduler("dp");
  dp.startDate = "2020-02-17";
  dp.init();
</script>

Thea easiest way to start is to generate a HTML5/JavaScript project using the UI Builder online app:
https://builder.daypilot.org/

The JavaScript version can be used with any kind of backend - it just needs to be able to send and receive JSON objects.

There are some examples that use ASP.NET Core as the backend:
https://code.daypilot.org/tutorials/asp.net-core+javascript

You can also create the JSON backend using ASP.NET WebForms and JSON.NET library. Here is an example that displays the Calendar component:
https://code.daypilot.org/65653/creating-json-backend-for-javascript-calendar-in-asp-net-c

I hope this can help you get started. Let me know if there is any problem.

Comment posted by jeff
4 years ago.

Excellent!

They way I interpreted the downloads was that you had to use either Angular or React.

Yes this works.
Will most likely be getting pro license soon!

Thanks!

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.