-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix packasktool cannot run #3212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| </ItemGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <UseAppHost Condition=" '$(SelfContained)' != 'true' and '$(PackAsTool)' == 'true' ">false</UseAppHost> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is tricky. I don't have a good solution:
This line need to be inside a target. Since PackAsTool is set in csproj.
And it need to be before Microsoft.NET.Sdk.targets (basically command target), so "RunCommand" property can use the correct value.
I try to keep PackAsTool logic in one place. But I cannot in this case. So far that's where I think is the best
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the second best place to put this would be where we decide the AppHost default:
sdk/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets
Line 106 in f97c9e7
| <UseAppHost Condition="'$(UseAppHost)' == '' and |
In the same way that ideally these targets wouldn't know about PackAsTool, you can almost argue that PackAsTool shouldn't need to know about above. We either keep PackAsTool with PackAsTool or UseAppHost with UseAppHost. And only the latter actually works. ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd second that. I think we can work this logic into the place we default UseAppHost.
It needs to be inside a target. Since PackAsTool is set in csproj. And it need to be before Microsoft.NET.Sdk.targets (basically command target), so "RunCommand" property can use the correct value.
|
Edited according to the discussion. this is good to review now |
…build 20191017.5 (dotnet#3212) - Microsoft.NET.Sdk.Razor - 3.0.1
No description provided.