Base solution for your next web application
Open Closed

Publishing issue with recently downloaded project. #1766


User avatar
0
drenton created

I published 2 AspNetZero project and had no problem before.

When I publish new project that I downloaded last week, there is no option for "Execute code first migrations" only I can see "update database"

New project create a newproject.pubmxl like below.

<Object Type="DbDacFx">
            <PreSource Path="localhost" includeData="False" />
            <Source Path="$(IntermediateOutputPath)AutoScripts\Abp.Redis.Cache_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
          </Object>
          <UpdateFrom Type="Web.Config">
            <Source MatchValue="localhost" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
          </UpdateFrom>
        </ObjectGroup>

below is from my previous project (I use * for sensitive info)

<ObjectGroup Name="Default" Order="3" Enabled="True">
          <Destination Path="Data Source=***;Initial Catalog=***;Persist Security Info=True;User ID=***;Password=****" />
          <Object Type="DbCodeFirst">
            <Source Path="DBMigration" DbContext="****.EntityFramework.****, HGIntranet.EntityFramework" MigrationConfiguration="***.Migrations.Configuration, ***.EntityFramework" Origin="Configuration" />
          </Object>
        </ObjectGroup>
      </Objects>

Both project are used in the same computer and the same visual studio 2015 sp3.

I copy the old one to new one, it does not work.

It seems the project.web project could not find entity framework in project.entityframework project.


7 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Which version did you download ? ASP.NET MVC 5.x / Angularjs 1.x or ASP.NET CORE MVC ?

    I have tried with both and it does not work for ASP.NET CORE MVC version but it worked for ASP.NET MVC 5.x / Angularjs 1.x version. We haven't add anything related to this into project template. I think it's related to ASP.NET Core tooling which is not very good at the moment.

  • User Avatar
    0
    ismcagdas created
    Support Team

    By the way, I haven't tried this but if your project is ASP.NET Core MVC, the nyou can take a look at this stackoverflow question <a class="postlink" href="http://stackoverflow.com/questions/35324156/automatically-execute-migrations-when-publishing-asp-net-core-app">http://stackoverflow.com/questions/3532 ... t-core-app</a>

  • User Avatar
    0
    drenton created

    I downloaded ASP.NET MVC 5.1 / AngularJS. and I don't change anything at all, but it does not work.

    I have old version(abp0.9.1) witch I don't change anything, it works fine.

    For testing. I created a new Web project(solution) and add class library project then add Entity Framework, then I referenced it from web project, it works, but As I reference the aspnetzero(downloaded project).entitiyframework with needed projects(core,application etc..) it does not work.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Thanks for the information. I will try this and get back to you soon.

  • User Avatar
    0
    drenton created

    FYI

    I just downloaded aspnet-zero-1.10.1 and aspnet-zero-1.11.1 for test,

    1.10.1 works, 1.11.1 does not work.

    Thanks.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I have downloaded two fresh templates from <a class="postlink" href="https://aspnetzero.com/download">https://aspnetzero.com/download</a> both SPA (with angularJs) and MAP (witn jQuery).

    I tried before building projects and publish didn't find dbContexes. But after a successfull build publish found dbContexes successfully. Can you try that ?

  • User Avatar
    0
    drenton created

    The new templates work fine!

    Thanks :D