Visual studio 2010 在visual studio 2010中访问运行时库属性
这基本上是一个后续问题: 我们库的目标名称当前采用以下格式:Visual studio 2010 在visual studio 2010中访问运行时库属性,visual-studio-2010,visual-studio,Visual Studio 2010,Visual Studio,这基本上是一个后续问题: 我们库的目标名称当前采用以下格式: $(ProjectName)-$(PlatformToolset)-$(PlatformShortName)-$(Configuration) 我们想在目标名称中添加有关项目使用的运行时库的信息,我尝试添加$(RuntimeLibrary),但似乎没有设置。在解析目标名称时,是否有其他方法获取运行库 谢谢, John。使用此属性页,您可以执行此操作。将其导入属性页,您将能够通过以下方式访问RuntimeLibrary:$(Runt
$(ProjectName)-$(PlatformToolset)-$(PlatformShortName)-$(Configuration)
我们想在目标名称中添加有关项目使用的运行时库的信息,我尝试添加$(RuntimeLibrary)
,但似乎没有设置。在解析目标名称时,是否有其他方法获取运行库
谢谢,
John。使用此属性页,您可以执行此操作。将其导入属性页,您将能够通过以下方式访问RuntimeLibrary:$(RuntimeLibrary) 是的!!!这将适用于您的属性表=^~=
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_IsDebug>$([System.Convert]::ToString($([System.Text.RegularExpressions.Regex]::IsMatch($(Configuration),'[Dd]ebug'))))</_IsDebug>
<_ItemDefinitionGroupRegex><![CDATA[<ItemDefinitionGroup Condition=".*']]>$(Configuration)\|$(Platform)<![CDATA['">((?:.*\n)*?.*)</ItemDefinitionGroup>]]></_ItemDefinitionGroupRegex>
<_RuntimeLibraryRegex><![CDATA[(?:.*\n)*?.*<RuntimeLibrary>(.*)</RuntimeLibrary>(?:.*\n)*?.*]]></_RuntimeLibraryRegex>
<_HasRuntimeLibrary>$([System.Text.RegularExpressions.Regex]::IsMatch($([System.Text.RegularExpressions.Regex]::Match($([System.IO.File]::ReadAllText($(ProjectPath))), $(_ItemDefinitionGroupRegex)).Result('$1')), $(_RuntimeLibraryRegex)))</_HasRuntimeLibrary>
<!--
Fix incremental build (Different results when running msbuild within Visual Studio or from console).
http://connect.microsoft.com/VisualStudio/feedback/details/677499/different-results-when-running-msbuild-within-visual-studio-or-from-console
-->
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
</PropertyGroup>
<Choose>
<When Condition="$([System.Convert]::ToBoolean($(_HasRuntimeLibrary)))">
<!-- Extract runtime library from project file. -->
<PropertyGroup Label="UserMacros">
<_RuntimeLibrary>$([System.Text.RegularExpressions.Regex]::Match($([System.Text.RegularExpressions.Regex]::Match($([System.IO.File]::ReadAllText($(ProjectPath))), $(_ItemDefinitionGroupRegex)).Result('$1')), $(_RuntimeLibraryRegex)).Result('$1'))</_RuntimeLibrary>
</PropertyGroup>
</When>
<Otherwise>
<!-- Set default runtime library -->
<PropertyGroup Label="UserMacros">
<_RuntimeLibrary Condition=" '$(_IsDebug)' == 'True' ">MultiThreadedDebugDLL</_RuntimeLibrary>
<_RuntimeLibrary Condition=" '$(_IsDebug)' == 'False' ">MultiThreadedDLL</_RuntimeLibrary>
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup Label="UserMacros">
<IsDebug>$(_IsDebug)</IsDebug>
<ConfigType Condition=" '$(IsDebug)' == 'True' ">Debug</ConfigType>
<ConfigType Condition=" '$(IsDebug)' == 'False' ">Release</ConfigType>
<Architecture Condition=" '$(Platform)' == 'Win32' ">x86</Architecture>
<Architecture Condition=" '$(Platform)' == 'x64' ">x64</Architecture>
<Toolset Condition=" '$(PlatformToolset)' == 'v110' ">msvc.110</Toolset>
<RuntimeLibrary>$(_RuntimeLibrary)</RuntimeLibrary>
</PropertyGroup>
<ItemGroup>
<BuildMacro Include="IsDebug">
<Value>$(IsDebug)</Value>
</BuildMacro>
<BuildMacro Include="Toolset">
<Value>$(Toolset)</Value>
</BuildMacro>
<BuildMacro Include="Architecture">
<Value>$(Architecture)</Value>
</BuildMacro>
<BuildMacro Include="RuntimeLibrary">
<Value>$(RuntimeLibrary)</Value>
</BuildMacro>
<BuildMacro Include="ConfigType">
<Value>$(ConfigType)</Value>
</BuildMacro>
</ItemGroup>
</Project>
$([System.Convert]::ToString($([System.Text.RegularExpressions.Regex]::IsMatch($(配置),“[Dd]ebug”))
(((?:.*\n)*?.]>
(.*)(?:.*\n)*?.]>
$([System.Text.RegularExpressions.Regex]::IsMatch($([System.Text.RegularExpressions.Regex]::Match($([System.IO.File]::ReadAllText($(ProjectPath)),$(_ItemDefinitionGroupRegex))。结果('$1'),$(_RuntimeLibraryRegex)))
真的
$([System.Text.RegularExpressions.Regex]::匹配($([System.Text.RegularExpressions.Regex]::匹配($([System.IO.File]::ReadAllText($(ProjectPath)),$(_ItemDefinitionGroupRegex))。结果('$1'),$(_RuntimeLibraryRegex))。结果('$1'))
多线程debugdll
多线程DLL
$(_IsDebug)
调试
释放
x86
x64
msvc.110
$(\u运行时间图书馆)
$(IsDebug)
$(工具集)
$(架构)
$(RuntimeLibrary)
$(配置类型)