小编Fet*_*che的帖子

使用WiX/Burn安装后启动应用程序

我知道WiX MSI中存在类似的问题,但是我在安装后使用Burn创建的引导程序EXE文件中启动应用程序时遇到问题.我的完整包在下面.

如果它对场景有任何影响,则引导程序以被动模式启动,因此用户不需要按任何内容.

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

    <Bundle Name="My Company AutoUpdater"
            Version="1.0.11"
            Manufacturer="My Company"
            UpgradeCode="--GUID--">

        <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">

            <bal:WixStandardBootstrapperApplication SuppressOptionsUI="yes"
                                                    LicenseUrl=""
                                                    LogoFile="logo.png" />
        </BootstrapperApplicationRef>

        <Chain>
            <MsiPackage SourceFile="..\App1\bin\Release\App1.msi" />
            <MsiPackage SourceFile="..\App2\bin\Release\App2.msi" />
        </Chain>
    </Bundle>

    <Fragment>
        <Property Id="WixShellExecTarget" 
                  Value="[#C:\Program Files (x86)\My Company\App1.exe]" />

        <Binary Id="MyCA"
                SourceFile="[#C:\Program Files (x86)\My Company\App1.exe]"/>

            <CustomAction Id="LaunchApplication"
                          BinaryKey="MyCA"
                          ExeCommand="-switch"
                          Execute="deferred"
                          Return="check"
                          HideTarget="no"
                          Impersonate="no" />

            <InstallExecuteSequence>
                <Custom Action="LaunchApplication" 
                        After="InstallFiles" />
            </InstallExecuteSequence>
    </Fragment>
</Wix>
Run Code Online (Sandbox Code Playgroud)

installation wix bootstrapper burn wix3.6

19
推荐指数
2
解决办法
1万
查看次数

WiX Burn - 确定已安装的项目

我有一个刻录安装,用户可以选择安装三个选项中的哪一个 - 每个选项直接与链中三个MsiPackages中的一个相关,例如:

<Chain>
  <MsiPackage SourceFile="..\ProductA\bin\Release\ProductA.msi"  InstallCondition="chkProductA" />
  <MsiPackage SourceFile="..\ProductB\bin\Release\ProductB.msi"  InstallCondition="chkProductA" />
  <MsiPackage SourceFile="..\ProductC\bin\Release\ProductC.msi"  InstallCondition="chkProductC" />
</Chain>
Run Code Online (Sandbox Code Playgroud)

一切都很好.但是,当我下次运行msi时,我只想重新安装/更新最初选择的项目 - 即如果只选择了productA,我不想安装B&C产品.

如何确定最初选择的内容?

installation wix bootstrapper burn wix3.6

8
推荐指数
1
解决办法
9408
查看次数

"如果可能发生数据丢失,阻止增量部署"的粒度

在SQL Server数据工具中,您可以使用部署选项"如果可能发生数据丢失则阻止增量部署",我认为这是保持检查的最佳做法.

假设我们有一个表foo,一个现在是冗余的列栏 - 没有依赖项,外键等等,我们已经在数据层和存储过程中删除了对该列的引用,因为它根本就没用过.换句话说,我们对放弃此列不会产生任何不利影响感到满意.

美中不足有几种苍蝇:

  1. 该列中包含数据
  2. 该数据库已发布到数百个分布式客户端,并且可能需要数月才能使更改波及所有客户端

在填充列时,除非我们更改"阻止增量部署,否则可能发生数据丢失"选项,否则发布将失败.这个选项是在数据库级别,而不是表级,因此由于客户端的分布式特性,我们必须在所有数据库更新之前关闭"数据丢失"选项数月,并将其重新打开一旦所有客户都更新了(我们的数据库有我们构建的版本号).

您可能认为我们可以使用预部署脚本解决此问题,例如

if exists (select * from information_schema.columns where table_name = 'foo' and column_name = 'bar') BEGIN
  alter table foo drop constraint DF_foo_bar
  alter table foo drop column bar 
END
Run Code Online (Sandbox Code Playgroud)

