我已经构建了一个我想要部署的MSI,并经常更新.不幸的是,当您安装MSI,然后尝试安装相同MSI的较新版本时,它会失败,并显示"此产品的另一个版本已安装.此版本无法继续安装..."的消息.MSI是使用Visual Studio 2008安装项目构建的.我已经尝试将"删除以前的版本"属性设置为true和false,以便只是让新版本覆盖旧版本,但没有任何工作.在以前的公司,我知道我对Wise和Advanced Installer构建的安装程序没有这个问题.我缺少一个设置吗?或者VS 2008安装项目不支持我想要的功能吗?
到目前为止我还没有使用过SVN.为什么网站(例如Stack Overflow)会在底部显示SVN版本?它是什么版本的?在公共场合展示它有什么好处?
我试图遍历SPListItem.Versions集合以查找最新批准的列表项.
我的列表项有三个版本:前两个是批准的,最后一个是草稿.但我的代码说他们都在选秀中!请帮忙!
// Iterate through all versions
for (int index = 0; index < item.Versions.Count; index++)
{
SPListItem versionedItem = item.Versions[index].ListItem;
// Check if moderation information is set to approved
if (versionedItem.ModerationInformation.Status.Equals(SPModerationStatusType.Approved))
{
// We found an approved version!
itemFound = versionedItem;
}
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试为我的winforms应用程序添加一个功能,在主屏幕上打印版本号.我目前有这个:
txtVersion.Text = ProductVersion.ToString();
Run Code Online (Sandbox Code Playgroud)
这告诉我程序的版本 - 一切都很好.
但是,我理想的做法是选择用于创建msi的安装程序版本.有没有办法在安装的程序中询问这个问题,或者在安装过程中以某种方式传输信息?
我开始编写一些需要向前兼容和版本化的WCF数据协定.我一直在阅读这里的MSDN文章,并想知道是否有人对关于枚举的#14点进行了澄清.内容如下:
14.您不应在版本之间添加或删除枚举成员.除非使用EnumMemberAttribute属性上的Name属性将其名称保持在数据协定模型中,否则也不应重命名枚举成员.
阅读本文,我认为一旦enum发布(并由客户端使用),你无论如何都不能修改它(主要添加/删除)而不破坏兼容性?(即这将是一个突破性的变化)
有人能证实吗?
有没有一个工具可以自动进行文件版本控制(对于本地文件),比如dropbox?看看与svn相比,使用dropbox恢复旧版本是多么容易...
[编辑]
我知道svn和dropbox是如何用于非常不同的目的,并且svn提供了更多的功能,但事实是,对于我通常的编码工作我的小项目我几乎不需要那些和自动提交和更新真的很棒考虑到我浪费了多少时间,因为我在svn中搞砸了一些东西.
我已经阅读了所有可能的博客和关于这个主题的SO帖子 - 但仍然不确定发生了什么.我也读过这个但仍然没有运气 - 他们的默认迁移指南有点清楚但在我的情况下不起作用.我对iOS开发比较陌生,所以要温柔:)
情况如下:在我的应用程序(iOS)中名为Report的实体上,需要进行以下更改:
数据属性 - 已删除
title属性 - 已添加
reportId属性需要从Integer 16更改为String.这就是造成我问题的原因.我确实从当前版本创建了我的数据模型的新版本并修改了属性.
首先,这里是应用程序的一些方法:
- (NSManagedObjectModel *)managedObjectModel
{
if (__managedObjectModel != nil)
{
return __managedObjectModel;
}
NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"App" withExtension:@"momd"];
__managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];
return __managedObjectModel;
}
Run Code Online (Sandbox Code Playgroud)
然后
/**
Returns the persistent store coordinator for the application.
If the coordinator doesn't already exist, it is created and the application's store added to it.
*/
- (NSPersistentStoreCoordinator *)persistentStoreCoordinator
{
if (__persistentStoreCoordinator …Run Code Online (Sandbox Code Playgroud) 我正在使用带有mongodb的spring数据来存储二进制数据,例如图像等.我想维护一个版本字段以附加到url,以便从缓存图像中欺骗浏览器.
请参阅下面的文档基类:
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Version;
import org.springframework.data.mongodb.core.index.Indexed;
public abstract class BaseDocument {
@Id
@Indexed(unique=true)
protected long id;
protected byte[] data;
protected String mimeType;
protected String filename;
protected String extension;
@Version
private Long version;
Run Code Online (Sandbox Code Playgroud)
我还有一个包装MongoOperations的存储库来保存我的文档.
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
@Repository
public class DocumentRepository implements IDocumentRepository {
@Autowired
private MongoOperations mongoTemplate;
@Override
public <D extends BaseDocument> void saveDocument(D document) {
mongoTemplate.save(document);
}
Run Code Online (Sandbox Code Playgroud)
为了实现版本控制,我做了一些狩猎,发现有一个@Version注释为spring mongo,但是已被弃用.然后我发现应该使用spring数据@Version注释.所以我继续使用弹簧数据@Version注释.
我期望发生的是每次保存文档时我的版本字段都会增加.我多次覆盖同一个文档,但我的版本字段并没有像我期望的那样增加.
我做错了什么或者我还需要做些什么吗?
我一直在阅读REST API版本的所有方法.在几乎所有实现中,控制器和视图都是版本化的,但模型不是.
为了给出rails示例,控制器组织为:
# app/controllers/api/v1/events_controller.rb
class Api::V1::EventsController < Api::ApiController
end
Run Code Online (Sandbox Code Playgroud)
相应的视图也放在不同版本的目录中.为什么我们没有版型号?是因为我们希望我们的模型(底层数据库模式)不随着API的发展而改变吗?当我在数据库中重命名列名并需要新模型来解释时会发生什么?
我的一个SQL表中有一个字段存储版本号,如'3.4.23'或'1.224.43'.
有没有办法为这个字段使用大于条件?
SELECT * FROM versions WHERE version_number > '2.1.27'
versioning ×10
.net ×2
backup ×1
c# ×1
core-data ×1
dropbox ×1
enums ×1
ios ×1
java ×1
migration ×1
mysql ×1
rails-api ×1
rest ×1
revision ×1
sharepoint ×1
splistitem ×1
spring-data ×1
sql ×1
svn ×1
wcf ×1