设置.NET版本不起作用
问题描述:
<!-- 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 '"C:\Windows\\system32\inetsrv\appcmd" set config -section:applicationPools -[name="PoolName"].managedRuntimeVersion:v4.0'.
Action ended 22:02:57: SetNetVersion_Cmd. Return value 1.
池确实存在,但its.NET版本不会更改。我究竟做错了什么?
的SetNetVersionCmd是:
'"[WindowsFolder]\system32\inetsrv\appcmd" set config -section:applicationPools -[\[]name="PoolName"[\]].managedRuntimeVersion:v4.0'
答
一种更简单的方式做到这一点(仍在使用APPCMD)就像这样:
AppCmd Set AppPool "PoolName" /managedRuntimeVersion:v4.0
你应该能够重用你的维克斯代码所有的休息,只是改变变量的值。然而
答
老帖子,但有人可能会发现这个有用的,这个地方是一个金矿...
仍在使用维克斯3.5个人,而 manual州创建一个应用程序池时,我们可以设置ManagedRuntimeVersion
,该文档适用于版本3.6 ...查看我的本地帮助文件ManagedRuntimeVersion
不受支持。