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

Conversation

alexfdezsauco
Copy link
Contributor

@alexfdezsauco alexfdezsauco commented Jul 25, 2020

Sometimes a project RunCommand can't be resolved

image

Such situation causes that process launch failed.

image

@davidfowl
Copy link
Member

When?

@alexfdezsauco
Copy link
Contributor Author

alexfdezsauco commented Jul 25, 2020

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
Copy link
Contributor

tebeco commented Jul 25, 2020

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
Copy link
Contributor Author

alexfdezsauco commented Jul 25, 2020

@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
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
Copy link
Contributor Author

alexfdezsauco commented Jul 25, 2020

@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
Copy link
Contributor

tebeco commented Jul 25, 2020

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.

None yet

3 participants