Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

what's failing kestrel to run on heroku #994

Closed
halter73 opened this issue Feb 10, 2017 · 9 comments
Closed

what's failing kestrel to run on heroku #994

halter73 opened this issue Feb 10, 2017 · 9 comments
Assignees

Comments

@halter73
Copy link
Member

From @AbhimanyuAryan on February 10, 2017 23:12

I have created an new asp.net core project and it runs on locally but fails when deployed to heroku. Please see this issue and help me understand this problem. What's causing this issue

Copied from original issue: aspnet/KestrelHttpServer#1357

@ajaybhargavb
Copy link
Contributor

@AbhimanyuAryan, could you post both the project.json contents here? Or better yet if possible could you upload both projects to Github and share the link?

@AbhimanyuAryan
Copy link

@ajaybhargavb link to repo

repo generated by yeoman: https://github.com/AbhimanyuAryan/ivdstudios
repo generated by dotnet: https://github.com/ivdstudios/DotNetCoreMVC-LinuxMint

@rynowak
Copy link
Member

rynowak commented Mar 9, 2017

/cc @pranavkm

@pranavkm
Copy link
Contributor

pranavkm commented Mar 9, 2017

@AbhimanyuAryan, by default, the CLI uses the folder name as the output assembly name. When deploying the Heroku, it looks like it's checking out the application in a randomly named directory: log : Restoring packages for /tmp/tmp.d4Qf6iTUHZ/app/project.json...

Try specifying the outputName in your project.json:

{
  "buildOptions": {
    "outputName": "ivdstudios"
     ...
  }

@Eilon
Copy link
Contributor

Eilon commented Mar 14, 2017

@AbhimanyuAryan can you let us know if this worked for you? Thanks!

@pranavkm
Copy link
Contributor

To add to this, updating to the csproj should also solve this issue. The default value for the project name is inferred from the project file name (MyApp.csproj) and not the directory. You have the ability to change this value using AssemblyName, but where project is checked out shouldn't affect your output binary name.

@AbhimanyuAryan
Copy link

@Eilon no I still can't figure out. @pranavkm I'm have a .csproj project. What do you think should I add here?

<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp1.0</TargetFramework>
    
  </PropertyGroup>
  
  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore" Version="1.0.3" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.0.2" />
    <PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.0.1" />
    <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.0.1" />
    <PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.0.1" />
  </ItemGroup>
  
  
</Project>

@Eilon
Copy link
Contributor

Eilon commented Mar 27, 2017

@AbhimanyuAryan can you share your full updated app on GitHub, plus also what current error(s) or behavior(s) you're getting?

@pranavkm
Copy link
Contributor

@AbhimanyuAryan feel free to reopen this work item once you have a repro we could try somewhere. It's difficult to determine much from the details you've provided.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants