本文介绍了VS2010和VS2012共享Microsoft.Cpp.Win32.user属性表文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我同时安装了VS2010和VS2012.我最初遇到的问题是VS2012项目不会抱怨缺少Kernel32.lib文件.随后在论坛中搜索发现问题在于Microsoft.Cpp.Win32.user 属性表文件在库目录"$(WindowsSdkDir)lib"中引用.不适用于VS2012. 应该将其更改为"$(WindowsSdk_LibraryPath_x86)lib".而是.

I have both VS2010 and VS2012 installed.  The problem I had initially was that VS2012 projects would not build complaining of a missing Kernel32.lib file.  Subsequent searching through the forums revealed the issue was that the Microsoft.Cpp.Win32.user property sheet file was referencing in Library Directories "$(WindowsSdkDir)lib" which will not work for VS2012.  It should be changed to "$(WindowsSdk_LibraryPath_x86)lib" instead. 

我对其进行了更改,但这确实使VS2012可以正常构建,但是却破坏了VS2010.看来VS2010和VS2012都使用相同的Microsoft.Cpp.Win32.user文件.有什么方法可以让VS2012使用不同的Microsoft.Cpp.Win32.user 从VS2010开始,以便两者都能成功构建项目?该文件位于C:\ Users \< me> \ AppData \ Local \ Microsoft \ MSBuild \ v4.0.

I changed it and that does make VS2012 build okay but it breaks VS2010.  It appears both VS2010 and VS2012 use the same Microsoft.Cpp.Win32.user file.  Is there some way to have VS2012 use a different Microsoft.Cpp.Win32.user from VS2010 so that both will build projects successfully?  The file is located in C:\Users\<me>\AppData\Local\Microsoft\MSBuild\v4.0.

如果Microsoft.Cpp.Win32.user属性表打算由所有VS版本共享,那么是否有某种方法可以使所有新的VS2012项目自动继承我创建的自定义属性表?例如,我制作了一个名为 普通"除了"$(WindowsSdkDir)lib"以外,其他与Microsoft.Cpp.Win32.user.props相同.已更改为"$(WindowsSdk_LibraryPath_x86)lib"在库目录"行中,然后将其添加到我的VS2012项目中.它建成 成功(而VS2010项目不受影响).

If the Microsoft.Cpp.Win32.user property sheet is meant to be shared by all VS versions, then is there some way to have all new VS2012 projects automatically inherit a custom property sheet I create?  For example, I made a custom property sheet called "Common" that is identical to Microsoft.Cpp.Win32.user.props except that "$(WindowsSdkDir)lib" was changed to "$(WindowsSdk_LibraryPath_x86)lib" in the Library Directories row and I added that to my VS2012 project.  It built successfully (while VS2010 projects are unaffected). 

所以我的VS2012项目现在在属性管理器中显示了此信息:

So my VS2012 project now shows this in property manager:

提前感谢您的解决方案.

Thanks in advance for solutions.

推荐答案

如果有任何进展,我们将通知您.抱歉给您带来不便.

We will let you know if any progress is made. Sorry for any inconvenience.


这篇关于VS2010和VS2012共享Microsoft.Cpp.Win32.user属性表文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 23:31