dotnet / dotnet/wpf

ClickOnce Publish Fails in .NET 5.0 for WPF Application

Open
#3,898 5 comments 1 reaction 0 assignees View on GitHub
Bug
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

* .NET Core Version:

```
.NET SDK (reflecting any global.json):
Version: 5.0.100
Commit: 5044b93829

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19042
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.100\

Host (useful for support):
Version: 5.0.0
Commit: cf258a14b7

.NET SDKs installed:
5.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
```

* Windows version: 10 Version 20H2 (OS Build 19042.630)
* Does the bug reproduce also in WPF for .NET Framework 4.8?: No
* Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? No

**Problem description:** Publishing Self Contained Single File WPF Application in .NET 5.0 fails after adding references/nuget packages.

**Actual behavior:**

![image](https://user-images.githubusercontent.com/53846872/101777262-54b79900-3b46-11eb-9a84-ddb508480e50.png)

Output Window Text:
[OutputWindowText.txt](https://github.com/dotnet/wpf/files/5673002/OutputWindowText.txt)

Log File From Error Window:
[tmp6214.tmp.txt](https://github.com/dotnet/wpf/files/5673015/tmp6214.tmp.txt)

**Expected behavior:** Publish Succeeded

**Minimal repro:**

1. Create New WPF App (.NET) From VS Menu
2. Open Project Properties
3. Target Framework -> .NET 5.0
4. Install NuGet Package System.Drawing.Common -> 5.0.0 (Issue happens with many other packages/assemblies/project references as well)
5. Publish -> Folder -> ClickOnce -> Self Contained -> Win-x64 ->Produce Single File
6. Publish Failed

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.