Cannot install jQuery UI WIdgets:Datepicker - asp.net-mvc-4

When following this tutorial (http://www.asp.net/mvc/tutorials/javascript/using-the-html5-and-jquery-ui-datepicker-popup-calendar-with-aspnet-mvc/using-the-html5-and-jquery-ui-datepicker-popup-calendar-with-aspnet-mvc-part-4), I try to install the jQuery UI WIdgets:Datepicker via NuGet and get the following error:
Attempting to resolve dependency 'jQuery.UI.Core (= 1.8.9)'.
Attempting to resolve dependency 'jQuery (≥ 1.4.4 && < 1.6)'.
Successfully installed 'jQuery 1.4.4'.
Successfully installed 'jQuery.UI.Core 1.8.9'.
Successfully installed 'jQuery.UI.Widgets.Datepicker 1.8.9'.
Install failed. Rolling back...
Updating 'jQuery 1.7.1.1' to 'jQuery 1.4.4' failed. Unable to find a version of 'jQuery.UI.Combined' that is compatible with 'jQuery 1.4.4'.
This is presumably because I have jQuery 1.7.1.1 in the solution for something else. How can I get around this?
If I can't, is there another datepicker I can use in ASP .NET MVC 4 (which I am new to) with clear instructions on using?

I had the exact same problem, so I downloaded the widget manually: http://jqueryui.com/download/
Extracted the folder and added the scripts I needed to my project:
\jquery-ui-1.10.2.custom\jquery-ui-1.10.2.custom\development-bundle\themes\base\jquery.ui.datepicker.css
\jquery-ui-1.10.2.custom\jquery-ui-1.10.2.custom\development-bundle\ui\jquery.ui.datepicker.js
The reason why Nuget failed the installation was because the package was trying to reference jquery.1.4 and MVC 4 needs a higher library.
Hope it helps...

It seems Old post but people like me come to later in to this post I resolve this issue by using bootstrap date piker instead of using jquery ui date picker.

Related

Vue Project not working after ubuntu customization

I have created a project using vue.js at the frontend and flask at the backend, It was working perfectly. But, after I customized my ubuntu OS, suddenly I am unable to run the project, my flask and every other framework and library was uninstalled and I am unable to reinstall vue and I get this error message when I try to install vue again:
Can someone tell me how to resolve this issue?
By Customization, I installed some extensions and then some wallpapers, icon packs etc..
As a user has mentioned in the replies earlier, what you are trying to do is installing a global package, and the error displayed there clearly stated that you lacked permissions, and the customizations you mentioned should not have any impact on this.
Since you are using Ubuntu, just add a sudo in front of the command that you are trying to execute and it should be fixed.

Adding AddRazorRuntimeCompilation() to the container in .NET CORE 6 will break the CSS footer

I create a brand new ASP.NET Core MVC project using VS 2022 and .NET Core 6.
VS will generate the base template and when I run it without touching any code, everything is fine.
So far so good.
Now I add the NuGet dependency Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation version 6.0.0.
In Program.cs file, I add a line
// Add services to the container.
builder.Services.AddControllersWithViews();
builder.Services.AddRazorPages().AddRazorRuntimeCompilation(); //Add this line of code
var app = builder.Build();
Rebuild the program and run it. Now I see the footer is not at the bottom of the page anymore.
Is it a bug or did I do something wrong here? Thanks.
I was struggling the same problem as well,
while trying the versions of Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation nuget package and found the solution with 5.0.13 version.
If you downgrade the package from 6.0.1 to 5.0.13, the problem goes away and footer will be on bottom again.
In Visual Studio 2022, there's an option for hot reload on file save. this fixed my issue without having the need to install Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
What is happening is that when you enable runtime editing, the .NET Core built in bundle and minification is removed. If you look at shared/_layout.cshtml, there is a _layout.cshtml.css file. This is the runtime bundle/include you are missing. Since this is your core layout, move the contents from this file to your wwwroot/css/site.css file and the footer and other elements will render as before.
Is it your intention to actually use RazorPages? It looks like you just want to add runtime compilation to the standard MVC views.
If you intend to use controllers and views, just add:
builder.Services.AddControllersWithViews().AddRazorRuntimeCompilation();
But, I tried your code as well and in my environment, the footer is present in both cases, even if I downgrade Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation from version 6.0.1 to 6.0.0.
I think there's no need to add the runtime compilation since in the newest update/version hot-reload has been officially released.
PS. I am currently following an asp.net tutorial and I encountered this problem. Here's the link: https://youtu.be/hZ1DASYd9rk
I'm watching same video series as you do and i had the same error. I upgraded Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation to v6.0.11 and I don't get any error anymore I
Installing Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation version 5.0.17 Nugget Package cleared the error for me.
You may try to install any version from 5.0.0 - 5.0.17

Error in emotion/styled package, cannot find answer ANYWHERE

I keep getting the following error, I'm using meteor 2.1 currently
Error: A new entrypoint in the #emotion/styled package, #emotion/styled/base, has replaced the #emotion/styled-base package. Please remove this package and use #emotion/styled/base instead.
i cannot find ANY way to install this #emotion/styled/base package. #emotion/styled-base is installed and i cannot create a build suddenly.
any suggestions???
I'm using react.js
#emotion/styled/base isn't a package you need to install, but rather its a submodule of the #emotion/styled package.
I have a hunch that you are not using #emotion/styled-base directly, so most likely what you have is a version mismatch where you have a newer version of #emotion/styled installed, but that package is written for an older version. You'll probably just need to locate this offending package and update it.
If this isn't the case, then you'll just need to replace your imports for #emotion/styled-base with ones for #emotion/styled/base

What is the correct package to use for SIgnalR with ASP.NET Core?

I'm trying to use SignalR in an ASP.NET Core web application but I'm struggling to find the correct package to use. In this article, they say to use "Microsoft.AspNetCore.SignalR" (with the help of a NuGet.Config file) but when I do a dotnet restore, I get:
error NU1102: Unable to find package Microsoft.AspNetCore.SignalR.Server with version (>= 0.2.0)
error NU1102: - Found 1 version(s) in nuget.org [ Nearest version: 0.0.1-alpha ]
error NU1102: - Found 0 version(s) in aspnetcidev
I guess the v0.0.1-alpha is not the one I want.
However, I found the package "Gray.Microsoft.AspNetCore.SignalR.Server" and it seems to work but the last published version is from November 2016... That, and the namespace make me think that it's not the package I have to use neither...
I also saw this video that refers to the v1.0.0 version but, of course, I can get it to work...
Anyway, what is the correct package to use in order to use SignalR?
I'm using the prerelease dev package for now.
https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json (thank you Pawel)
I also had to get the Microsoft.Extensions.Primitives from there.
Update:
I had to go back to .NET core 1.1 packages since migrating to 2.0 will not work for several reasons. I went back to using the unmaintained Microsoft.AspNetCore.SignalR.Server Version 0.1.0 from here:
https://www.myget.org/F/aspnetmaster/api/v3/index.json
Update:
For a new project I'm successfully using the v.1.0.0-alpha2-final version from nugget.org.
Examples including the JavaScript files can be found here: aspnet/SignalR-samples

RazorJS - Could not load type 'System.Web.Razor.Parser.MarkupParser'

When I try to use #Html.RazorJSInline() function I get
Could not load type 'System.Web.Razor.Parser.MarkupParser'
When I try to use #Html.RazorJSInclude() RazorJs is generating path to JS file but then I get the same error when trying to open the file with browser.
edit
I think it is caused by that the RazorJS was designed for Razor 1...
Does anybody find out some nice workaround?
Got here a bit late, but I hit a similar problem when trying to call RazorEngine's Razor.Parse(). I also got this message:
Could not load type 'System.Web.Razor.Parser.MarkupParser'
I was at the time using RazorEngine version 3.0.8. This issue was apparently resolved in a later version of RazorEngine (3.1.0)
So upgrading the package to this version fixed it for me.
I used the following command in the NuGet Package Manager Console to upgrade to the fixed version:
PM> Update-Package RazorEngine -Version 3.1.0
At the moment, RazorEngine is already a bunch of versions further (I think currently 3.7.2) but upgrading all the way to this version wasn't really an option for us, as this would've required quite a bit of refactoring in existing code. If this isn't an issue for you, you could always try the latest version.