Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Fix deployment bugs #49

Merged
merged 2 commits into from
Oct 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions src/MSIExtract.AppxPackage/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,27 @@
</ExtraContent>
</ItemGroup>

<Target Name="DownloadNETRuntime" AfterTargets="BeforeBuild" Condition="'$(Configuration)' == 'Release'">
<PropertyGroup>
<BundledNETVersion>3.1.8</BundledNETVersion>
<PropertyGroup>
<BundledNETVersion>3.1.8</BundledNETVersion>

<BundledNETArch Condition="'$(Platform)' == 'x86'">x86</BundledNETArch>
<BundledNETArch Condition="'$(Platform)' == 'x64'">x64</BundledNETArch>
<BundledNETArch Condition="'$(Platform)' == 'ARM64'">arm64</BundledNETArch>
<BundledNETArch Condition="'$(Platform)' == 'x86'">x86</BundledNETArch>
<BundledNETArch Condition="'$(Platform)' == 'x64'">x64</BundledNETArch>
<BundledNETArch Condition="'$(Platform)' == 'ARM64'">arm64</BundledNETArch>

<BundledNETDirectory>$(RepoRootPath)obj\dotnet-runtimes\$(BundledNETVersion)-$(BundledNETArch)</BundledNETDirectory>
</PropertyGroup>
<BundledNETDirectory>$(RepoRootPath)obj\dotnet-runtimes\$(BundledNETVersion)-$(BundledNETArch)</BundledNETDirectory>
</PropertyGroup>

<Target Name="DownloadNETRuntime" Inputs="$(IntermediateOutputPath)dotnet-version.stamp" Outputs="$(IntermediateOutputPath)dotnet-download.stamp">
<WriteLinesToFile File="$(IntermediateOutputPath)dotnet-version.stamp" Lines="$(BundledNETVersion)|$(BundledNETArch)" WriteOnlyWhenDifferent="true" />

<MakeDir Directories="$(BundledNETDirectory)" />
<Exec Command="powershell -ExecutionPolicy Bypass -File $(RepoRootPath)tools\install-dotnet.ps1 -Version $(BundledNETVersion) -InstallDir . -Runtime dotnet -NoPath -Architecture $(BundledNETArch)" WorkingDirectory="$(BundledNETDirectory)" />
<Exec Command="powershell -ExecutionPolicy Bypass -File $(RepoRootPath)tools\install-dotnet.ps1 -Version $(BundledNETVersion) -InstallDir . -Runtime windowsdesktop -NoPath -Architecture $(BundledNETArch)" WorkingDirectory="$(BundledNETDirectory)" />

<WriteLinesToFile File="$(IntermediateOutputPath)dotnet-download.stamp" Lines="$(BundledNETVersion)|$(BundledNETArch)" WriteOnlyWhenDifferent="true" />
</Target>

<Target Name="CopyNETRuntime" AfterTargets="BeforeBuild" DependsOnTargets="DownloadNETRuntime" Condition="'$(Configuration)' == 'Release'">
<PropertyGroup>
<_VFSDir Condition="'$(BundledNETArch)' == 'x64' or '$(BundledNETArch)' == 'arm64'">ProgramFilesX64</_VFSDir>
<_VFSDir Condition="'$(BundledNETArch)' == 'x86'">ProgramFilesX86</_VFSDir>
Expand Down
2 changes: 0 additions & 2 deletions src/MSIExtract/MSIExtract.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>Setup.ico</ApplicationIcon>
<NoWarn>CS8002;CA1303;SA1101;IDE0009;NU1701</NoWarn>

<UseCentennialDepsFileGeneration>false</UseCentennialDepsFileGeneration>
</PropertyGroup>

<ItemGroup>
Expand Down