【发布时间】:2017-04-20 10:15:08
【问题描述】:
我有一个net core consoleapp项目,如下(VS 2017风格):
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.1</TargetFramework>
<Version>2.0.0</Version>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<FileVersion>4.0.0.0</FileVersion>
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
<RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>
</PropertyGroup>
</Project>
我可以毫无问题地构建项目,我可以使用 dotnet publish -r win10-x64 发布它,它将与 dll 文件一起生成一个 exe 文件。我的问题是 exe 文件有一些奇怪的 FileVersion 和 ProductVersion 字段(在我的情况下 FileVersion = 1.0.1.4500 和 ProductVersion 1.0.1.cee57 ...(一些 guid))。此外,其余文件详细信息(名称、版权)与 dotnet 相关,而不是我自己的项目。
有什么方法可以在发布时控制 exe 的详细信息吗?
【问题讨论】:
标签: c# .net .net-core visual-studio-2017