【发布时间】:2017-01-31 16:29:33
【问题描述】:
过去在 RC.x 中工作的所有功能都不再有用了。
我试过这些:
PlatformServices.Default.Application.ApplicationVersion;
typeof(Controller).GetTypeInfo().Assembly.GetCustomAttribute
().Version; - Assembly.GetEntryAssembly().GetName().Version.ToString();
它们都返回 1.0.0.0 而不是 1.0.0-9,这应该是在执行 dotnet publish --version-suffix 9 之后在 project.json: "version": "1.0.0-*" 中包含这个
基本上,他们给我的是附图中的“文件版本”,而不是dotnet publish 实际上似乎发生变化的“产品版本”。
【问题讨论】:
标签: version .net-assembly .net-core