未验证 提交 12f46650 编写于 作者: R Rikki Gibson 提交者: GitHub

Merge pull request #33030 from RikkiGibson/long-paths

Add long paths support
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="{generated}" name="{generated}"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
</assembly>
\ No newline at end of file
......@@ -237,4 +237,51 @@
</TargetFrameworkMonikerAssemblyAttributeText>
</PropertyGroup>
</Target>
<Target Name="_CalculateSubstituteVariablesInApplicationManifestInputsOutputs">
<PropertyGroup>
<_OriginalApplicationManifestPath>$(RepositoryEngineeringDir)config\app.manifest</_OriginalApplicationManifestPath>
<_UpdatedApplicationManifestPath>$(IntermediateOutputPath)$(AssemblyName).exe.manifest</_UpdatedApplicationManifestPath>
</PropertyGroup>
</Target>
<!--
Sets the values of "version" and "name" attributes in assemblyIdentity element in the application manifest file
with values $(AssemblyVersion) and $(AssemblyName) to avoid hardcoding those in the manifest file.
-->
<Target Name="_SubstituteVariablesInApplicationManifest"
BeforeTargets="_SetExternalWin32ManifestProperties;_SetEmbeddedWin32ManifestProperties"
DependsOnTargets="_CalculateSubstituteVariablesInApplicationManifestInputsOutputs;GetAssemblyVersion"
Inputs="$(_OriginalApplicationManifestPath)"
Outputs="$(_UpdatedApplicationManifestPath)"
Condition="'$(OutputType)' == 'Exe' And '$(TargetFramework)' == 'net472'">
<Copy SourceFiles="$(_OriginalApplicationManifestPath)" DestinationFiles="$(_UpdatedApplicationManifestPath)" />
<PropertyGroup>
<_Namespace>
<Namespace Prefix="asm" Uri="urn:schemas-microsoft-com:asm.v1" />
</_Namespace>
</PropertyGroup>
<!-- Update version attribute -->
<XmlPoke XmlInputPath="$(_UpdatedApplicationManifestPath)"
Value="$(AssemblyVersion)"
Query="/asm:assembly/asm:assemblyIdentity/@version"
Namespaces="$(_Namespace)"/>
<!-- Update name attribute -->
<XmlPoke XmlInputPath="$(_UpdatedApplicationManifestPath)"
Value="$(AssemblyName)"
Query="/asm:assembly/asm:assemblyIdentity/@name"
Namespaces="$(_Namespace)"/>
<PropertyGroup>
<ApplicationManifest>$(_UpdatedApplicationManifestPath)</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<FileWrites Include="$(_UpdatedApplicationManifestPath)"/>
</ItemGroup>
</Target>
</Project>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册