You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
-a sets app to framework-dependent when SelfContained is true #34026
# copy csproj and restore as distinct layersCOPY *.csproj .
RUN dotnet restore -a $TARGETARCH
# copy and publish app and librariesCOPY . .
RUN dotnet publish -a $TARGETARCH -o /app
This fails.
5.453 /root/.nuget/packages/microsoft.net.illink.tasks/8.0.0-preview.6.23329.7/build/Microsoft.NET.ILLink.targets(193,5): error NETSDK1102: Optimizing assemblies for size is not supported for the selected publish configuration. Please ensure that you are publishing a self-contained app. [/source/releases.csproj]
Works if I do:
RUN dotnet publish -a $TARGETARCH -o /app --self-contained
We should fix -a to be less strong. It should not override SelfContained or PublishSelfContained if set.
Interesting, yeah it looks like the RID Short-Hand Resolution is called by the Architecture Flag, and if you haven't specified SelfContained then it will inject this:
properties = properties.Append("-property:SelfContained=false").ToArray(); , and since it's injected as a global property it would override your selfcontained or publishselfcontained value.
Not great, good catch! We should fix this. Marking as 'team triage' to discuss timeline.
No, we haven't done it yet. I'll bring it up at standup today and we'll get it prioritized. Noah's been doing a lot of work on the VSCode extension to support DevKit, and this got lost in the shuffle.
This has been solved by @MiYanni for RC-2. Sorry for forgetting this one, it got put down a continuously growing list for CDK 😄 Thanks again @MiYanni for taking this one up, a document has also been made which @baronfel attached.
Activity
nagilson commentedon Jul 14, 2023
Interesting, yeah it looks like the RID Short-Hand Resolution is called by the Architecture Flag, and if you haven't specified SelfContained then it will inject this:
properties = properties.Append("-property:SelfContained=false").ToArray();, and since it's injected as a global property it would override your selfcontained or publishselfcontained value.Not great, good catch! We should fix this. Marking as 'team triage' to discuss timeline.
richlander commentedon Jul 14, 2023
-property:SelfContained=false")... That shouldn't be needed anymore, right?nagilson commentedon Jul 14, 2023
Ya, that really shouldn't be there anymore. It is definitely going to break people when we fix it (yay) but it should be fixed.
nagilson commentedon Jul 18, 2023
Fix is targeted for rc1 as its too late to fix this for the last preview now
richlander commentedon Aug 4, 2023
What is the PR for this change @nagilson?
mthalman commentedon Sep 8, 2023
@nagilson - Is this fixed in RC1 yet?
baronfel commentedon Sep 8, 2023
No, we haven't done it yet. I'll bring it up at standup today and we'll get it prioritized. Noah's been doing a lot of work on the VSCode extension to support DevKit, and this got lost in the shuffle.
nagilson commentedon Sep 12, 2023
This has been solved by @MiYanni for RC-2. Sorry for forgetting this one, it got put down a continuously growing list for CDK 😄 Thanks again @MiYanni for taking this one up, a document has also been made which @baronfel attached.