Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.47k stars 4.8k forks source link

Can´t publish .net core to azure #3506

Closed sturlath closed 7 years ago

sturlath commented 7 years ago

We have a .net core api app (created in VS15 but ported to VS17).

After we ported it we managed to publish the app to azure just fine.

But when we tried again last week we just can´t publish the app.

image

But there is just one error and it tells us nothing. We have search for solution for 3 days and are stuck.

4>------ Publish started: Project: MyService, Configuration: Release Any CPU ------ All build submissions in a build must use project instances originating from the same project collection.

4>Publish failed due to build errors. Check the error list for more details. ========== Build: 3 succeeded, 0 failed, 4 up-to-date, 0 skipped ========== ========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

We can´t find out what "must use project instances originating from the same project collection" is telling us and verbose logging returns nothing that helps.

The thing is we can build and publish it locally and move it to our production (local IIS server) using e.g this command

dotnet publish --configuration Release --version-suffix 45 --output bin/output/

But there is no way to publish to azure (through VS2017 publish menu), we have tried everything we can think of. Even tried to use ftp (but found no docs on where to put the code).

Any ideas for us? What can we try?

## Here is debug information that hopefully can help

MyService.csproj

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup Label="Globals">
    <SccProjectName>SAK</SccProjectName>
    <SccProvider>SAK</SccProvider>
    <SccAuxPath>SAK</SccAuxPath>
    <SccLocalPath>SAK</SccLocalPath>
  </PropertyGroup>

  <PropertyGroup>
    <TargetFramework>net461</TargetFramework>
    <NoWarn>$(NoWarn);1591</NoWarn>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <PreserveCompilationContext>true</PreserveCompilationContext>
    <AssemblyName>MyService</AssemblyName>
    <OutputType>Exe</OutputType>
    <PackageId>MyService</PackageId>
  </PropertyGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
    <Reference Include="System" />
    <Reference Include="Microsoft.CSharp" />
  </ItemGroup>
</Project>

dotnet --info .NET Command Line Tools (1.0.4)

Product Information: Version: 1.0.4 Commit SHA-1 hash: af1e6684fd

Runtime Environment: OS Name: Windows OS Version: 10.0.14393 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\1.0.4

sturlath commented 7 years ago

One more thing I can think of is that in this solution we have 2 api service project sharing common project functions. Could that explain anything?

hovsepm commented 7 years ago

@sturlath please reopen this issue in https://github.com/dotnet/core repo.

sturlath commented 7 years ago

Thanks. Its done https://github.com/dotnet/core/issues/768