Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

3
Possible to publish C# WPF Application into single file?
Post Body

Alright I'll be brief, I'm having a rough time of this. I've created an app that needs testing and was going to distribute it to a few close friends. I'm trying to package a Self-Contained Single File app for ease of access, but every time I select those settings when I publish, the app will crash immediately upon startup.

It works fine when I execute it in Visual Studio, both in Debug and Release mode. I'm using .NET8.0 as my target framework and Winx64 system.

I've tried just about every permutation of these settings in my .csproj file:
<PropertyGroup>

`<PublishSingleFile>true</PublishSingleFile>`

`<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>`

`<SelfContained>true</SelfContained>`

`<PublishTrimmed>false</PublishTrimmed>`

</PropertyGroup>

but nothing works. The app will work if I set it to Self-Contained but not to Single File, however it also includes just about every single .dll file known to man (295 items) and it's driving me insane. I'm using three packages:
- SignalR

- SignalR.Client

- Newtonsoft.Json

I'm using the latest version of Microsoft Visual Studio and have no idea where to go from here. Also I'm frustrated. I'd appreciate any help.

Author
Account Strength
100%
Account Age
5 years
Verified Email
Yes
Verified Flair
No
Total Karma
38,595
Link Karma
13,966
Comment Karma
21,731
Profile updated: 3 days ago
Posts updated: 1 week ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 weeks ago