Skip to content
This repository was archived by the owner on Nov 20, 2023. It is now read-only.

Setup default RunCommand in case MSBuild project RunCommand is undefined#608

Closed
alexfdezsauco wants to merge 1 commit into
dotnet:masterfrom
alexfdezsauco:feature/DefaultRunCommand
Closed

Setup default RunCommand in case MSBuild project RunCommand is undefined#608
alexfdezsauco wants to merge 1 commit into
dotnet:masterfrom
alexfdezsauco:feature/DefaultRunCommand

Conversation

@alexfdezsauco

@alexfdezsauco alexfdezsauco commented Jul 25, 2020

Copy link
Copy Markdown
Contributor

Sometimes a project RunCommand can't be resolved

image

Such situation causes that process launch failed.

image

@davidfowl

Copy link
Copy Markdown
Member

When?

@alexfdezsauco

alexfdezsauco commented Jul 25, 2020

Copy link
Copy Markdown
Contributor Author

When?

Good question. I have a project configuration where the project instance RunCommand property is empty, but not sure why.
I started to get the Cannot start process because the file name has not been provided error when I try to hosted it on tye. So, make that Tye could survive to such situation by trying with a default RunCommand.

@tebeco

tebeco commented Jul 25, 2020

Copy link
Copy Markdown
Contributor

I know this will sound stupid but does the project build ?
The behavior of tye when the udnerlying service is project and it fails on internal dotnet restore or dotnet build can be "strange" and ends up in an error that look like yours
because the binary could not be built, then there was no file provided to run the process

Also can you share a repro somehow ?

@alexfdezsauco

alexfdezsauco commented Jul 25, 2020

Copy link
Copy Markdown
Contributor Author

@tebeco Yes, it builds. I will try to extract the repo (but it will take longer than the time it took me to find this problem). With this default RunCommand, I'm was to continue to work and host the solution on Tye.

Well, now I noticed, that it requires a second tye run. Let me check again.

@alexfdezsauco

Copy link
Copy Markdown
Contributor Author

I will close this because it is not a definitive solution. It requires to tye run in both the RunCommand is emby but in the second one it runs.

@alexfdezsauco

alexfdezsauco commented Jul 25, 2020

Copy link
Copy Markdown
Contributor Author

@tebeco @davidfowl Well I set <TargetFramework>netcoreapp3.1</TargetFramework> instead <TargetFrameworks>netcoreapp3.1</TargetFrameworks> and RunCommand got the expected value.

So, if TargetFramework is undefined even when TargetFrameworks have values the RunCommand will be empty at least on my configuration.

@tebeco

tebeco commented Jul 25, 2020

Copy link
Copy Markdown
Contributor

Welcome the the club, see #564

Good news is that you just need to wait for this to be merged :
#567

also you can ALREADY edit you yaml by adding buildProperties:

name: app-with-targetframeworks
services:
- name: multipletargetframeworks
  project: MultipleTargetFrameworks/MultipleTargetFrameworks.csproj
  buildProperties:
  - name: TargetFramework
    value: netcoreapp3.1

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants