.NET 4.0 自定义操作失败
我们的安装程序中有一个自定义操作。我们将项目升级到 .NET 4.0 框架,当它应用自定义操作时,安装程序会抛出 1001 错误,表明框架版本无效。
自定义操作使用安装程序中早期单选按钮窗口中的值(即采用 CustomActionData)。在包含主 exe 的项目中,我有一个继承自 Installer 的类,设置了属性 [RunInstaller(true)],并覆盖了 Install 函数。
安装程序在 VS 2010 中针对 .NET 3.5 编译得很好。我运行的是 Windows 7 64 位。
有什么方法可以升级我们的安装程序/自定义操作以与 .NET 4.0 一起使用吗?
We have a custom action in our installer. We upgraded our projects to the .NET 4.0 framework, and when it applies the custom action, the installer throws a 1001 error that says the version of the framework is invalid.
The custom action uses the value from a radio-button window earlier in the installer (i.e. takes CustomActionData). In my project containing the main exe, I have class that inherits from Installer, has the attribute [RunInstaller(true)] set, and overrides the Install function.
The installer works just fine compiled in VS 2010 for .NET 3.5. I'm running Windows 7 64-bit.
Is there any way we can upgrade our installer/custom action to work with .NET 4.0?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要至少安装 .Net Framework 4.0 客户端配置文件。
由于您的其他项目都在 4.0 框架上,因此您也应该将安装程序移至 4.0。
下载.Net Framework 4.0 客户端配置文件
You need to have minimum of .Net Framework 4.0 client profile installed.
As your other projects are on 4.0 framework you should move the installer to 4.0 too.
Download .Net Framework 4.0 Client profile