Deploy ClickOnce Dynamics NAV2018

Hi Friends,

NAV2018 CU06
SDK-V8.1A
NETFX 4.5.1
Windows Server 2012R2
I got an error message as below when try install client from ClickOnce:
"System.Deployment.Application.DeploymentException (ManifestSemanticValidation)
- The customHostSpecified attribute is not supported for Windows Forms applications."


After troubleshooting i found below 2 problems,

1, I found that the entryPoint in "Microsoft.Dynamics.Nav.Client.exe.manifest" file not the same as old version
<entryPoint>
<co.v1:customHostSpecified />
</entryPoint>

2, Dependency does not include all elements

below kindly find the content of Microsoft.Dynamics.Nav.Client.exe.manifest" file. kindly help if you have any tips. many thanks.


<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#&quot; xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
<asmv1:assemblyIdentity name="Microsoft.Dynamics.Nav.ClickOnceClient" version="11.0.0.0" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
<description asmv2:iconFile="Icon.ico" xmlns="urn:schemas-microsoft-com:asm.v1" />
<application />
<entryPoint>
<co.v1:customHostSpecified />
</entryPoint>
<trustInfo>
<security>
<applicationRequestMinimum>
<PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" />
</applicationRequestMinimum>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentOS>
<osVersionInfo>
<os majorVersion="6" minorVersion="0" buildNumber="0" servicePackMajor="0" />
</osVersionInfo>
</dependentOS>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="4.0.30319.0" />
</dependentAssembly>
</dependency>
</asmv1:assembly>

Answers

  • Wisa123Wisa123 Posts: 283Member
    edited 2020-01-08
    Hi,

    The entry point is definitely wrong. This should look something like
      <entryPoint>
        <assemblyIdentity name="Microsoft.Dynamics.Nav.Client" version="11.0.0.0" publicKeyToken="31BF3856AD364E35" language="neutral" processorArchitecture="msil" />
        <commandLine file="Microsoft.Dynamics.Nav.Client.exe" parameters="" />
      </entryPoint>
    

    The entry point node should already be pre-filled in the manifest from the Installation Files (ClickOnce Installer Tools/TemplateFiles....). The rest of what you posted seems alright, but there need to be a LOT more dependencies (all assemblies that need to be delivered to the client). If your manifest doesn't have at least ~800 lines you can already assume that somethings fishy.

    I haven't done the ClickOnce stuff by hand (using mage.exe and so on) by a while since we automated that, but I'd suggest starting over and comparing manifests after the manifest creation step.

    Edit: Check that your mage.exe version is 4.0.30319.17929 (not sure which sdk version this is from) but I remember having lots of problems with some versions of mage.exe just not working.

    /Wisa
    Austrian NAV/BC Dev
  • josephxiao2011josephxiao2011 Posts: 3Member

    thanks @Wisa123, after checking that i found the version of Mage.exe does not correct, and last i used version 4.0.30319, and tried everything again, the problem was fixed.

    Just for other friends information, if you are using IIS instead of share folder, you have to pay more attention that first you need to have a web.config file to allow website to read "ClientUserSettings.config", then you have to remove files like "Microsoft.Dynamics.Nav.ExcelAddin.vsto", files ended with ".psm1". else you will get some error message or warning messages.
Sign In or Register to comment.