问题标签 [fileversioninfo]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c++ - 带有 Unicode UTF-16 (1200) 代码页字符串表的 VerQueryValue 失败
我正在尝试使用以下代码从 PE 文件中检索文件描述:
该特定文件(如果您的 Windows 10 上没有它,这里是副本wLanguage
)具有编码为 0 和wCodePage
1200 的字符串表。在这种情况下VerQueryValue
失败并显示错误代码ERROR_RESOURCE_TYPE_NOT_FOUND
。但是当我在文件资源管理器中检查该文件时,我知道该文件具有“文件描述”属性:
那么我在上面的代码中做错了什么?
c# - 程序集和类版本的兼容性发生了什么?
我正在为版本的正确依赖版本控制而苦苦挣扎。我在一些文章中读到,库中对 AssemblyVersion 的每次更改都会导致需要重新构建引用该库的所有程序集。如果这是真的,我在设计依赖程序集的发布周期时需要非常小心,对吧?
我想自己验证论文,然后……好吧,我注意到这根本不是事实。
我制作了一个控制台应用程序,它引用了 dep1.dll(程序集版本 1.0.0.0)并构建了它。然后我将 dep1.dll 更改为 2.0.0.0 版本,构建它并将其与 1.0.0.0 版本交换。运行控制台应用程序时,我预计会出现错误“找不到版本为 1.0.0.0 的程序集 dep1.dll”。你知道吗?没有发生什么特别的事情,该应用程序使用该库,就像它从一开始就针对该版本一样。
ConsoleApp1/Program.cs
dep1/Class1.cs
如您所见,接口也是如此。
你能解释一下为什么我的测试不起作用吗?这一点,其他 SO 答案 ( 1 ) 和 haacked on versioning interfaces的文章真的让我很困惑。
c# - FileVersionInfo.GetVersionInfo 替代
我有一个检查更新的应用程序。要检查更新,我需要获取用户计算机上的文件版本。我使用了这段代码:
今天发现FileVersionInfo.GetVersionInfo(String)方法可能获取不到文件版本!以下是帮助中的描述:
如果文件不包含版本信息,则 FileVersionInfo 仅包含所请求文件的名称。
为了没有错误,我这样做了:
但是现在有一个问题——如果用户这个方法永远不会返回文件的版本,那么用户永远不会收到更新!所以我需要一种方法来获取始终有效的文件版本。
在 c# 中是否有此方法的替代方法?
c++ - 从 RC 文件访问字符串?
我有这个.rc
文件,其中包含用于 exe 文件详细信息的版本、描述等。
如何获取在代码中使用的值?例如,我想获取ProductName。
windows - 是否可以将文件版本附加到 .bak 文件?
对于 .exe 和 .dll 文件,我可以创建一个可以在属性中看到的文件版本。我可以对 SQL 备份文件 (.bak) 执行相同的操作吗?
c# - FileVersionInfo.ProductVersion 格式
是否有特定的文化设置来控制ProductVersion
字符串的分隔方式并且可以通过CultureInfo
类进行设置?
例如,在 Windows 10 PC 上使用以下行,区域设置为英语(南非),ProductVersion
字符串返回为 1,2,3,4 而不是 1.2.3.4。
从我迄今为止的测试来看,NumberFormat
小数点分隔符选项都不适用于ProductVersion
.
wix - Wix 安装程序删除要更新但不安装新版本的文件
最近遇到了一个配置为对以前安装的应用程序进行“重大升级”的 Wix 安装程序的问题。已安装在系统上的应用程序包含一个版本为 1.0.0 的 S7.Net.dll 文件,而安装程序(表示更新)包含一个同名的 dll (S7.Net.dll),但版本为0.3.0 安装在同一位置。但是,运行“升级”安装程序似乎会删除版本为 1.0.0 的文件,但从未将其替换为版本为 0.3.0 的文件。
我查看了安装程序(链接)使用的文件版本控制逻辑,如果我理解正确,安装程序不应该用“升级”安装程序中的文件替换系统上已经安装的文件(v1.0.0) (v0.3.0)。这种理解正确吗?我不确定这一点,因为“升级”安装程序确实包含一个MajorUpgrade
组件,据我了解,默认情况下该组件会执行一种“全部删除”操作 - 至少这是我从阅读中的RemoveFeatures
属性描述时所解释的维克斯文档。但是,如果执行“全部删除”,那么为什么还要比较两个文件的版本呢?
总的来说,我对文件版本控制逻辑的理解是否正确?我对Wix组件RemoveFeatures
属性的理解如何?MajorUpgrade
如果是这样,为什么“升级”安装程序会删除文件的现有版本而不替换它?
我已经包含MajorUpgrade
了安装程序中包含的组件,以及提到的每个 dll 文件的属性选项卡的屏幕截图。
<MajorUpgrade
AllowDowngrades="no"
DowngradeErrorMessage="A newer version of [ProductName] is already installed."/>
windows - Inno Setup:更改文件描述
我正在使用 Inno Setup 5,并且要包含可自定义的 .exe 文件,它的名称在[Files]
使用参数的部分中进行了更改DestName
。但是,我们谈论的是 .exe 文件。
我注意到它运行时,任务管理器中的名称是旧文件名,DestName
参数只更改它的实际名称,而不是文件Description
,它显示在任务管理器中。有人有过这样的经历吗?
我正在使用 Windows 10,以管理员身份运行(如果有任何区别)。
delphi - Delphi Version number central but other info decentral
Background
Upto RS10.3 I used to use Andreas Hausladen DDevExtensions to set my version number in my project sources to be the same for all modules (bpl's/exe), but unfortunately Andreas has stopped updating his tool for RS10.4 and later.
So I am looking for more comfortable ways to set a version number in my app modules than applying multi-file changes to all dproj files with NotePad++.
But... On the other side I do want to keep specific information (like file description etc) specific to the module file.
What I also would like but isnt really a requirement is to have my (c) notice, and other shared info to be centralized in a single file (preferably .rc) as well.
It is not a problem to drop the version info from the dproj files (which are a pain to maintain anyway) and have a specific .rc file for each module instead.
Another advantage would be that having one central version number and (c) file is also a lot better in svn change management since I don't have to commit each and every .dproj file because of the version/build number change.
Investigation
(To be updated as we go along) I Checked out
- How to include Subversion revision number into Delphi project
- Incrementing Delphi XE project version number from command line
But those solutions are not really what I am looking for; I am not looking for scripts but a source file/project file way to accomplish my task.
So here's the Q
How can I have one single .rc file containing my version number and use it in other .rc files containing specific version info