Which NuGet package contains System.Web.Optimization? - asp.net

I'd like to handle my web application references using NuGet. Which NuGet package contains System.Web.Optimization?
I've searched the NuGet website. I've also looked at Which NuGet package contains System.Web.Routing?, and it answers a different question.

The NuGet Package that contains System.Web.Optimization is called Microsoft ASP.NET Web Optimization Framework.
Install-Package Microsoft.AspNet.Web.Optimization

Related

How to find out if a nuget Package is usable in .NET Core

If i search a nuget package within visual studio or at https://www.nuget.org/, how do i see if the nuget package is usable in .net core?
As far as I know, there is currently no possibility to search directly for nuget packages which can be used in .net core (Source). But can i check it for a specific one?
Currently there is no way to search for packages by target-framework.
You can follow this issue on Github for news/more information

Microsoft.AspNet.Session not available in ASP.NET core 1.0 rc1 update2

We are working on an application with asp.net core 1.0. Recently I need to use a session in asp.net core 1.0 Web Api application.
I have found a good article from the following link
http://www.mikesdotnetting.com/article/270/sessions-in-asp-net-core-1-0
But when I put Microsoft.AspNet.Session package in project.json at that time it's saying that package is no available. From where I can find the package for the session.
Use this command to install Nuget package from nuget console in Visual studio:
Install-Package Microsoft.AspNet.Session -Pre
It is a nuget package you can get it from here
https://www.nuget.org/packages/Microsoft.AspNet.Session/

Which NuGet package contains System.Web.Routing?

I'd like to handle my web application references using NuGet. Which NuGet package contains System.Web.Routing?
I've searched the NuGet website.
It's not in a NuGet package. It's in System.Web assembly, part of the .NET Framework. You can tell by looking at the assembly of the Route Class on MSDN.

How to get ASP.NET MVC Music Store up and running with Visual Studio 2013/2015?

I want to get MVC Music Store tutorial application up and running with Visual Studio 2013/2015. Here are the steps that I've taken:
downloaded the latest version from Downloads page
unpacked it
opened it with Visual Studio 2013/2015 - got a migration report without errors but with some warnings
tried to build the solution, but it won't build - got a plenty of errors about missing type/namespace like that:
The type or namespace name could not be found (are you missing a using
directive or an assembly reference?)
How do I build and run locally the MVC Music Store project with Visual Studio 2013/2015?
There are two ways:
1) Download and install ASP.NET MVC 3 Tools from the official ASP.NET MVC 3 page or from Microsoft Download Center. It will install the required DLLS into the GAC.
2) Install the corresponding ASP.NET MVC 3 NuGet package into MvcMusicStore project using following command in the Package Manager Console:
Install-Package Microsoft.AspNet.Mvc -Version 3.0.50813.1
or
Install-Package Microsoft.AspNet.Mvc -Version 3.0.20105.1
After using either of the described ways you will be able to successfully build and run the MVC Music Store tutorial application.
Note that these ways are not conflicting with each other, so you may safely install ASP.NET MVC 3 Tools into your OS and install ASP.NET MVC 3 NuGet package into the project.
Install-Package Microsoft.AspNet.Mvc -Version 3.0.20105.1
Worked for me instead of Version 3.0.50813.1
I was running into the same problem as other mentioned here, tried installing the nuget package and was still getting an error.
My solution after following other advice here by installing the nuget package, the key to my solution was to make sure the project targeted "Microsoft Framework 4.0". I.E. Right mouse on the project node in the solution explorer, select properties, and within the "Application" page for the project select ".Net Framework 4.0".
All is working fine for me after this, seems VS was defaulting to 4.5.1.
HTH.
dan d:)

Why NuGet is it getting MVVMLight for all frameworks and all platforms?

NuGet is getting MVVMLight binaries for WPF, SL3, SL4, SL5, WP7
I don't really like that.
Is there a way to make it get just for the framework which the project is using?
How is generally NuGet working for other packages, it maybe something which the MVVMLight author should do when creating the NuGet package?
Thanks,
Andrew
It's a nuget convention to include libraries of different framework versions inside a unique package. This makes it easier for the package consumer, there's only one version of a package to install.
When installing a package through NuGet Package Manager (UI or console), NuGet will only add references to libraries that targets your project's framework. Note: all the package content is unpacked to "\packages\", including libraries that aren't used.
Example:
I created a SL4 application and installed MVVMLightLibs. Only GalaSoft.MvvmLight.Extras.SL4 and GalaSoft.MvvmLight.SL4 are added as a reference.
see nuget documentation : Supporting_Multiple_.NET_Framework_Versions_and_Profiles

Resources