You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is only my best guess that this is an MSBuild issue with the "new" csproj format. Maybe it's a NuGet issue? Or possibly the an issue with the way the library is packaged? Sorry if I'm wasting your time.
Summary
Using VS2016 RC, when referencing Microsoft.AspNetCore.TestHost (https://www.nuget.org/packages/Microsoft.AspNetCore.TestHost/) nuget package in a .NET Core project that targets net461, a MissingMethodException
is thrown when trying to create an HttpClient:
Error Message:
System.MissingMethodException :
Method not found: 'System.Net.Http.HttpClient Microsoft.AspNetCore.TestHost.TestServer.CreateClient()'.
It is also thrown when creating a "classic" .NET Framework class library and using PackageReferences for NuGet.
The exception is not thrown when targeting netcoreapp1.0, or when creating a "classic" .NET Framework class library using packages.config for NuGet.
System Info
Microsoft Visual Studio Professional 2017 RC
Version 15.0.26127.0 D15REL
Microsoft .NET Framework
Version 4.6.01586
Installed Version: Professional
ASP.NET and Web Tools 2016 15.0.30124.0
ASP.NET and Web Tools 2016
ASP.NET Web Frameworks and Tools 2013 5.2.50105.0
For additional information, visit https://www.asp.net/
NuGet Package Manager 4.0.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
As a small aside, the new csproj format looks really promising -- thanks for the great work!
The text was updated successfully, but these errors were encountered:
Reproduction code here: https://github.com/dfaivre/bugrepro_dotnetcore_missingmethod
It is only my best guess that this is an MSBuild issue with the "new" csproj format. Maybe it's a NuGet issue? Or possibly the an issue with the way the library is packaged? Sorry if I'm wasting your time.
Summary
Using VS2016 RC, when referencing
Microsoft.AspNetCore.TestHost
(https://www.nuget.org/packages/Microsoft.AspNetCore.TestHost/) nuget package in a .NET Core project that targetsnet461
, aMissingMethodException
is thrown when trying to create an HttpClient:
It is also thrown when creating a "classic" .NET Framework class library and using
PackageReferences
for NuGet.The exception is not thrown when targeting
netcoreapp1.0
, or when creating a "classic" .NET Framework class library usingpackages.config
for NuGet.System Info
As a small aside, the new
csproj
format looks really promising -- thanks for the great work!The text was updated successfully, but these errors were encountered: