Store metadata "AppType" is not valid

Workaround
==========

If you have "APPTYPE" In the Registry Key it would Give Error

If you remove that value from Registry location the issue would be fixed

HKCU\Software\Classes\Software\Microsoft\Windows\CurrentVersion\Deployment\SideBySide\2.0\PacakgeMetadata\{2ec93463-b0c3-45e1-8364-327e96aea856}_{3f471841-eef2-47d6-89c0-d028f03a4ad5}\imat..tion_3e64e3b4b5cafdd9_e70ba27c30f97a67\

5. Remove the following registry value:

{2ad613da-6fdb-4671-af9e-18ab2e4df4d8}!AppType

Issue Detail
==============

DFSVC.exe (ClickOnce service) makes a call into System.Deployment.Application.ComponentStore.GetPropertyAppType

appTypeStr in this case is "0" which is a valid string for the number 0.  However, we're getting the following exception:

  System.FormatException
  - Input string was not in a correct format.
  - Source: mscorlib
  - Stack trace:
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseUInt32(String value, NumberStyles options, NumberFormatInfo numfmt)
   at System.UInt16.Parse(String s, NumberStyles style, NumberFormatInfo info)
   at System.Deployment.Application.ComponentStore.GetPropertyAppType(DefinitionAppId appId, String propName)

To figure out it in a better way run this Code on Machine

=============================================

Dim strInput As String = "10"
Dim intResult As Integer = 0
Try
intResult = Convert.ToInt16(strInput)
Catch ex As Exception
MessageBox.Show("Error: " & ex.Message)

===============================================

Please check the Working fix

Comments