但是,除非我们关闭"数据丢失可能发生"选项,否则这将失败.

我只是对其他人在这种情况下做了什么感兴趣,因为我想要具有目前看来不可能的粒度.

sql-server database-project sql-server-data-tools

7
推荐指数
2
解决办法
2787
查看次数

数据库项目未运行部署后脚本

我们有一个包含三个数据库项目的解决方案。所有三个生成的 dacpac 都按顺序部署,但由于某种原因,其中一个 dacpac 不运行部署后脚本。

我们正在使用 sqlpackage 来创建一个 diffscript,并且 diffscript确实正确地包含了部署后的语句......这里是一个片段

IF EXISTS (SELECT * FROM #tmpErrors) ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT>0 BEGIN
PRINT N'The transacted portion of the database update succeeded.'
COMMIT TRANSACTION
END
ELSE PRINT N'The transacted portion of the database update failed.'
GO
DROP TABLE #tmpErrors
GO
/*
Post-Deployment Script Template                         
--------------------------------------------------------------------------------------
 This file contains SQL statements that will be appended to the build script.       
 Use SQLCMD syntax to include a file in the post-deployment script. …
Run Code Online (Sandbox Code Playgroud)

sql-server database-project visual-studio-2012 sql-server-data-tools

6
推荐指数
1
解决办法
6660
查看次数

使用TeamCity对抗TFSPreview.com.有成功吗?

我希望使用TeamCity对TFSPreview.com进行基本构建.

TFSPreview服务使用LiveID作为凭据,因此,根据我的计算,您需要使用http://windows.microsoft.com/en-US/windows7/online-id将TeamCity构建服务器登录与liveID相关联. - 提供者 .

谷歌搜索TFSPreview和TeamCity带来的回报很少.我可以找到关于这个主题的唯一JetBrains问题(http://youtrack.jetbrains.com/issue/TW-20909)仍然是开放的,修复版本为8.0.

因此,为了节省我浪费时间,目前是否可以针对存储在TFSPreview中的代码运行TeamCity(7.1)构建?

注意:我们不能使用TFSPreview自己的基于云的主机作为构建机器,因为我们使用一些需要在构建机器上安装的DevExpress组件 - 而不是使用TFSPreview的选项.这是一种耻辱,否则这个过程已被证明非常简单(即使构建电子邮件很慢到达).

teamcity tfs continuous-integration tfsbuild tfs2012

3
推荐指数
1
解决办法
508
查看次数

TFS数据库备份失败:XML文档中存在错误 - 但是哪个文档?

我们的夜间TFS 2012备份刚刚开始失败.直接通过TFS Express管理控制台运行时也会失败.

哪个文件实际指的是以下错误?如果我能找到它然后我应该能够修复"Root元素丢失"错误:)

[13/08/2014 23:00:00] [Info] Full database backup job
[13/08/2014 23:00:00] [Info] Getting backup lock
[13/08/2014 23:00:05] [Error] 
Exception Message: There is an error in XML document (0, 0). (type   InvalidOperationException)
Exception Stack Trace:    at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at Microsoft.TeamFoundation.Admin.BackupSets.Load(String folder)
   at Microsoft.TeamFoundation.Admin.Jobs.FullDatabaseBackupJobExtension.Run(TeamFoundationRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, DateTime jobQueueTime, String& resultMessage)

Inner Exception Details:

Exception Message: Root element is missing. (type XmlException)
Exception Stack Trace:    at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlReader.MoveToContent()
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderBackupSets.Read7_BackupSets()

[13/08/2014 23:00:05] …
Run Code Online (Sandbox Code Playgroud)

backup tfs tfs2012

3
推荐指数
1
解决办法
3450
查看次数

MSBuild/cmd任务"此时出乎意料"

基本上我有一个命令,它将复制源目录(和子目录)的内容,并将结构展平到目标目录中,覆盖任何重复项.

这是从命令行工作的原始命令

for /r 5.1.0.60 %f in (*) do @copy "%f" "deployment" /y
Run Code Online (Sandbox Code Playgroud)

在这种情况下

  • "5.1.0.60"是先前TeamCity/MSBuild任务的输出目录
  • "deployment"是步骤的展平输出的目标目录

但是,当我从MSBuild任务内部运行此命令时(最终作为TeamCity构建的一部分),我收到以下错误

f" deployment /y was unexpected at this time
Run Code Online (Sandbox Code Playgroud)

我有以下基本的msbuild脚本,它表明了这个问题:

<Project DefaultTargets="flatten"
        xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
        ToolsVersion="3.5">
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />

  <PropertyGroup>
    <SourceDir>5.1.0.60</SourceDir>
    <TargetDir>deployment</TargetDir>
  </PropertyGroup>

  <Target Name="flatten">
    <!-- create our deployment directory -->
    <MakeDir Directories="$(TargetDir)"/>

    <!-- Copy all files flattenend to the deployment directory-->
    <Message Text="##Command  [for /r $(SourceDir) %f in (*) do @copy &quot;%f&quot; $(TargetDir) /y]"/>
    <Exec Command="for /r $(SourceDir) %f in (*) do @copy &quot;%f&quot; $(TargetDir) …
Run Code Online (Sandbox Code Playgroud)

msbuild command-line batch-file

2
推荐指数
1
解决办法
2262
查看次数

Dacpac升级数据库时代有点傻

编辑:更新为状态它没有挂起,只需要年龄!

我正在尝试使用dacpac更新现有的sql server数据库.

我可以使用下面的(剥离)示例在30秒内创建一个新的SQL Server数据库.我遇到的问题是使用相同的dacpac,重新运行程序(因此它更新现有数据库而不是重新创建)需要20分钟.

如果时差到期是什么呢?全面使用了redgate的SqlCompare后,我觉得时间不容乐观.

部署方法的第三个参数是UpgradeExisting,我将其设置为true - 这是我需要做的还是我错过了什么?

void Deploy(string TargetConnectionString, string TargetDatabaseName, string pathToSourceDACPAC)
{

    DacServices dacServices = new DacServices(TargetConnectionString);

    //Set up message and progress handlers
    dacServices.Message += new EventHandler<DacMessageEventArgs>(dbServices_Message);
    dacServices.ProgressChanged += new EventHandler<DacProgressEventArgs>(dbServices_ProgressChanged);

    //Load the DACPAC
    DacPackage dacpac = DacPackage.Load(pathToSourceDACPAC);

    //Set Deployment Options
    DacDeployOptions dacOptions = new DacDeployOptions();
    dacOptions.AllowIncompatiblePlatform = true;

    //Deploy the dacpac
    dacServices.Deploy(dacpac, TargetDatabaseName, true, dacOptions);

}

//Event handlers...
void dbServices_Message(object sender, DacMessageEventArgs e)
{
    OutputThis("DAC Message", e.Message.ToString());
}

void dbServices_ProgressChanged(object sender, DacProgressEventArgs e)
{ …
Run Code Online (Sandbox Code Playgroud)

sql-server dac sql-server-data-tools

2
推荐指数
1
解决办法
4327
查看次数

redgate sql比较结果使用gui命令行不同

使用SQL Compare 10,我创建了一个.scp文件,它将本地数据库(在本地构建服务器上)与Source控件中的内容进行比较(TFS通过redgate SQL Source Control)

使用GUI列出了许多差异.

从命令行运行.scp文件时,根本不会列出任何差异. - "所选对象相同或在比较中未选择任何对象"

命令行是

"C:\Program Files (x86)\Red Gate\SQL Compare 10\sqlcompare.exe" /project:"C:\Users\CIUser\Documents\SQL Compare\SharedProjects\MyDBName v MyDBName (Head).scp" /scriptfile:deploy_MyDBName.sql /include:identical /force
Run Code Online (Sandbox Code Playgroud)

NB

The /include:/identical switch means the compare will not report an error if no changes are detected
The /force switch forces an overwrite of the sql script, rather than causing an error
Run Code Online (Sandbox Code Playgroud)

command-line redgate sqlcompare

1
推荐指数
1
解决办法
1509
查看次数