0
votes

Just had a chance to install VS2017 today because I needed logging for my azure app service with .net core 1.1.

Unfortunately I can't install the Nuget Microsoft.Extensions.Logging.AzureAppServices. It gives me errors. Here are some of the errors in the output window:

Package Microsoft.Data.OData 5.6.4 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package Microsoft.Data.OData 5.6.4 supports: - net40 (.NETFramework,Version=v4.0) - portable-net40+sl5+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile328) - portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259) - sl4 (Silverlight,Version=v4.0)

I really need to be able to use ILogger to somehow save errors the app is encountering. I figured this would be best, but if anyone has any other ideas as well that are somewhat easy to configure I am open to them.

Also I've been asked to include the content of my .csproj file so here goes:

<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
  <TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
  <Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
  <PackageReference Include="Microsoft.AspNetCore" Version="1.1.2" />
  <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" />
  <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.2" />
</ItemGroup>
<ItemGroup>
  <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.1" />
</ItemGroup>

</Project>

Thanks!

James

1
Could you include the content of your csproj file if you open it in a text editor in to your question?Scott Chamberlain
@Scott Chamberlain: I updated my post to include the .csproj file. Thanks!James Scott

1 Answers

1
votes

OK, I figured this out. This isn't in the MS documentation yet (that I can see) but it appears that the Microsoft.Extensions.Logging.AzureAppServices is not ready for .NET core yet. If you include the "pre-releases" of nuget packages in your search you will see one that is a newer version that only targets .NET Standard. I installed this package successfully.