Closed lunchin closed 9 months ago
Hello @lunchin
Can you give me a run down of the following please:
If you have any exception information, please provide a copy here once you've sanitized any client specific information.
Hello @lunchin
Is this the error you are encountering?
Method not found: 'Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder`1
Yes exactly. sorry meant to respond but did not have time earlier today. I am using all the latest Opti and Microsoft packages
The challenge I have is that Optimizely CMS is compiled at .NET 6 and a number of installations are running .NET 6 or .NET 7 and in order to get that version I'll need to bump the project to .NET 8. So feasibly I'll need to manage two versions of the package.
I'm going to investigate if there is a work around or whether I'll have to regenerate all the migrations. I'll get back to you soon.
i think you can just update the csproj to target both and then in the nuspec file create different dependencies by version.
`
</group>
<group targetFramework="net8.0">
<dependency id="PackageA" version="4.5.6" />
</group>`
I've just run a test and with the updated packages the migrations work fine for .NET 8. I'm not using a Nuspec file specifically but I'm modifying the CSProj targets to the same thing.
if you try adding net8.0,net6.0 in target framework in csproj may just work.
That's what I've done, I've also split the dependencies in the main csproj file to set different versions per framework:
<ItemGroup>
<PackageReference Include="EPiServer.CMS.UI.Core" Version="12.23.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.6" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.1" />
</ItemGroup>
2.4.0 has been pushed up to nuget.org. fortunately I have a few local solutions to test against.
Thanks I appreciate it. If only Opti would come out with 8.0 compiled versions.
For me that's a little behind 'nonce' support on the CMS Editor and Admin interfaces :)
Give me a shout and let me know if that works for you. My Azure test server for my modules are running .NET 7.0 right now. So I've only been able to test by pulling it into another solution I have on .NET 8 locally and starting with a fresh DB to ensure the migrations work and then done tests on my local solution.
Can confirm all is working on the project I was trying to use it on. Thanks again for you help and quick turn around time.
Thank you for the confirmation and for help :)
Facing an issue with migration step when trying to run with Microsoft.EntityFrameworkCore.SqlServer vrsion 8.0.1