Closed MatthewSteeples closed 9 months ago
Related Developer Community Feedback
@MatthewSteeples what property are you setting in your csproj exactly? Is it ReadyToRun
or PublishReadyToRun
? The issue when using the command line param is it is a global property which propagates to the inner build. This PR included changes to suppress these known problematic global props from the inner build. Wondering if this is already solved or if a new prop will need to be added.
@jviau Thanks for the reply. At this point my repro only sets it via the command line. Did you mean to link to a PR?
The reason that I've raised this is because the first two things that I tried both resulted in failed builds:
My concern with using option 3 is that while my projects are compiled as ReadyToRun, this extensions project is (presumably) not compiled with that setting. I don't know whether that's an issue or not though (as I'm not sure what this project does).
@MatthewSteeples yeah I understand the 3 scenarios: 1 & 2 are 'global properties' which propagate to the inner build. The functions SDK needs to suppress these from propagating. I just want to know the exact property you are setting in your csproj to verify what I need to suppress.
The property as it appears in the csproj file is PublishReadyToRun
@MatthewSteeples great thank you. This is addressed by #1946 and will be in the next SDK release (aiming for Monday 1/19).
Specifically, PublishReadyToRun
is part of _FunctionsExtensionRemoveProps
, which are the props we will suppress on the inner build. Passing this in via env var or cmdline will no longer propagate and fail that build.
Please see https://github.com/MatthewSteeples/ReadyToRun8/actions/runs/7508999929/job/20445457605 for repro
From what I can work out, the SDK generates a csproj file to do something with the Extensions that are referenced. This csproj (generated in
ExtensionsCsprojGenerator
) is a NET6 project. If you set ReadyToRun as a command line parameter it's not able to build this project, presumably because everything else that it's building is NET8.There's a workaround to set the ReadyToRun as part of the csproj rather than pass it in as command line, but I don't know what consequences that has (because it means that whatever the Extensions csproj output is used for won't have R2R enabled on it).