AspNetCoreDemoApp: Can't deploying on Heroku due to some error.
I have API project and I try to publish on Heroku. While I push on Heroku I got an error. The full build log file attached. Build Log.txt
dotnet/sdk/NuGetFallbackFolder/microsoft.identitymodel.clients.activedirectory/3.14.1/src/src/ADAL.PCL.Android/Resources/Resource.Designer.cs(12,20): error CS0400: The type or namespace name ‘Android’ could not be found in the global namespace (are you missing an assembly reference?) [/tmp/build_54bd10f2a99affeb41ea501751ae3a17/WebAPIApplication.csproj]
! Push rejected, failed to compile ASP.NET Core app. ! Push failed
dotnet --info
.NET Command Line Tools (2.0.0)
Product Information:
Version: 2.0.0
Commit SHA-1 hash: cdcd1928c9
Runtime Environment:
OS Name: Windows
OS Version: 6.3.9600
OS Platform: Windows
RID: win81-x64
Base Path: C:\Program Files\dotnet\sdk\2.0.0\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (9 by maintainers)
Yes, I removed .sln file and re-deploy. It’s working good. Thanks.
One more thing I notice that my slug size full. As you know my project size only 1.75MB. and I have only one master branch.
Many time I deploy that’s why? Even I try heroku-repo and execute below command.
Yes. Sure.
Thanks for your great support.
I don’t want to node so I removed
<Target Name="PrePublishTarget" BeforeTargets="PrepareForPublish">and it’s working fine.Yes,
npm run buildexpectsIf you doesn’t need node.js support, just remove
Targethttps://github.com/jincod/AspNet5DemoApp/blob/ac25ccd96bae65703aac9d459d66c50fd5eccb30/src/AspNetCoreDemoApp/AspNetCoreDemoApp.csproj#L25 and node.js buildpack from herokuIt appears that this only happens when not using a solution file. If one sets up a solution file and adds the web api project to the solution, then heroku will deploy it successfully