Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Method not found - Microsoft.Extensions.Caching.Memory.MemoryCacheOptions.set_CompactOnMemoryPressure(Boolean) #320

Closed
darkengines opened this issue Jun 15, 2017 · 5 comments
Assignees
Milestone

Comments

@darkengines
Copy link

csproj

  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
    <RuntimeIdentifier>win7-x86</RuntimeIdentifier>
    <RuntimeFrameworkVersion>2.0.0-preview2-25407-01</RuntimeFrameworkVersion>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="RazorLight" Version="1.1.0" />
    <PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="2.0.0-preview3-25641" />
    <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="2.0.0-preview3-25641" />
  </ItemGroup>

I have https://dotnet.myget.org/F/dotnet-core/api/v3/index.json registered as a Nuget feed.

Issue

This line:

EngineFactory.CreatePhysical(Path.Combine(HostingEnvironment.ContentRootPath, @"Mailing\Templates"))

(RazorLight template engine creation https://github.com/toddams/RazorLight)
Known issue : toddams/RazorLight#69

Throws:

System.MissingMethodException : 'Method not found: 'Void Microsoft.Extensions.Caching.Memory.MemoryCacheOptions.set_CompactOnMemoryPressure(Boolean)'.'

Can you do something from your side?
No build error / warning.

Personal note: I think this is the last issue before we can move on netcoreapp2.0.

@Tratcher
Copy link
Member

Tratcher commented Jun 15, 2017

CompactOnMemoryPressure was removed in 2.0. It sounds like RazorLight depends on 1.1.1. You won't be able to use it with the 2.0 packages until they update their dependency.
https://github.com/toddams/RazorLight/blob/master/src/RazorLight/RazorLight.csproj#L22

@Tratcher
Copy link
Member

@JunTaoLuo @muratg

@JunTaoLuo
Copy link
Contributor

We may want to bring back the options and mark it as obsolete so we don't break consumers when they switch to 2.0.0. We removed it assuming no one was depending which is obviously not the case. Otherwise, we can wait until all third parties react accordingly.

@muratg
Copy link

muratg commented Jun 15, 2017

@glennc Thoughts? Do we want to bring back the options and add obsolete attributes?

@muratg muratg added this to the 2.0.0 milestone Jul 6, 2017
@muratg
Copy link

muratg commented Jul 6, 2017

Small work item to ensure we don't break 3rd party libraries. Assigning in 2.0.0 to @JunTaoLuo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants