versioning

Setting the version number for .NET Core projects - CSPROJ - not JSON projects

余生长醉 提交于 2019-11-26 19:05:50
问题 This question is very similar to Setting the version number for .NET Core projects, but not the same. Using the latest stable version of .NET Core at the time of writing (1.1) and VS2017, .NET Core has switched from JSON based project files to CSPROJ files. So - what I am trying to do is set up a CI environment where I would like to be able to modify something prior to a build to stamp my builds with the correct version number. If I use the attributes like this the old (SharedAssemblyInfo.cs

Versioning Database Persisted Objects, How would you?

岁酱吖の 提交于 2019-11-26 18:58:16
问题 (Not related to versioning the database schema) Applications that interfaces with databases often have domain objects that are composed with data from many tables. Suppose the application were to support versioning, in the sense of CVS, for these domain objects. For some arbitry domain object, how would you design a database schema to handle this requirement? Any experience to share? 回答1: Think carefully about the requirements for revisions. Once your code-base has pervasive history tracking

REST api versioning (only version the representation, not the resource itself)

泄露秘密 提交于 2019-11-26 18:48:08
问题 I had a look at Best practices for API versioning?, but am not quite convinced of the answer, so I am question the versioning part again with a more specific example. I am having two URIs (one with versioning as part of the URI and one without): http://xxxx/v1/user/123 -> favored solution in discussed thread http://xxxx/user/123 I am having my doubts whether the first link expresses the idea of REST. I find http://xxxx/v1/user/123 confusing as it suggests that there will be a higher api

How can I auto increment the C# assembly version via our CI platform (Hudson)?

你离开我真会死。 提交于 2019-11-26 18:44:19
问题 Myself and my group are horrendous at incrementing assembly version numbers and we frequently ship assemblies with 1.0.0.0 versions. Obviously, this causes a lot of headaches. We're getting a lot better with our practices via our CI platform and I'd really like to set it up to auto increment the values within the assemblyinfo.cs file so that the versions of our assemblies are auto updated with the code changes in that assembly. I had previously setup (before we found Hudson) a way to

API Versioning for Rails Routes

﹥>﹥吖頭↗ 提交于 2019-11-26 18:42:35
问题 I'm trying to version my API like Stripe has. Below is given the latest API version is 2. /api/users returns a 301 to /api/v2/users /api/v1/users returns a 200 of users index at version 1 /api/v3/users returns a 301 to /api/v2/users /api/asdf/users returns a 301 to /api/v2/users So that basically anything that doesn't specify the version links to the latest unless the specified version exists then redirect to it. This is what I have so far: scope 'api', :format => :json do scope 'v:api

Compare version numbers without using split function

…衆ロ難τιáo~ 提交于 2019-11-26 18:42:32
How do I compare version numbers? For instance: x = 1.23.56.1487.5 y = 1.24.55.487.2 Can you use the Version class? http://msdn.microsoft.com/en-us/library/system.version.aspx It has an IComparable interface. Be aware this won't work with a 5-part version string like you've shown (is that really your version string?). Assuming your inputs are strings, here's a working sample with the normal .NET 4-part version string: static class Program { static void Main() { string v1 = "1.23.56.1487"; string v2 = "1.24.55.487"; var version1 = new Version(v1); var version2 = new Version(v2); var result =

ASP.NET MVC security patch to version 3.0.0.1 breaks build [duplicate]

大城市里の小女人 提交于 2019-11-26 18:30:47
This question already has an answer here: Windows update caused MVC3 and MVC4 stop working 9 answers After installing the ASP.NET MVC 3 security update KB2990942 it appears the MVC version increased from 3.0.0.0 to 3.0.0.1 . This causes Visual Studio to no longer find the reference. <Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> Resharper does not show any problems but the build fails with lots of unresolved MVC types and a warning: Warning : Could not resolve this reference. Could not locate the assembly

How to mark a method as obsolete or deprecated?

落爺英雄遲暮 提交于 2019-11-26 17:59:58
How do I mark a method as obsolete or deprecated using C#? poke The shortest way is by adding the ObsoleteAttribute as an attribute to the method . Make sure to include an appropriate explanation: [Obsolete("Method1 is deprecated, please use Method2 instead.")] public void Method1() { … } You can also cause the compilation to fail, treating the usage of the method as an error instead of warning , if the method is called from somewhere in code like this: [Obsolete("Method1 is deprecated, please use Method2 instead.", true)] mark_h To mark as obsolete with a warning: [Obsolete] private static

Java versioning and terminology, 1.6 vs 6.0 OpenJDK vs Sun

…衆ロ難τιáo~ 提交于 2019-11-26 17:46:51
问题 I'm having problems understanding Java versioning. I'm seeing lots of versions like 1.4.2, 1.5 and 1.6, but I also stumble upon 5.0 and 6.0. I don't understand this versioning or the progression. I'm pretty new to Java, and I've read a bit about OpenJDK vs Sun, and I think I understand it. Are these versions the difference between OpenJDK and Sun? For example, OpenJDK's latest is 1.6 and Sun's is 6.0? All these versions are pretty confusing to someone new to Java. 回答1: The versioning is

How to have an auto incrementing version number (Visual Studio)? [duplicate]

依然范特西╮ 提交于 2019-11-26 17:26:20
问题 This question already has an answer here: Can I automatically increment the file build version when using Visual Studio? 24 answers I want to store a set of integers that get auto incremented at build time: int MajorVersion = 0; int MinorVersion = 1; int Revision = 92; When I compile, it would auto-increment Revision . When I build the setup project, it would increment MinorVersion (I'm OK with doing this manually). MajorVersion would only be incremented manually. Then I could display a