Closed CESARDELATORRE closed 7 years ago
I have pushed a fix for this issue in the commit ca029618e62a1af46f09fdd2412eb7ec9eaa0970 . As a solution I impose in project build order that docker-compose is the last project to build. I think this could be a potential bug of VS 2017, because if the build of docker-compose can conflict with other projects build this should be taken into account automatically in the Project Build Order.
@dsrodenas Can we re-open? The same issue is happening in 15.5.6.
Preventing the docker-compose project from building allows all projects to build, with it enable, it fails in the same way as this issue - XXX assembly not found.
Building individually works fine, as does the docker-compose, just not rebuilding the solution.
This is an ASP.NET Core 2 solution with 38 projects - roughly half of those are unit test projects.
When re-building the solution sometimes the FunctionalTests.csproj fails trying to find the Catalog.API.dll and/or Ordering.API.dll
10>CSC : error CS0006: Metadata file 'D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Catalog\Catalog.API\bin\Debug\netcoreapp1.1\Catalog.API.dll' could not be found 10>Done building project "FunctionalTests.csproj" -- FAILED. 11>UnitTest -> D:\GITREPOS\eShopOnContainers-vs2017\test\Services\UnitTest\bin\Debug\netcoreapp1.1\UnitTest.dll
Then, if building specifically the Catalog.API.dll and Ordering.API.dll projects and re-building the solution, it works... Might be a VS bug?
Sometimes, you can repro it by cleaning the solution a re-building the whole solution. Other times, it compiles everything ok..., it is a bit weird or non-predictable...
All VS Output when building
Restoring NuGet packages... To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.' 1>------ Rebuild All started: Project: Ordering.Domain, Configuration: Debug Any CPU ------ 2>------ Rebuild All started: Project: Catalog.API, Configuration: Debug Any CPU ------ 3>------ Rebuild All started: Project: Basket.API, Configuration: Debug Any CPU ------ 4>------ Rebuild All started: Project: WebMVC, Configuration: Debug Any CPU ------ 4>WebMVC -> D:\GITREPOS\eShopOnContainers-vs2017\src\Web\WebMVC\bin\Debug\netcoreapp1.1\WebMVC.dll 2>Catalog.API -> D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Catalog\Catalog.API\bin\Debug\netcoreapp1.1\Catalog.API.dll 3>Basket.API -> D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Basket\Basket.API\bin\Debug\netcoreapp1.1\Basket.API.dll 1>AggregatesModel\BuyerAggregate\PaymentMethod.cs(9,21,9,29): warning CS0169: The field 'PaymentMethod._buyerId' is never used 1>AggregatesModel\OrderAggregate\OrderItem.cs(14,25,14,33): warning CS0169: The field 'OrderItem._orderId' is never used 1>Ordering.Domain -> D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Ordering\Ordering.Domain\bin\Debug\netstandard1.6.1\Ordering.Domain.dll 1>Done building project "Ordering.Domain.csproj". 5>------ Rebuild All started: Project: eShopOnContainers.WebSPA, Configuration: Debug Any CPU ------ 6>------ Rebuild All started: Project: Identity.API, Configuration: Debug Any CPU ------ 7>------ Rebuild All started: Project: Ordering.Infrastructure, Configuration: Debug Any CPU ------ 8>------ Rebuild All started: Project: docker-compose, Configuration: Debug Any CPU ------ 8>docker-compose -f "D:\GITREPOS\eShopOnContainers-vs2017\docker-compose.yml" -f "D:\GITREPOS\eShopOnContainers-vs2017\docker-compose.override.yml" -f "D:\GITREPOS\eShopOnContainers-vs2017\docker-compose.vs.release.yml" -p dockercompose504665630 kill 8>docker-compose -f "D:\GITREPOS\eShopOnContainers-vs2017\docker-compose.yml" -f "D:\GITREPOS\eShopOnContainers-vs2017\docker-compose.override.yml" -f "D:\GITREPOS\eShopOnContainers-vs2017\docker-compose.vs.release.yml" -p dockercompose504665630 down --rmi local --remove-orphans 8>Removing network dockercompose504665630_default 8>Network dockercompose504665630_default not found. 8>docker-compose -f "D:\GITREPOS\eShopOnContainers-vs2017\docker-compose.yml" -f "D:\GITREPOS\eShopOnContainers-vs2017\docker-compose.override.yml" -f "D:\GITREPOS\eShopOnContainers-vs2017\docker-compose.vs.debug.yml" -p dockercompose504665630 kill 8>docker-compose -f "D:\GITREPOS\eShopOnContainers-vs2017\docker-compose.yml" -f "D:\GITREPOS\eShopOnContainers-vs2017\docker-compose.override.yml" -f "D:\GITREPOS\eShopOnContainers-vs2017\docker-compose.vs.debug.yml" -p dockercompose504665630 down --rmi local --remove-orphans 8>Removing network dockercompose504665630_default 8>Network dockercompose504665630_default not found. 8>docker images --filter dangling=true --format {{.ID}} 8>docker-compose -f "D:\GITREPOS\eShopOnContainers-vs2017\docker-compose.yml" -f "D:\GITREPOS\eShopOnContainers-vs2017\docker-compose.override.yml" -f "D:\GITREPOS\eShopOnContainers-vs2017\docker-compose.vs.debug.yml" -p dockercompose504665630 config 8>networks: {} 8>services: 8> basket.api: 8> build: 8> args: 8> source: obj/Docker/empty/ 8> context: D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Basket\Basket.API 8> dockerfile: Dockerfile 8> depends_on: 8> - basket.data 8> - identity.api 8> entrypoint: tail -f /dev/null 8> environment: 8> ASPNETCORE_ENVIRONMENT: Development 8> ConnectionString: basket.data 8> DOTNET_USE_POLLING_FILE_WATCHER: '1' 8> identityUrl: http://10.0.75.1:5105 8> image: eshop/basket.api:dev 8> labels: 8> com.microsoft.visualstudio.targetoperatingsystem: linux 8> ports: 8> - 5103:5103 8> volumes: 8> - D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Basket\Basket.API:/app:rw 8> - C:\Users\CESARDL\clrdbg:/clrdbg:ro 8> - C:\Users\CESARDL.nuget\packages:/root/.nuget/packages:ro 8> basket.data: 8> image: redis 8> ports: 8> - 6379:6379 8> catalog.api: 8> build: 8> args: 8> source: obj/Docker/empty/ 8> context: D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Catalog\Catalog.API 8> dockerfile: Dockerfile 8> depends_on: 8> - sql.data 8> entrypoint: tail -f /dev/null 8> environment: 8> ASPNETCORE_ENVIRONMENT: Development 8> ConnectionString: Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User 8> Id=sa;Password=Pass@word 8> DOTNET_USE_POLLING_FILE_WATCHER: '1' 8> ExternalCatalogBaseUrl: http://10.0.75.1:5101 8> image: eshop/catalog.api:dev 8> labels: 8> com.microsoft.visualstudio.targetoperatingsystem: linux 8> ports: 8> - 5101:5101 8> volumes: 8> - D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Catalog\Catalog.API:/app:rw 8> - C:\Users\CESARDL\clrdbg:/clrdbg:ro 8> - C:\Users\CESARDL.nuget\packages:/root/.nuget/packages:ro 8> eshoponcontainers.webspa: 8> build: 8> args: 8> source: obj/Docker/empty/ 8> context: D:\GITREPOS\eShopOnContainers-vs2017\src\Web\WebSPA\eShopOnContainers.WebSPA 8> dockerfile: Dockerfile 8> depends_on: 8> - basket.api 8> - identity.api 8> entrypoint: tail -f /dev/null 8> environment: 8> ASPNETCORE_ENVIRONMENT: Development 8> BasketUrl: http://10.0.75.1:5103 8> CatalogUrl: http://10.0.75.1:5101 8> DOTNET_USE_POLLING_FILE_WATCHER: '1' 8> IdentityUrl: http://10.0.75.1:5105 8> OrderingUrl: http://10.0.75.1:5102 8> image: eshop/eshoponcontainers.webspa:dev 8> labels: 8> com.microsoft.visualstudio.targetoperatingsystem: linux 8> ports: 8> - 5104:5104 8> volumes: 8> - D:\GITREPOS\eShopOnContainers-vs2017\src\Web\WebSPA\eShopOnContainers.WebSPA:/app:rw 8> - C:\Users\CESARDL\clrdbg:/clrdbg:ro 8> - C:\Users\CESARDL.nuget\packages:/root/.nuget/packages:ro 8> identity.api: 8> build: 8> args: 8> source: obj/Docker/empty/ 8> context: D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Identity\Identity.API 8> dockerfile: Dockerfile 8> depends_on: 8> - sql.data 8> entrypoint: tail -f /dev/null 8> environment: 8> ASPNETCORE_ENVIRONMENT: Development 8> ConnectionStrings__DefaultConnection: Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User 8> Id=sa;Password=Pass@word 8> DOTNET_USE_POLLING_FILE_WATCHER: '1' 8> MvcClient: http://10.0.75.1:5105 8> SpaClient: http://localhost:5104 8> image: eshop/identity.api:dev 8> labels: 8> com.microsoft.visualstudio.targetoperatingsystem: linux 8> ports: 8> - 5105:5105 8> volumes: 8> - D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Identity\Identity.API:/app:rw 8> - C:\Users\CESARDL\clrdbg:/clrdbg:ro 8> - C:\Users\CESARDL.nuget\packages:/root/.nuget/packages:ro 8> ordering.api: 8> build: 8> args: 8> source: obj/Docker/empty/ 8> context: D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Ordering\Ordering.API 8> dockerfile: Dockerfile 8> depends_on: 8> - sql.data 8> entrypoint: tail -f /dev/null 8> environment: 8> ASPNETCORE_ENVIRONMENT: Development 8> ConnectionString: Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User 8> Id=sa;Password=Pass@word 8> DOTNET_USE_POLLING_FILE_WATCHER: '1' 8> identityUrl: http://10.0.75.1:5105 8> image: eshop/ordering.api:dev 8> labels: 8> com.microsoft.visualstudio.targetoperatingsystem: linux 8> ports: 8> - 5102:5102 8> volumes: 8> - D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Ordering\Ordering.API:/app:rw 8> - C:\Users\CESARDL\clrdbg:/clrdbg:ro 8> - C:\Users\CESARDL.nuget\packages:/root/.nuget/packages:ro 8> sql.data: 8> environment: 8> ACCEPT_EULA: Y 8> SA_PASSWORD: Pass@word 8> image: microsoft/mssql-server-linux 8> ports: 8> - 5433:1433 8> webmvc: 8> build: 8> args: 8> source: obj/Docker/empty/ 8> context: D:\GITREPOS\eShopOnContainers-vs2017\src\Web\WebMVC 8> dockerfile: Dockerfile 8> depends_on: 8> - basket.api 8> - catalog.api 8> - identity.api 8> - ordering.api 8> entrypoint: tail -f /dev/null 8> environment: 8> ASPNETCORE_ENVIRONMENT: Development 8> BasketUrl: http://basket.api:5103 8> CatalogUrl: http://catalog.api:5101 8> DOTNET_USE_POLLING_FILE_WATCHER: '1' 8> IdentityUrl: http://10.0.75.1:5105 8> OrderingUrl: http://ordering.api:5102 8> image: eshop/webmvc:dev 8> labels: 8> com.microsoft.visualstudio.targetoperatingsystem: linux 8> ports: 8> - 5100:5100 8> volumes: 8> - D:\GITREPOS\eShopOnContainers-vs2017\src\Web\WebMVC:/app:rw 8> - C:\Users\CESARDL\clrdbg:/clrdbg:ro 8> - C:\Users\CESARDL.nuget\packages:/root/.nuget/packages:ro 8>version: '2.0' 8>volumes: {} 6>Identity.API -> D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Identity\Identity.API\bin\Debug\netcoreapp1.1\Identity.API.dll 5>eShopOnContainers.WebSPA -> D:\GITREPOS\eShopOnContainers-vs2017\src\Web\WebSPA\eShopOnContainers.WebSPA\bin\Debug\netcoreapp1.1\eShopOnContainers.WebSPA.dll 7>Ordering.Infrastructure -> D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Ordering\Ordering.Infrastructure\bin\Debug\netstandard1.6.1\Ordering.Infrastructure.dll 9>------ Rebuild All started: Project: Ordering.API, Configuration: Debug Any CPU ------ 9>Ordering.API -> D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Ordering\Ordering.API\bin\Debug\netcoreapp1.1\Ordering.API.dll 10>------ Rebuild All started: Project: FunctionalTests, Configuration: Debug Any CPU ------ 11>------ Rebuild All started: Project: UnitTest, Configuration: Debug Any CPU ------ 10>CSC : error CS0006: Metadata file 'D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Catalog\Catalog.API\bin\Debug\netcoreapp1.1\Catalog.API.dll' could not be found 10>Done building project "FunctionalTests.csproj" -- FAILED. 11>UnitTest -> D:\GITREPOS\eShopOnContainers-vs2017\test\Services\UnitTest\bin\Debug\netcoreapp1.1\UnitTest.dll 8>docker ps --filter "status=running" --filter "name=dockercompose504665630basket.api" --format {{.ID}} -n 1 8>docker ps --filter "status=running" --filter "name=dockercompose504665630catalog.api" --format {{.ID}} -n 1 8>docker ps --filter "status=running" --filter "name=dockercompose504665630eshoponcontainers.webspa" --format {{.ID}} -n 1 8>docker ps --filter "status=running" --filter "name=dockercompose504665630identity.api" --format {{.ID}} -n 1 8>docker ps --filter "status=running" --filter "name=dockercompose504665630ordering.api" --format {{.ID}} -n 1 8>docker ps --filter "status=running" --filter "name=dockercompose504665630webmvc" --format {{.ID}} -n 1 8>Basket.API -> D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Basket\Basket.API\bin\Debug\netcoreapp1.1\Basket.API.dll 8>Catalog.API -> D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Catalog\Catalog.API\bin\Debug\netcoreapp1.1\Catalog.API.dll 8>Ordering.API -> D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Ordering\Ordering.API\bin\Debug\netcoreapp1.1\Ordering.API.dll 8>WebMVC -> D:\GITREPOS\eShopOnContainers-vs2017\src\Web\WebMVC\bin\Debug\netcoreapp1.1\WebMVC.dll 8>eShopOnContainers.WebSPA -> D:\GITREPOS\eShopOnContainers-vs2017\src\Web\WebSPA\eShopOnContainers.WebSPA\bin\Debug\netcoreapp1.1\eShopOnContainers.WebSPA.dll 8>Identity.API -> D:\GITREPOS\eShopOnContainers-vs2017\src\Services\Identity\Identity.API\bin\Debug\netcoreapp1.1\Identity.API.dll ========== Rebuild All: 10 succeeded, 1 failed, 0 skipped ==========