mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Get rid of ILMerge, use more friendly ILBundle
This commit is contained in:
11
packages/ILBundle.1.0.0.14/Tools/Net40/Uninstall.ps1
vendored
Normal file
11
packages/ILBundle.1.0.0.14/Tools/Net40/Uninstall.ps1
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
#http://blogs.clariusconsulting.net/kzu/how-to-add-an-msbuild-import-to-a-project-on-nuget-install/
|
||||
param($installPath, $toolsPath, $package, $project)
|
||||
|
||||
# Need to load MSBuild assembly if it<69>s not loaded yet.
|
||||
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
|
||||
# Grab the loaded MSBuild project for the project
|
||||
$msbuild = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($project.FullName) | Select-Object -First 1
|
||||
$importToRemove = $msbuild.Xml.Imports | Where-Object { $_.Project.Endswith('ILBundle.targets') }
|
||||
# Remove the import and save the project
|
||||
$msbuild.Xml.RemoveChild($importToRemove) | out-null
|
||||
$project.Save()
|
||||
17
packages/ILBundle.1.0.0.14/Tools/Net40/install.ps1
vendored
Normal file
17
packages/ILBundle.1.0.0.14/Tools/Net40/install.ps1
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# http://blogs.clariusconsulting.net/kzu/how-to-add-an-msbuild-import-to-a-project-on-nuget-install/
|
||||
param($installPath, $toolsPath, $package, $project)
|
||||
# This is the MSBuild targets file to add
|
||||
$targetsFile = [System.IO.Path]::Combine([System.IO.Path]::GetDirectoryName($project.FileName), 'ILBundle.targets')
|
||||
# Need to load MSBuild assembly if it's not loaded yet.
|
||||
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
|
||||
# Grab the loaded MSBuild project for the project
|
||||
$msbuild = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($project.FullName) | Select-Object -First 1
|
||||
|
||||
# Make the path to the targets file relative.
|
||||
$projectUri = new-object Uri('file://' + $project.FullName)
|
||||
$targetUri = new-object Uri('file://' + $targetsFile)
|
||||
$relativePath = $projectUri.MakeRelativeUri($targetUri).ToString().Replace([System.IO.Path]::AltDirectorySeparatorChar, [System.IO.Path]::DirectorySeparatorChar)
|
||||
|
||||
# Add the import and save the project
|
||||
$msbuild.Xml.AddImport($relativePath) | out-null
|
||||
$project.Save()
|
||||
Reference in New Issue
Block a user