X.PagedList.Mvc Installation - asp.net-mvc

When I install X.PagedList.Mvc package to my application there is a dialog box, as seen in the picture below:
To install this package, there are so many library that should be installed. I don't get the same thing when install PagedList.Mvc.
Why is this different from the PagedList?
I'm just thinking, the list of libraries below are not related to X.PagedList, so that I click cancel and it won't install the package.
Note (if needed):
I'm using ASP.NET MVC 5, Visual Studio 2015 Update 3 and .NET Framework 4.6.1

Related

Asp .Net Core - cannot install Microsoft.AspNet.Mvc nuget package

In my Asp .Net Core Web Application (started with empty template) I cannot install Microsoft.AspNet.Mvc nuget package.
After pressing Install in Nuget manager I get this error message:
Package restore failed. Rolling back package changes for 'WebApplication1'.
I tried to solve it on my own, but:
1) My project doesn't have project.json
2) Clearing nuget cache like in this answer didn't help:
Netstandard1.x Nuget packages cannot be installed for netstandard1.x projects
Project target framework: .NetCoreApp1.0 (also tried 1.1)
Ide: VS2017 RC
I didn't have problems so far with installing other packages.
Is there a workaround to install mvc package?
Btw. I have to start with empty project template.
Thanks in advance for your support.
I looked harder in nuget package name and discovered that correct package to install should be Microsoft.AspNetCore.Mvc and not Microsoft.AspNet.Mvc.
Silly mistake, I chose most popular package by typing "mvc" in search box.

Setup ASP.NET MVC 4 or 5 project with Angular 2

I am learning angular 2 with Typescript.
I am using following resource.
QuickStart with Angular 2
Now from there and other examples i found that they telling to create package.json file that lists all dependencies for project.
I think creating this package.json file and listing all dependency packages this kind of structure is followed in .NetCore Project.
In MVC 4 or 5 we have packages.config file which lists although packages that we are going to use.
I am not saying we can not use package.json file when we have package.config file.
But is there any simple way to integrate Angular 2 with typescript in MVC Webapplication project using NUGet Packages and get started?
If not available please let me know how can i setup Angular 2 with type script in ASP.Net MVC 4 or 5?
As you said, in ASP.NET MVC application you have a package.config file. This file holds the information about NuGet packages you've installed in your app. This file is related to the server-side packages.
package.json file is related to a front-end part of your app. It also holds list of packages that you've installed in your app. This time npm packages. It also holds information about your app and more. You can read more about it here.
You can't mix those files and you don't want to. Firstly, those files have different format (XML and JSON). In addition, as I said before, they hold information about different parts of your application. Lastly, and this is my personal opinion, when you create application with rich UI and use Angular2, it'd be better to split the parts of your app into 2 different projects. One of them with Web APIs and the second with the UI part only. With such structure, you will no need for packages.config in UI project and no need for package.json in Web API project.
For you last question, you can start with here. You also can take a look on this sample app.
In order to run Angular 2 in an ASP.NET MVC 4.5 (VS 2015):
1) install Node.js (at least 4.4.x), npm (at least 3.x.x) and TypeScript for Visual Studio 2015 (VS -> Tools -> Extensions and Updates -> Online). You may check your version of node and npm by running the following in the terminal: "node -v" and "npm -v".
2) copy the QuickStart files (everything what quickstart-master constains, not the folder itself) into your project (to the folder containing the .csproj file) - you can download the QuickStart files from: https://github.com/angular/quickstart
3) In the Solution Explorer click "show all files" (probably the third icon from the right, just above the search bar). Select the following files/folders and include them in the project:
app folder (answer No if asked to search for TypeScript Typings)
styles.css
index.html
package.json
tsconfig.json
typings.json
4) In Visual Studio, right click on "package.json" and select "Restore Packages" - this will install all of the packages defined in the package.json into your project.
The result of this operation is the same as running "npm install" in your project location from the terminal.
Probably there'll be some warnings in the Output window - ignore them. A new folder called "node_modules" will be generated (you need to refresh the Solution Explorer to be able to see it) - advice is not to include this folder in the project.
5) In the tsconfig.json file, next to "compilerOptions" add the following:
"compileOnSave": true
as shown below
{
"compilerOptions": {
...
},
"compileOnSave": true
}
Restart Visual Studio.
6) In Visual Studio, right click on "index.html" and click "Set as Start Page".
As a reference, here's the official documentation for running Angular
2 (quickstart) in ASP.NET 4.x (Visual Studio 2015):
https://angular.io/docs/ts/latest/cookbook/visual-studio-2015.html
Also check out the link which includes steps to run.
You need to include package.json (Angular 2 gets installed using NPM)
Run NPM install
Run the GULP tasks
Run F5 to see results.
https://github.com/mithunvp/ng2Mvc5Demo
As its already accepted still it will be alternate way to get started
If You want to install Angular4 on nuget package manager console you can use Install-Package Angular4 -Version 1.1.0 and follow these steps:
Angular 4
*********
Prerequisites
`````````````
1. Download and Install Node js
2. Install Visual studio 2015 update 3 or above
3. Download and Install TypeScript 2.6.1 for Visual Studio 2015 (https://www.typescriptlang.org/#download-links)
Follow the steps to install package.
````````````````````````````````````
1. Create an new project with empty template and include dependencies for MVC and WebApi to the project
2. Install the package using command 'Install-Package Angular4 -Version 1.1.0'
Follow the steps after package installation
```````````````````````````````````````````
1. Open Node.js Command Prompt
2. Navigate to project location(use commands such as pushd,cd etc)
3. Run the command 'npm install'

