-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
dotnet publish command fails with error NETSDK1144: Optimizing assemblies for size failed #92064
Comments
Any chance to try to run it with .NET8 RC1 candidate? |
Hey, I encountered same problem in my project for .net8 (wasn't there for .net7 though). I described it here: |
hey @awasilik |
@marek-safar i'll try when configure my environment for it |
actually @marek-safar i've tried with net8 and the issue persists |
Do you see same stack trace in your msbuild log as in #91880 or is it different? |
it is different it shows about 3000 lines of same traces
|
@vitek-karas is this the stack trace enough for you to see what is wrong? |
Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas Issue DetailsI'm running the following command to build maui ios project
It fails with
I'm not able to provide a detailed log because the project is under NDA, but can give any other details regarding the libraries usage, etc.
|
I can reproduce this with a testcase like the following: class RecursivePropertyDataFlow
{
class AttributePropertyRequiresPropertiesAttribute : Attribute
{
[AttributePropertyRequiresProperties (RequiresPublicProperties = typeof (AttributePropertyRequiresPropertiesAttribute))]
[DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicProperties)]
public Type RequiresPublicProperties { get; set; }
}
[AttributePropertyRequiresProperties (RequiresPublicProperties = typeof (int))]
public static void Test ()
{
}
} |
I'm running the following command to build maui ios project
dotnet publish .ProjectName.csproj -c Staging -f net7.0-ios -p:ApplicationDisplayVersion=3.0.0 -p:ApplicationVersion=3.0.0.123 -p:ArchiveOnBuild=true -p:RuntimeIdentifier=ios-arm64 -p:CodesignKey="Apple Distribution: <title is here>" -p:MtouchLink=SdkOnly
It fails with
/usr/local/share/dotnet/sdk/7.0.306/Sdks/Microsoft.NET.ILLink.Tasks/build/Microsoft.NET.ILLink.targets(86,5): error NETSDK1144: Optimizing assemblies for size failed. Optimization can be disabled by setting the PublishTrimmed property to false
I'm not able to provide a detailed log because the project is under NDA, but can give any other details regarding the libraries usage, etc.
The text was updated successfully, but these errors were encountered: