English 中文(简体)
部署项目无所不在——删除档案?
原标题:Deployment project uninstall - deleting files?

我有一个安装该项目的项目和部署项目。 安装的软件在目标PC上生成了若干文档(尽管用户使用)。 我很想知道,是否有办法指示部署项目在拖延时删除这些档案?

所有档案都在用户应用数据夹中。 Can 我指示各分机(应用数据)及其所有档案(被动)删除。

问题回答

您可在无端使用习俗行动时删除档案。 设置这一职位最容易的方法之一是安插班。

http://devcity.net/Articles/339/1/article.aspx” rel=“nofollow noreferer”> 阿尔纳多·桑多瓦尔的本条没有多少日期,但对于如何使用安装班子实施习俗行动,这仍是一个很好的概览。 甚至还有一节是关于清理所有档案。

然而,不采取排他性的方法,最好增加活动听众。 在你获得“ state状态”的地方也没有什么不同。 例如,如果该条款描述的是压倒了Install方法以捕获目标Dir,而不是:

public override void Install(System.Collections.IDictionary stateSaver) 
{ 
   base.Install(stateSaver); 
   stateSaver.Add("TargetDir", Context.Parameters["DP_TargetDir"].ToString()); 
}

你们会制定一种类似方法:

private void onBeforeInstall(object sender, InstallEventArgs args) 
{ 
   // The saved state dictionary is a property on the event args
   args.SavedState.Add("TargetDir", Context.Parameters["DP_TargetDir"].ToString()); 
}

并在建筑商登记:

public InstallerClass() : base()
{
   this.BeforeInstall += new InstallEventHandler(onBeforeInstall);
}

如果更多的话,也可以通过视觉财产编辑登记这些活动。

该条的其余部分是出色的,特别是讨论各种安装活动所有无证“名称”的章节。





相关问题
building .net applications without Visual Studio

I m interested to hear about people working with building .net applications using MSBuild, NAnt or similar tools. What are you using, why are you using it instead of the VS IDE? I like to use ...

Tips for debugging a made-for-linux application on windows?

I m trying to find the source of a bug I have found in an open-source application. I have managed to get a build up and running on my Windows machine, but I m having trouble finding the spot in the ...

Visual Studio 2010 Beta 2: Can I print in color?

I have to turn in a hard copy of some code with an assignment. Is there any way in Visual Studio 2010 to print C# source code with syntax highlighting? PS: The assignment is solving a math problem, ...

Set Select command in code

On button Click I want to Set the Select command of a Gridview. I do this and then databind the grid but it doesn t work. What am i doing wrong? protected void bttnView_Click(object sender, ...

WPF design-time context menu

I am trying to create a custom wpf control, I m wondering how I can add some design-time features. I ve googled and can t seem to get to my goal. So here s my simple question, how can I add an entry ...

热门标签