tfsbuildextensions / BuildManager

Community TFS Build Manager
54 stars 27 forks source link

Once build definitions are exported and then imported back, the imported build defintions show errors #7

Closed hamidshahid closed 9 years ago

hamidshahid commented 9 years ago

The reason for this is that parameter with integer and enumeration values (such as Build Reason, Logging Verbosity) are not imported back with correct type.

hamidshahid commented 9 years ago

The issue is caused due to the fact that JsonConvert converts all numeric types to Int64 by default. This causes the issue that enumerations cannot be mapped to their respective values. See this post

http://stackoverflow.com/questions/8297541/how-do-i-change-the-default-type-for-numeric-deserialization

The best solution is to write a converter & decorate member variables with it. However, not sure if this can be done for built-in types.