Closed mjnorman closed 6 years ago
What version of ASP.NET Core is installed on the server? Does it have the latest 2.0.6 version?
I'm using latest dotnet core buildpack.
Downloaded build artifacts cache (111.5M)
-----> Download go 1.9.1
-----> Running go build supply
-----> Dotnet-Core Buildpack version 2.0.5
-----> Supplying Dotnet Core
-----> Installing libunwind 1.2.1
Copy [/tmp/cache/final/dependencies/10049b6ebf7e832b899ad805e311c53dfb50e6987726fb32743145262e3f3a74/libunwind-1.2.1-linux-x64-80af276a.tgz]
using the default SDK
-----> Installing dotnet 2.1.101
Copy [/tmp/cache/final/dependencies/c3a44d39885ebc4138f9d297acac0b472afe46385f5ee8223eda609ff898529d/dotnet.2.1.101.linux-amd64-091a56fb.tar.xz]
-----> Running go build finalize
-----> Finalizing Dotnet Core
Required dotnetframework versions: [2.0.6]
-----> Installing dotnet-framework 2.0.6
Download [https://buildpacks.cloudfoundry.org/dependencies/dotnet-framework/dotnet-framework.2.0.6.linux-amd64-659da8da.tar.xz]
-----> Cleaning staging area
Exit status 0
I'm not really sure where this went sideways, but I managed to resolve the issue by manually deleting all contents in the bin directory of the Web project. I had done dotnet clean many times, but it would not clean the contents of the directory. Once I did this, the project pushes with no problem.
Updated app to use ASPNetCore.All v2.0.6. Builds/runs fine locally, but when pushing to cloud foundry instance with latest buildpack, https://github.com/cloudfoundry/dotnet-core-buildpack.git, I receive the following error on application start:
2018-04-10T20:41:01.82-0500 [APP/PROC/WEB/0] ERR Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
This assembly is referenced by two packages, the ASPNetCore.All (2.0.6) from the Web application, and FluentValidation.AspNetCore (7.5.2) from the Data Models Class library of my project. Any suggestions?