Skip to content

Commit 929dd9f

Browse files
committed
Add dnx.ps1 script
1 parent 167845f commit 929dd9f

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/Layout/redist/dnx.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# dnx.ps1
2+
# PowerShell script to launch dotnet.exe with 'dnx' and all passed arguments
3+
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
4+
$dotnet = Join-Path $scriptDir 'dotnet.exe'
5+
& $dotnet dnx @Args
6+
exit $LASTEXITCODE

src/Layout/redist/targets/GenerateInstallerLayout.targets

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,12 @@
6565
</Target>
6666

6767
<Target Name="LayoutDnxShim">
68-
<PropertyGroup>
69-
<DnxShimSource Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">$(ArtifactsBinDir)dnx\$(Configuration)\win-$(TargetArchitecture)\publish\dnx.exe</DnxShimSource>
70-
<DnxShimSource Condition="!$([MSBuild]::IsOSPlatform('WINDOWS'))">dnx</DnxShimSource>
71-
</PropertyGroup>
72-
<Copy SourceFiles="$(DnxShimSource)" DestinationFolder="$(RedistInstallerLayoutPath)" />
68+
<ItemGroup>
69+
<DnxShimSource Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))" Include="dnx.cmd" />
70+
<DnxShimSource Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))" Include="dnx.ps1" />
71+
<DnxShimSource Condition="!$([MSBuild]::IsOSPlatform('WINDOWS'))" Include="dnx" />
72+
</ItemGroup>
73+
<Copy SourceFiles="@(DnxShimSource)" DestinationFolder="$(RedistInstallerLayoutPath)" />
7374

7475
<!-- Mark script as executable -->
7576
<Exec Command="chmod 755 &quot;$(RedistInstallerLayoutPath)/dnx&quot;" Condition="!$([MSBuild]::IsOSPlatform('Windows'))" />

0 commit comments

Comments
 (0)