ClickOnce won't run

Gegg-8342 1 Reputation point
2024-07-19T08:23:57.7066667+00:00

I am trying to publish a Windows desktop application via ClickOnce (something I have done in VS2017 and 2019 many times). The publish step completes and the package is built without issue but when I try and run the setup.exe it fails and the log states:

System.InvalidOperationException

	**- The 'EndValidation' method cannot not be called when all the elements have not been validated. 'ValidateEndElement' calls corresponding to 'ValidateElement' calls might be missing.** 
```If I open the the manifest in VS2022 the following error is reported: 

**The schema referenced from this location in your document contains errors.**

and

**Could not find file '[Full Path]\assembly.adaptive.xsd'**

and the line at the top of the page is highlighted

**<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd"** 

I can't find much about this and would really appreciate some guidance?

Thanks

Geoff

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,905 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Gegg-8342 1 Reputation point
    2024-07-22T08:00:57.1533333+00:00

    Thanks for your question but I have just this minute found and fixed the issue.

    I'm not sure how this happened but for anyone else who has this issue. I was able to publish my application and run the subsequent install after I made the following changes.

    1. Make sure that you have "Embed manifest with default settings" selection in the application properties page. (I don't need a custom manifest so this is fine for me).
    2. In VS, solution explorer look for and delete the app.manifest file.

    I must have inadvertently changed this setting at some point which caused the app.manifest file to be created. I'm not sure why this causes a problem with click once but removing it seems to resolve the issue.

    I hope this helps someone else.

    Geoff

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.