I have been trying to get Visual Studio Team Services to compile and build my MVC 5 C# project. But I kept receiving the error messages below consistently:
App_Start\BundleConfig.cs (2): The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) Global.asax.cs (7): The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) App_Start\BundleConfig.cs (9): The type or namespace name 'BundleCollection' could not be found (are you missing a using directive or an assembly reference?)
I went through similar issue posted on stackoverflow and tried to apply the suggested solutions but none of them worked! I have no idea what else could fix this issue to try. I appreciate it if you could shed some lights on it. Thanks.
You need to ensure that Microsoft.AspNet.Web.Optimization and all of its dependencies are installed correctly.
Manage your Nuget Packages for the application and if it is showing as Installed, trying uninstalling and reinstalling it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With