Unable to install MVC 3

I am attempting to install asp.net MVC 3 to use with Visual Web Developer 2010 Express. I try to install from AspNetMVC3ToolsUpdateSetup.exe. The install log shows this:
MSI (s) (08:E4) [00:22:35:745]: Product: Microsoft ASP.NET MVC 3 -- A
later version of Microsoft ASP.NET MVC 3 is already installed. Setup
will now exit.
A later version of Microsoft ASP.NET MVC 3 is already installed. Setup
will now exit.
I have MVC 2 installed (it came with VWD 2010). I do not see MVC3 or MVC4 in installed programs list. I don't have NuGet installed. How could I manage to install it?
I apparently had a corrupted installation. I was unable to see MVC3 installed in control panel and I was unable to see it in visual studio, but the installer detected it anyway.
I managed to install it by unzipping the installer exe and then running aspnetmvc3vwd2010tools.msi from within it directly. I found that it was the correct msi by accident. Running setup from with in it failed consistently.

Xamarin Studio Package Console Edit Options

I'm using Xamarin Studio version 5.5.3 to build my ASP.NET MVC Application. When I create a MVC APP, is created with the version 5.2, however this version isn't totally supported and I need downgrade the package to some version < 5. I have to run the command "PM> Install-Package AspNetMvc -Version 4.0.20710" on package console, but it is readonly (as viewed on picture).
Someone have any idea to solve this problem?
The Package Console that ships with Xamarin Studio currently is read-only and only shows messages from NuGet.
There is a PowerShell console available as a separate addin but it is still an alpha release.
Alternatively you can install a specific version from the Add Packages dialog by running a search for all versions of a NuGet package:
Microsoft.AspNet.Mvc version:*
This will return all versions in the Add Packages dialog and you can then pick the version you want to install.

How to install EF 4.3?

Right now I am using EF 4.1. I want to upgrade to 4.3. What I did is:
1. Install NuGet for VS 2010
2. Use Manage NuGet Packages to install EF 4.3.
then then I got error message said:
The item C:\MyFolder\packages\EntityFramework.4.3.1\lib\net40\EntityFramework.dll could not be found in your workspace, or you do not have permission to access it.
Quite confused by this message, because MyFolder should not be involved for this install as it is user created folder. Does it mean I should install something before running Manage NuGet Packages to install EF 4.3?

Resources