ClickOnce install broken when upgrading to Visual Studio 17.8.1

Sean Malloy 16 Reputation points
2023-11-22T17:32:13.3066667+00:00

Description:

After using the Upgrade tool to convert all my projects from .Net7 to .Net8, Clickonce seems to be building my .exe into both the app.publish and the app.dll, which I think is breaking the installer. It seems that nothing I try can stop the Publish build from creating both of these. I can confirm that deploying from a previous version (17.7.x) works. I can see in anything I try that two app.exe files are being created (1 in the app.dll, 1 in app.publish) and assume that this is what's causing the issue.


Error:

When trying to run setup or install an update from an existing app -> "cannot continue. application improperly formatted"


Attempts to Remedy (I recognize that some of these don't make sense to even try):

-Tried to generated manifest from both Mage and using the app.manifest template

-Putting original manifest in and adjusting to 8.0

-Cleaning and rebuilding

-Restarting Visual Studio

-Rollback -> I was 2 versions ahead, so I can't roll back to the Visual Studio version that works

-Remaking the Publish Profile

-Manually excluding my app.exe in the publish configuration Application Files

-Manually excluding my app.exe in the build configuration

-Changing Target Runtime

-Adding Satellite Resource Language of "en" to the project file (I noticed it was building all languages in the new version)

-Remove the removal of the app.manifest in my project file

-Deleting all Resx files

-Setting app.manifest to copy always

-Removing other runtime builds

-Manually Deleting the second app.exe after build

-Changing target OS to Windows 10

-Deleting WebView2 DLL (saw this on another post)

  • Same attempts in the 17.9.0 Preview

More Info:

My project file and app.manifest now have almost 0 difference between old and new (outside of the target framework)

-I don't sign the manifest

-Configuration: Release|Any CPU (i've tried strictly x86)

-Target Framework:.net8-windows

-Target Runtime: Portable

-Publish and install location are the same Shared Drive location

-Available Offline

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,872 questions
{count} votes