Store metadata "AppType" is not valid


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


5. Remove the following registry value:


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:

  - 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
intResult = Convert.ToInt16(strInput)
Catch ex As Exception
MessageBox.Show("Error: " & ex.Message)


Please check the Working fix