Deploy ClickOnce Dynamics NAV2018

josephxiao2011
Member Posts: 3
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" 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#" 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>
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" 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#" 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>
0
Answers
-
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 Dev1 -
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.1
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions