Trim unused assemblies not working for self contained app and published self contained App still asking for framework

 

Hi!

I've developed a small console application with Rider which i wanted to be self contained and a single file.

This is my publish configuraton for the said application:

Hower as soon as I hit publish, the following error occurs:

NETSDK1102: Optimizing assemblies for size is not supported for the selected publish configuration. Please ensure that you are publishing a self-contained app

Also, if I disabled the trim unused assemblies option, the deployment works and gives me a single file, as expected.

And as far as I know, the self contained app should also include the framework, but once i start my console app, i get the following message:

 

Would be great if anyone could tell me, whats wrong here.

 

Thanks!

0
2 comments

Thanks for your comment. Unfortunately, it looks like you have faced a known issue: 

RIDER-102217 .NET 8 project is always published as Framework-Dependent. 

The fix will be release in 2023.3.2, you can click `Watch` to monitor the status.

Please consider using dotnet CLI to publish the project to work around the issue. 

 

0

Thanks for the info!

0

Please sign in to leave a comment.