Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASP.NET/EF Core 2.0.3 patch pre-release test feed - discussion #2254

Closed
Eilon opened this issue Oct 23, 2017 · 43 comments
Closed

ASP.NET/EF Core 2.0.3 patch pre-release test feed - discussion #2254

Eilon opened this issue Oct 23, 2017 · 43 comments

Comments

@Eilon
Copy link
Member

Eilon commented Oct 23, 2017

This is the discussion issue for this announcement: aspnet/Announcements#274

@Eilon Eilon added this to the Discussions milestone Oct 23, 2017
This was referenced Oct 23, 2017
@kjbetz
Copy link

kjbetz commented Oct 27, 2017

I ended up just removing the tools for the time being and that fixed my first issue.

I ran into 'dotnet publish' issue too but remedy listed above by @natemcmaster fixed that for now too.

@tiagorosendo
Copy link

After update to this version "dotnet ef --startup-project ../WebApi migrations add {MigrationName}"
give this error:

[05:10:34 DBG] An 'IServiceProvider' was created for internal use by Entity Framework.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.EntityFrameworkCore.Metadata.Internal.InternalModelBuilder.RemoveEntityType(EntityType entityType, ConfigurationSource configurationSource)
   at Microsoft.EntityFrameworkCore.Metadata.Internal.InternalModelBuilder.Ignore(EntityType entityType, ConfigurationSource configurationSource)
   at Microsoft.EntityFrameworkCore.Metadata.Internal.InternalModelBuilder.RemoveEntityTypesUnreachableByNavigations(ConfigurationSource configurationSource)
   at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ModelCleanupConvention.Apply(InternalModelBuilder modelBuilder)
   at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.ImmediateConventionScope.OnModelBuilt(InternalModelBuilder modelBuilder)
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.CreateModel(DbContext context, IConventionSetBuilder conventionSetBuilder, IModelValidator validator)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.EntityFrameworkCore.Internal.DbContextServices.CreateModel()
   at Microsoft.EntityFrameworkCore.Internal.DbContextServices.get_Model()
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.<>c__DisplayClass22_0.<RealizeService>b__0(ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies()
   at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider()
   at Microsoft.EntityFrameworkCore.Infrastructure.AccessorExtensions.GetService[TService](IInfrastructure`1 accessor)
   at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(Func`1 factory)
   at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(String contextType)
   at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.ScriptMigration(String fromMigration, String toMigration, Boolean idempotent, String contextType)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScriptMigration.<>c__DisplayClass0_1.<.ctor>b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.<Execute>b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
Object reference not set to an instance of an object.

@Eilon
Copy link
Member Author

Eilon commented Oct 28, 2017

@bricelam / @ajcvickers - any ideas on this error?

@tiagorosendo
Copy link

tiagorosendo commented Oct 29, 2017

@Eilon this occurs when I have a value object in my entity and ignore it in the model builder with the builder.Ignore(x => x.ValueObject);

The error occured in all entity framework operations, not only in add migrations command, do u know any workaround for this ?

@ajcvickers
Copy link
Member

@tiagorosendo Can you please file a new issue for this, including a complete code listing or project that will allow us to reproduce what you are seeing? Also, was this working in 2.0.0 and broke when updating to 2.0.1/2.0.3?

@julielerman
Copy link

I'm getting this warning at dotnet run on a project I just shifted from EF Core 2.0 to EF Core 2.0.1-*:

also: macOS Sierra (not High Sierra)
Visual Studio Code

I have used the tools in a few other projects that I tested out and did not see this warning before. the bright yellow text is hard to miss.

warning NU1603: Microsoft.EntityFrameworkCore.Tools.DotNet 2.0.1-rtm-203 depends on Microsoft.NETCore.App (>= 2.0.2-servicing-25728-02) but Microsoft.NETCore.App 2.0.2-servicing-25728-02 was not found. An approximate best match of Microsoft.NETCore.App 2.1.0-dev-di-25408-06 was resolved. [/Users/julialerman/Dropbox/ConferenceStuff/Devintersection 2017/EFCore2/EFCore2Demo/EFCore2Demo.csproj]

warning NU1603: NETStandard.Library 2.1.0-preview1-25407-01 depends on Microsoft.Packaging.Tools (>= 1.0.0-preview1-25407-01) but Microsoft.Packaging.Tools 1.0.0-preview1-25407-01 was not found. An approximate best match of Microsoft.Packaging.Tools 1.0.0-preview2-25224-01 was resolved.

Here is my csproj file:

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

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.0.1-*" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.1-*" />
  </ItemGroup>
<ItemGroup>
   <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.1-*" />
</ItemGroup>
</Project>

@komby
Copy link

komby commented Nov 3, 2017

Are we getting close to having a preview package available on nuget.org?

@Eilon
Copy link
Member Author

Eilon commented Nov 6, 2017

@komby we're not planning to put preview packages on nuget.org, so please use the MyGet.org test feed in the meantime. The final release is coming up very soon so it shouldn't be a long wait.

@wesselkranenborg
Copy link

wesselkranenborg commented Nov 10, 2017

@Eilon: Can you share a timeframe with us? Is it days or weeks? We are facing a bug which is fixed in this release but this keeps us from using it in production.

@ErikEJ
Copy link

ErikEJ commented Nov 10, 2017

@wesselkranenborg Around mid of November 😄

@rodyvansambeek
Copy link

Is it possible to use this preview package on Azure App Service? I cannot get my asp.net web application running there when I use the new preview package.

@wesselkranenborg
Copy link

@rodyvansambeek It is possible to publish this to Azure App Service. You need to use the PublishWithAspNetCoreTargetManifest flag during deployment. More information on this flag can be found here: https://docs.microsoft.com/en-us/dotnet/core/deploying/runtime-store#aspnet-core-implicit-store

@natemcmaster also mentions this in his comment: #2254 (comment)

@poke
Copy link
Contributor

poke commented Nov 14, 2017

@Eilon With those three security announcements and the patches that hit NuGet a few hours ago, are the 2.0.3 changes from this pre-release included there? The version numbers are really confusing (e.g. the meta package is on 2.0.3, Razor is on 2.0.1) and there are no tags in the GitHub repositories yet that match the available releases.

@Eilon
Copy link
Member Author

Eilon commented Nov 15, 2017

@poke , yes, yesterday's release has all the patch fixes that were in the public test feed, plus a few others.

We did just add tags to the repos today/yesterday to hopefully clear a few things up.

But, we do recognize that the version numbers are still a bit confusing and we're having some discussions to see how we can simplify them even more.

@kinosang
Copy link

Now this version is already published to nuget.org, but we can still get assembly not found exception when deploy on Azure Web Service without the PublishWithAspNetCoreTargetManifest flag.

@wesselkranenborg
Copy link

@kinosang That's because the deployment to Azure App Service is not yet finished. See here: Azure/app-service-announcements#61

@niemyjski
Copy link

@davidebbo Since I can't comment on Azure/app-service-announcements#61 ... I'm unable to get my apps working with the latest 2.0.3 package / sdk on azure at all.. This is not good and the csproj changes did nothing to help.

@davidebbo
Copy link

@niemyjski Can you start a question on the Web App MSDN forum or on StackOverflow? Make sure to include a minimal repro and details on how you're deploying.

@mchenx
Copy link

mchenx commented Dec 5, 2017

waiting for the next release...

@namvvo
Copy link

namvvo commented Dec 6, 2017

a long horn

@digogid
Copy link

digogid commented Mar 20, 2018

Hey guys, first time around.
I have the same issue that @tiagorosendo posted.
When I try to Ignore(x => x.ValueObject) or even Ignore(x => x.AggregateEntity) it throws Object reference not set to an instance of an object at Microsoft.EntityFrameworkCore.Metadata.Internal.InternalModelBuilder.RemoveEntityType(EntityType entityType, ConfigurationSource configurationSource).

I have tried EF Core 2.0.2 and 2.1.0-preview1-final.
Both throws the same error.

You can find my sample at https://github.com/digogid/eStore.Sample
I was trying to do it, running 'eStore.MigrationRunner' as startup project.

@Eilon
Copy link
Member Author

Eilon commented Mar 20, 2018

Hi @digogid , if this is an issue with EF Core, can you please log a new issue in https://github.com/aspnet/EntityFrameworkCore/issues with steps to reproduce? Thanks!

@aspnet-hello
Copy link

We periodically close 'discussion' issues that have not been updated in a long period of time.

We apologize if this causes any inconvenience. We ask that if you are still encountering an issue, please log a new issue with updated information and we will investigate.

@aspnet-hello aspnet-hello removed this from the Discussions milestone Jul 11, 2018
@hidayatarg
Copy link

I solved this error by installing the following packages From package manager console

<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.4" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.Design" Version="1.1.6" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.4">

@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests