3

One of the projects I'm working on has the extension class HttpConfigurationExtensions from System.Web.Http 5.2.2

To add it to another project, I installed the nuget

PM> Install-Package Microsoft.AspNet.WebApi -Version 5.2.2

However, it doesn't seem to have added HttpConfigurationExtensions though the assemblies are identical.

I guess I'm doing something wrong here. What could it be and how would you go about adding HttpConfigurationExtensions to your project?

PS:

This is what the disassembler shows for System.Web.Http.cs for both projects

using System;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;

// Assembly System.Web.Http, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// MVID: 214E5BA0-B5E8-43DD-B986-3648DF7435EE
// References: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// References: System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// References: System.Net.Http.Formatting, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// References: System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// References: System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// References: System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// References: Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
// References: System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// References: System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

[assembly: AssemblyTrademark("")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: AssemblyConfiguration("")]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]
[assembly: AssemblyCompany("Microsoft Corporation.")]
[assembly: AssemblyMetadata("Serviceable", "True")]
[assembly: AssemblyProduct("Microsoft ASP.NET MVC")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Extension]
[assembly: TargetFramework(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")]
[assembly: SatelliteContractVersion("5.2.2.0")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyFileVersion("5.2.20826.0")]
[assembly: AssemblyInformationalVersion("5.2.2-20826 (66298100f4e349d3812b1aad32c5278c256a2cdd)")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyTitle("System.Web.Http")]
[assembly: Guid("70cecdcd-46f5-492b-9e1f-1d9a947f1fd1")]
[assembly: InternalsVisibleTo("System.Web.Http.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.Web.Http.Integration.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: AssemblyVersion("5.2.2.0")]

However, when I browse the assembly through the Assembly Explorer (from Resharper) it doesn't show any classes in System.Web.Http in the project which I added the nuget (which has HttpConfigurationExtensions missing).

enter image description here

But the other project has all the relevant classes enter image description here

1 Answer 1

1

I was having the same issue with a project I was attempting to manually at Web API to.

Try reinstalling it via Nuget:

update-package microsoft.aspnet.webapi -reinstall

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.