English 中文(简体)
你们如何利用习惯任务来阅读登记价值?
原标题:How do you read a registry value using a custom msbuild task?

I m 创立一个MSBuild任务,将登记处改为一个特定的登记处钥匙。 如果我在奥连申请中写了同样的法典(见下文),那么它会恢复预期结果,但如果属于“国际会计准则理事会”的任务范围,它就没有任何回报。

Return Registry.GetValue("HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSSQLServerSetup", "SQLPath", Nothing)

如果存在关键/价值乳制品,我将期望上述代码返回<代码>Nothing,如果确实存在,则退还价值。 我在完成MSBuild的任务时正在读到Nothing。 是否有某种属性,我是否需要适用于国际会计准则理事会的出色职能,以告诉它需要阅读登记册?

http://www.un.org。

在这里,正在由国际会计准则理事会执行的任务:

Return Registry.GetValue("HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftMSSQLServerSetup", "SQLPath", Nothing)

引自Registry Redirector, 引自我Vista x64机器在32处运行MSBuild。 您能以什么方式说明习惯的MSBuild(在VB .Net中写成)的任务,以便查阅。 那么,只有没有任何东西,才能在<代码>HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftMSSQLServerSetup上查阅?

感谢你,

Scott

问题回答

您可以直接从国际会计准则理事会大楼读到登记处,而无需一项习惯任务。

$(registry:HiveMyKeyMySubKey@Value)

例如,

$(registry:HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSSQLServerSetup)

阁下说,你从一项习俗任务中重新研究这一问题,这样可能不会适用,但是,如果它帮助的话,我会把它放在一边。

我们的薄膜从X86演播室视力指挥部传来。 在使用该星号时,它不读到64个轨道登记处。 它有不同的合成物,使X86能够读到64个轨道登记处?

如何使用VB s If( ternary function?

Function GetSqlPathFromReg() As Object
    Return If(Registry.GetValue("HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSSQLServerSetup", "SQLPath", Nothing), _
              Registry.GetValue("HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftMSSQLServerSetup", "SQLPath", Nothing))
End Function

假设你有<代码>Output() 财产:

Private _sqlPath As String

<Output()> _
Public ReadOnly Property SqlPath() As String
    Get
        Return _sqlPath
    End Get
End Property

然后,你们都必须从<代码>Execute()方法中发出:

_sqlPath = GetSqlPathFromReg().ToString()




相关问题
How can I overwrite file web.config with web.other.config?

I have a msbuild script with custom logic to deploy my service to the qa server automatically. I have to overwrite the default config with a dedicated one, but when I use <Copy SourceFiles="web....

How do I use MSBuild on a C# project with no compilable code

I have a C# web app project which actually has no ASP.Net or C# in it. It s just a single html page with some Javascript, CSS, and a couple of images. I want to use MSBuild to deploy a version of ...

您能否防止MSBuild.exe经营活动?

我用文字建造一些项目,偶尔利用习俗制造事件,给建筑系统造成了很大困难。 如果有可能,我想援引MSBuild.exe。

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 ...

How long does my Visual Studio C# compile take?

It seems like it should be possible to configure Visual Studio to print out how long the compile takes. Perhaps somewhere in the .sln file. If the sln is compiled from the command line using ...

热门标签