我在网上找不到任何答案...
在 Visual Studio 2010 C++ Express 中,如何设置 exe 版本、构建、图标等可执行数据?
此外,Visual Studio 编译器是否将私有(private)数据添加到可执行文件中,例如 IP 或 mac 地址?
最佳答案
In Visual Studio 2010 C++ Express, how do I set data such as exe version, build
您没有说您使用的是托管还是非托管 C++。
对于非托管 C++(例如 MFC),您需要 create a
version.rc
file .您可能想使用 resource editor帮助您处理 .rc 文件。对于托管 C++(即 CLR (.NET) C++ 项目),编辑或创建
AssemblyInfo.cpp
文件。这是一个样本
AssemblyInfo.cpp
开始:#include "stdafx.h"
using namespace System;
using namespace System::Reflection;
using namespace System::Runtime::CompilerServices;
using namespace System::Runtime::InteropServices;
using namespace System::Security::Permissions;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly:AssemblyTitleAttribute("foo")];
[assembly:AssemblyDescriptionAttribute("")];
[assembly:AssemblyConfigurationAttribute("")];
[assembly:AssemblyCompanyAttribute("Microsoft")];
[assembly:AssemblyProductAttribute("foo")];
[assembly:AssemblyCopyrightAttribute("Copyright (c) Microsoft 2011")];
[assembly:AssemblyTrademarkAttribute("")];
[assembly:AssemblyCultureAttribute("")];
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the value or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly:AssemblyVersionAttribute("1.0.*")];
[assembly:ComVisible(false)];
[assembly:CLSCompliantAttribute(true)];
[assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)];
does the Visual studio compiler add private data to the executable such as IP or mac address?
不,你从哪里听到的?
关于visual-studio - VS2010设置可执行数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6928329/