Skip to content

Commit

Permalink
Add longPathAware manifest and app.config (#1265)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-epure-sonarsource authored Jun 17, 2022
1 parent be52b46 commit 78d2d0c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/SonarScanner.MSBuild/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<AppContextSwitchOverrides value="Switch.System.IO.UseLegacyPathHandling=false;Switch.System.IO.BlockLongPaths=false" />
</runtime>
</configuration>
1 change: 1 addition & 0 deletions src/SonarScanner.MSBuild/SonarScanner.MSBuild.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<AssemblyName>SonarScanner.MSBuild</AssemblyName>
<OutputType>Exe</OutputType>
<RollForward>LatestMajor</RollForward>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netcoreapp2.0|AnyCPU'">
<WarningLevel>5</WarningLevel>
Expand Down
11 changes: 11 additions & 0 deletions src/SonarScanner.MSBuild/app.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<!-- Makes the application long-path aware. See https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>

</assembly>

0 comments on commit 78d2d0c

Please sign in to comment.