versioning

XmlSerializer: How to Deserialize an enum value that no longer exists

雨燕双飞 提交于 2019-11-29 13:36:57
I am using the XMLSerializer to save this class to a file. The class has a string and an enum as shown below: public class IOPoint { string Name {get; set;} TypeEnum {get; set;} } public enum TypeEnum { Temperature, Pressure, Humidity, } When serialized it looks like this. <IOPoint> <Name>Relative Humidity</Name> <TypeEnum>Humidity</TypeEnum> </IOPoint> I've been serializing and deserializing this object with no problems for several versions. I no longer want to support Humidity, so I removed it from the enum. However, this causes an exception when deserializing from XML because the value in

Will .Net 4.0 include a new CLR or keep with version 2.0

烈酒焚心 提交于 2019-11-29 13:12:16
Will .Net 4.0 use a new version of the CLR (v2.1, 3.0) or will it stick with the existing v2.0? Supplementary: Is it possibly going to keep with CLR v2.0 and add DLR v1.0? Update: Whilst this might look like a speculative question which cannot be answered, the VS team appear to be releasing more and more info on VS10 and .Net 4.0 so this may very soon not be the case. (Info available here -> http://msdn.microsoft.com/en-us/vstudio/products/cc948977.aspx ) 4.0 is going to be another side by side release from what I have read. http://blogs.msdn.com/wenlong/archive/2008/09/07/net-4-0-wf-wcf-and

Subversion as version-incrementor at each commit?

送分小仙女□ 提交于 2019-11-29 11:59:54
I'd like to update the (highest) revision number to a file inside a subversion repository after each commit. I thought of a svn version keyword, but doesn't this only get updated if the specific file was changed? i.e. I have a file version.php where i have the version/revision numbers, but only update anotherfile.php in my commit - this won't change the version/revision information version.php has. Is a commit hook my only option? If yes, any examples? Sounds like you want some kind of $GlobalRev$ to get the global revision number into your files. The appropriate tool you may want to look at

target_include_directories prior to 2.8.12?

感情迁移 提交于 2019-11-29 11:39:35
Our CMakeList.txt had a target_include_directories creep in. It broke our downlevel clients, like Ubuntu LTS, CentOS and Solaris. I know I can guard it with the following (thanks ZW ), but I need something for Cmake versions 2.8.11 and earlier (the ??? ). cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR) ... if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) target_include_directories(...) else() ??? endif() Our directory structure is rather simple. There's one directory with header files in them, and the same directory has the source files in them. This is by design so users don't have troubles under

How can I confirm what version of Jasmine I'm using?

会有一股神秘感。 提交于 2019-11-29 11:07:09
问题 If I recall there is a command in Jasmine that will log the exact version of Jasmine I'm running to the console, but I can't remember what it is. I am positive I have seen this before somewhere, and now that I actually need it I can't find it anywhere. Does anyone know what it is? Edit: The posted solution of using jasmine.getEnv().versionString() isn't working - to any mods reading this, would fixing that issue be better to start as a new question, or continue here? 回答1: To simply log the

Getting runtime version of a Silverlight assembly

本小妞迷上赌 提交于 2019-11-29 10:53:42
问题 I want to show my Silverlight 3 application's version number in the about box, but when I use a traditional .Net call like: Assembly.GetExecutingAssembly().GetName().Version; I get a MethodAccessException on the GetName() call. How am I supposed to get the version number of my assembly? 回答1: private static Version ParseVersionNumber(Assembly assembly) { AssemblyName assemblyName = new AssemblyName(assembly.FullName); return assemblyName.Version; } or this: Assembly assembly = Assembly

Do Android version code constants work with older versions?

点点圈 提交于 2019-11-29 10:19:41
Can I use Android version code constants with older Android runtimes? For instance, if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) ... would this run without crash on old devices running Android operating system before HONEYCOMB when this constant has been first defined? Assuming we compile it with recent enough SDK? Yes, this will work. The reason for this is that android.os.Build.VERSION_CODES.HONEYCOMB is an int . android.os.Build.VERSION_CODES.HONEYCOMB is just an alias (the int equals 11 ) for 11 , as can be seen in an IDE such as Eclipse: int android.os

Best practice for protobuf-net, versioning and surrogate types

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 09:58:12
问题 I'm trying to determine how to address this use case using protobuf-net (Marc Gravell's implementation). We have class A, which is considered version 1 An instance of class A has been serialized to disk We now have class B, which is considered version 2 of class A (there were so many things wrong with class A, we had to create class B for the next version). Class A still exists in code, but only for legacy purposes. I want to deserialize the version:1 data (stored to disk) as a class B

How can I get MSBuild to increment the ClickOnce publish revision version number on a build server?

夙愿已清 提交于 2019-11-29 09:24:31
问题 We have an NAnt script that checks out from CVS and then runs MSBuild to publish the application. The problem is we have to remember to always increment the version in Visual Studio. We have the option to auto increment this on publish, but this gets wiped on the next checkout and I would rather not have to get the build script to check in the project file. Is there a simple way to do this? 回答1: Updating the MinimumRequiredVersion Automatically Introduction to Project Editor In Solution

How to handle application upgrades from free to paid version while preserving any data

坚强是说给别人听的谎言 提交于 2019-11-29 08:21:26
Here is the context. I want to have a free version and a premium version of the same application. When people buy the application, I want them to be able to "upgrade" without losing their data, i.e. the premium version should install over the free version. I want to use the same code base and just switch a setting to build the premium version. Andoid Market does not let me convert a free app to a paid app, so the trivial option is not available. I am curious if someone has tried this successfully. How does Android Market identify an application - will it think that the premium version is a