aspnetcore: ClickOnce fails for BlazorWinFormsApp and BlazorWpfApp

Describe the bug

BlazorWinFormsApp and BlazorWpfApp have <Project Sdk="Microsoft.NET.Sdk.Razor"> and <TargetFramework>net6.0-windows</TargetFramework>

ClickOnce expects either <Project Sdk="Microsoft.NET.Sdk.Razor"> and <TargetFramework>net6.0</TargetFramework> or <Project Sdk="Microsoft.NET.Sdk"> and <TargetFramework>net6.0-windows</TargetFramework>

To Reproduce

Using .NET 6 Preview 3 and VS 16.10.0 Preview 2

Exceptions (if any)

The item “C:\Users.…\source\repos.…\obj\Release\net6.0-windows\apphost.exe” in item list “ContentWithTargetPath” does not define a value for metadata “TargetPath”. In order to use this metadata, either qualify it by specifying %(ContentWithTargetPath.TargetPath), or ensure that all items in this list define a value for this metadata.

Further technical details

  • ASP.NET Core version: 16.10.341.63941
  • The IDE (VS / VS Code/ VS4Mac) you’re running on, and its version: Visual Studio 2019, Version 16.10.0 Preview 2.0
  • Include the output of dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.100-preview.3.21202.5
 Commit:    aee38a6dd4

Runtime Environment:
 OS Name:     Windows
 OS Version:  6.3.9600
 OS Platform: Windows
 RID:         win81-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.100-preview.3.21202.5\

Host (useful for support):
  Version: 6.0.0-preview.3.21201.4
  Commit:  236cb21e3c

.NET SDKs installed:
  3.1.406 [C:\Program Files\dotnet\sdk]
  5.0.202 [C:\Program Files\dotnet\sdk]
  5.0.300-preview.21180.15 [C:\Program Files\dotnet\sdk]
  6.0.100-preview.3.21202.5 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNe
tCore.App]
  Microsoft.AspNetCore.App 3.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspN
etCore.App]
  Microsoft.AspNetCore.App 3.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspN
etCore.App]
  Microsoft.AspNetCore.App 3.1.14 [C:\Program Files\dotnet\shared\Microsoft.AspN
etCore.App]
  Microsoft.AspNetCore.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.AspNe
tCore.App]
  Microsoft.AspNetCore.App 5.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNe
tCore.App]
  Microsoft.AspNetCore.App 6.0.0-preview.3.21201.13 [C:\Program Files\dotnet\sha
red\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.
App]
  Microsoft.NETCore.App 3.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore
.App]
  Microsoft.NETCore.App 3.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore
.App]
  Microsoft.NETCore.App 3.1.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore
.App]
  Microsoft.NETCore.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.
App]
  Microsoft.NETCore.App 5.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.
App]
  Microsoft.NETCore.App 6.0.0-preview.3.21201.4 [C:\Program Files\dotnet\shared\
Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.12 [C:\Program Files\dotnet\shared\Microsoft.
WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.13 [C:\Program Files\dotnet\shared\Microsoft.
WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.14 [C:\Program Files\dotnet\shared\Microsoft.
WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.W
indowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.5 [C:\Program Files\dotnet\shared\Microsoft.W
indowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.0-preview.3.21201.3 [C:\Program Files\dotnet\
shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (12 by maintainers)

Commits related to this issue

Most upvoted comments

@John-Hart these are new scenarios for hosting Blazor in a desktop app in .NET-6. ClickOnce support is a reasonable thing to expect.

@TheCakeMonster, appreciate the offer. We need some time to look into this. Right now I don’t know what changes are required to support these projects.

@John-Hart Thanks for the feedback; it’s very useful to understand the issue and get a feeling for the issue.

Do you think the solution something that a community developer might have a reasonable chance of delivering? I’m a pro developer, but MSBuild is not something I feel is a particular strength - .props and .targets are something I am aware of, but are still a bit of a mystery.

I’d appreciate your input on whether this is something I can offer to deliver to the community, as it’s something I wanted to use. If you think there’s a reasonable chance that I can do the work, then let me know if there is someone who can give me some pointers.

@Pilchie thanks, we can look into adding it but right now it’s not supported