Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't deploy aspnet with C# & F# to azure - All build submissions in a build must use project instances originating from the same project collection

I'm starting a new web application, I wanted to use aspnetcore and the latest libraries and tools but I also wanted to use a functional, immutable language for the backend (the domain is one of those where OOP is specially painful to use) so we decided to go with F#

The thing is: aspnetcore for F# tooling is not yet on par with C# tooling (visual studio support, debugging, etc), so we decided to build the frontend in C# and the backend in F#. I was able to get it to build and run locally but when I try pushing it to azure I get an error

All build submissions in a build must use project instances originating from the same project collection

This is my environment:

OS: Windows
IDE: Visual Studio 2017 v15.2

Steps:

  1. Open Visual Studio 2017
  2. Create new project (choose ASP.NET Core Web Application (.NET Framework))
  3. Choose "Empty template"
  4. Add new project to solution (choose F# Library)
  5. Add reference from WebProject to Library
  6. Compile & Run -> Everything OK
  7. Publish webproject to azure and get this error:

1>------ Build started: Project: WebApplication23, Configuration: Release Any CPU ------
1>WebApplication23 -> C:*****\WebApplication23\WebApplication23\bin\Release\net452\win7-x86\WebApplication23.exe
2>------ Publish started: Project: WebApplication23, Configuration: Release Any CPU ------
All build submissions in a build must use project instances originating from the same project collection.
2>Publish failed due to build errors. Check the error list for more details.
========== Build: 1 succeeded, 0 failed, 2 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

If instead of an F# project I create a classic desktop C# library, it deploys successfully

like image 257
Orlando William Avatar asked Jun 20 '17 19:06

Orlando William


1 Answers

Currently dealing with very similar issues. Same type of solution, C# on the front end and F# on the back. There are some serious bugs with the publish system in VS 2017. I was down nearly 3 days before I came across this which allows me to publish only via the command line. https://developercommunity.visualstudio.com/content/problem/36498/publish-fails-with-all-build-submissions-in-a-buil.html

like image 64
user1206480 Avatar answered Nov 14 '22 20:11

user1206480