如何在 Visual Studio 2010 中使用项目的默认生成设置?
我有一个 Visual Studio 2007 项目,已成功使用 VS 2010 进行升级。它表示已成功构建,但虽然项目的默认构建设置导致“构建成功”消息,但有 2 个警告指出:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5):
warning MSB8012: TargetPath(C:\MaxSDK-5.1.7\examples\plussz\.\..\..\sdk-build\plussz.dll)
does not match the Linker's OutputFile property value (C:\MaxSDK-5.1.7\sdk-build\plussz.mxe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(991,5): warning MSB8012: TargetExt(.dll) does not match the Linker's OutputFile property value (.mxe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
并且该文件从未显示。此外,它尝试构建的文件具有扩展名 .DLL,但它应该具有 .mxo。
任何允许我构建这个东西的东西都是一个很大的帮助,但我真正想做的是输出到项目文件夹(源所在的位置)而不是我的用户文件夹。我假设这个项目有一些预先存在的构建设置。是否有某种方法可以使用这些变量而不是 Visual Studio 使用的全局变量?
I have a Visual Studio 2007 project that I successfully upgraded with VS 2010. It says it builds successfully, but while the project's default build settings result in "build successful" message, there are 2 warnings that state:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5):
warning MSB8012: TargetPath(C:\MaxSDK-5.1.7\examples\plussz\.\..\..\sdk-build\plussz.dll)
does not match the Linker's OutputFile property value (C:\MaxSDK-5.1.7\sdk-build\plussz.mxe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(991,5): warning MSB8012: TargetExt(.dll) does not match the Linker's OutputFile property value (.mxe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
and the file never shows up. Furthermore, the file it tries to build has an extension .DLL, but it's supposed to have .mxo.
Anything that allows me to build this thing is a big help, but what I really want to do is output to the project folder (where the source is) as opposed to my user folder. I assume there are some preexisting build settings for this project. Isn't there some way I could use those as opposed to the global variables visual studio uses?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我听起来项目转换并不那么成功。 VS2007?真的吗?
您应该能够通过更改项目属性来解决此问题。
在 Visual Studio 中,右键单击解决方案资源管理器中的项目,然后选择
属性
。您可能需要在“配置”下拉列表中选择
所有配置
。单击“配置属性”部分中的
常规
。将“输出目录”设置为:$(SolutionDir)$(Configuration)\
将“中间目录”设置为:$(Configuration)\
将“目标扩展名”设置为:.mxo
在“链接器->常规”部分:
将“输出文件”设置为:$(OutDir)$(TargetName)$(TargetExt)
希望这会有所帮助。
I sounds like the project conversion wasn't all that successful. VS2007? Really?
You should be able to fix this by changing the project properties.
In Visual Studio, right-click the project in Solution Explorer and select
Properties
.You may want to select
All Configurations
in the Configuration drop down.Click on
General
in Configuration Properties section.Set "Output Directory" to: $(SolutionDir)$(Configuration)\
Set "Intermediate Directory" to: $(Configuration)\
Set "Target Extension" to: .mxo
In the "Linker->General" section:
Set "Output File" to: $(OutDir)$(TargetName)$(TargetExt)
Hope this helps.