2010-07-24 66 views
4
<!-- Custom action to set the .NET version --> 
<CustomAction Id="SetNetVersion_Cmd" Property="SetNetVersion" Execute="immediate" Return="check" Value="$(var.SetNetVersionCmd)" /> 
<CustomAction Id="SetNetVersion" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="no"/> 

<!-- Run the action --> 
<InstallExecuteSequence> 
    <Custom Action='SetNetVersion_Cmd' After='InstallFinalize' /> 
</InstallExecuteSequence> 

这里是微星日志显示:设置.NET版本不起作用

Action 22:02:57: SetNetVersion_Cmd. 
Action start 22:02:57: SetNetVersion_Cmd. 
MSI (s) (44:9C) [22:02:57:533]: PROPERTY CHANGE: Adding SetNetVersion property. Its value is '&quot;C:\Windows\\system32\inetsrv\appcmd&quot; set config -section:applicationPools -[name=&quot;PoolName&quot;].managedRuntimeVersion:v4.0'. 
Action ended 22:02:57: SetNetVersion_Cmd. Return value 1. 

池确实存在,但its.NET版本不会更改。我究竟做错了什么?

的SetNetVersionCmd是:

'&quot;[WindowsFolder]\system32\inetsrv\appcmd&quot; set config -section:applicationPools -[\[]name=&quot;PoolName&quot;[\]].managedRuntimeVersion:v4.0' 

回答

0

一种更简单的方式做到这一点(仍在使用APPCMD)就像这样:

AppCmd Set AppPool "PoolName" /managedRuntimeVersion:v4.0 

你应该能够重用你的维克斯代码所有的休息,只是改变变量的值。然而

0

老帖子,但有人可能会发现这个有用的,这个地方是一个金矿...

仍在使用维克斯3.5个人,而 manual州创建一个应用程序池时,我们可以设置 ManagedRuntimeVersion

,该文档适用于版本3.6 ...查看我的本地帮助文件ManagedRuntimeVersion不受支持。