WPF OneClick application build successful, but Publish fails in Visual Studio 2022

I’ve been maintaining a desktop WPF application that uses OneClick for several years. I’m currently using Visual Studio 2022.

Recently, I’ve updated the application so that it uses .NET 8 and EF Core. The application builds and runs in Visual Studio without obvious issues.

When I try to “Publish” the OneClick application, the build succeeds, but the Publish fails —

8>CompilerServer: server - server processed compilation - 1b3eb992-ddfe-4b23-a907-e19f9bb6532a
Build: 7 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Build completed at 3:13 PM and took 51.644 seconds ==========
Publish: 0 succeeded, 1 failed, 0 skipped ==========
Publish completed at 3:13 PM and took 51.644 seconds ==========
Visual Studio accelerated 1 project(s), copying 12 file(s). See https://aka.ms/vs-build-acceleration.

I don’t see any other warning in the output window other than some StyleCop complaints, but I get a “Publish Failed” error each time.

I’ve noticed that I get a URI error that shows up in the Event Log each time –

The following information was included with the event:

(devenv.exe, PID 15072, Thread 1) IdleProcessorManager.DoWork - Job threw:
Invalid URI: The format of the URI could not be determined. at
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
   at Microsoft.VisualStudio.TestTools.TestCaseManagement.SolutionIntegrationManager.IsRunConfig(String filename)
   at Microsoft.VisualStudio.TestTools.TestCaseManagement.SolutionIntegrationManager.<AddSolutionFilesRunConfigsToTmi>d__351.MoveNext()
   at Microsoft.VisualStudio.TestTools.TestCaseManagement.IdleProcessorManager.DoWork()

The message resource is present but the message was not found in the message table

The path that I’m publishing to looks like this SERVERFile ServerAppName. That’s been the same path that I’ve used for years.

The resulting “log” file looks like this:

System.AggregateException: One or more errors occurred. ---> Microsoft.WebTools.Shared.Exceptions.WebToolsException: Publish has encountered an error. We were unable to determine the cause of the error. Check the output log for more details. 
   --- End of inner exception stack trace ---
---> (Inner Exception #0) Microsoft.WebTools.Shared.Exceptions.WebToolsException: Publish has encountered an error. We were unable to determine the cause of the error. Check the output log for more details. <---

Microsoft.WebTools.Shared.Exceptions.WebToolsException: Publish has encountered an error. We were unable to determine the cause of the error. Check the output log for more details. 

Huh? Does anyone know why this might be happening? Or how I can determine what the offending URI is?

I’ve tried resolving the warnings that I was seeing in the build output and I’ve resolved all but StyleCop warnings. This doesn’t seem to help.

I’ve tried placing a breakpoint in the System.URI class while building in DEBUG mode, but the code that does work of building and publishing doesn’t break on the breakpoint.

Increasing the verbosity and redirecting the output of the ClickOnce logs, as recommended at https://learn.microsoft.com/en-us/visualstudio/deployment/how-to-set-a-custom-log-file-location-for-clickonce-deployment-errors?view=vs-2022 and https://learn.microsoft.com/en-us/visualstudio/deployment/how-to-specify-verbose-log-files-for-clickonce-deployments?view=vs-2022 , but I don’t actually get any log files at the directory I specify.

New contributor

user24819679 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật