Restructure

This commit is contained in:
Jiiks 2018-01-10 17:29:29 +02:00
parent 4114a6ee26
commit cf1a9ecb91
111 changed files with 0 additions and 518 deletions

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
</startup>
</configuration>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
</startup>
</configuration>

View File

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CosturaPath Condition="$(CosturaPath) == '' Or $(CosturaPath) == '*Undefined*'">$(MSBuildThisFileDirectory)..\..\</CosturaPath>
</PropertyGroup>
<UsingTask
TaskName="Costura.Tasks.FilterReferenceCopyLocalPaths"
AssemblyFile="$(CosturaPath)\Costura.Tasks.dll" />
<Target Name="CosturaFilterReferenceCopyLocalPaths" BeforeTargets="_CopyFilesMarkedCopyLocal" DependsOnTargets="FodyTarget">
<Costura.Tasks.FilterReferenceCopyLocalPaths
ProjectDirectory="$(ProjectDir)"
SolutionDir="$(FodySolutionDir)"
References="@(ReferencePath)"
ReferenceCopyLocalPaths="@(ReferenceCopyLocalPaths)"
>
<Output TaskParameter="FilteredReferenceCopyLocalPaths" ItemName="FilteredReferenceCopyLocalPaths" />
</Costura.Tasks.FilterReferenceCopyLocalPaths>
<ItemGroup>
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" />
<ReferenceCopyLocalPaths Include="@(FilteredReferenceCopyLocalPaths)" />
</ItemGroup>
</Target>
</Project>

View File

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CosturaPath Condition="$(CosturaPath) == '' Or $(CosturaPath) == '*Undefined*'">$(MSBuildThisFileDirectory)..\..\</CosturaPath>
</PropertyGroup>
<UsingTask
TaskName="Costura.Tasks.FilterReferenceCopyLocalPaths"
AssemblyFile="$(CosturaPath)\Costura.Tasks.dll" />
<Target Name="CosturaFilterReferenceCopyLocalPaths" BeforeTargets="_CopyFilesMarkedCopyLocal" DependsOnTargets="FodyTarget">
<Costura.Tasks.FilterReferenceCopyLocalPaths
ProjectDirectory="$(ProjectDir)"
SolutionDir="$(FodySolutionDir)"
References="@(ReferencePath)"
ReferenceCopyLocalPaths="@(ReferenceCopyLocalPaths)"
>
<Output TaskParameter="FilteredReferenceCopyLocalPaths" ItemName="FilteredReferenceCopyLocalPaths" />
</Costura.Tasks.FilterReferenceCopyLocalPaths>
<ItemGroup>
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" />
<ReferenceCopyLocalPaths Include="@(FilteredReferenceCopyLocalPaths)" />
</ItemGroup>
</Target>
</Project>

View File

@ -1,94 +0,0 @@
param($installPath, $toolsPath, $package, $project)
function RemoveForceProjectLevelHack($project)
{
Write-Host "RemoveForceProjectLevelHack"
Foreach ($item in $project.ProjectItems)
{
if ($item.Name -eq "Fody_ToBeDeleted.txt")
{
$item.Delete()
}
}
}
function FlushVariables()
{
Write-Host "Flushing environment variables"
$env:FodyLastProjectPath = ""
$env:FodyLastWeaverName = ""
$env:FodyLastXmlContents = ""
}
function Update-FodyConfig($addinName, $project)
{
Write-Host "Update-FodyConfig"
$fodyWeaversPath = [System.IO.Path]::Combine([System.IO.Path]::GetDirectoryName($project.FullName), "FodyWeavers.xml")
$FodyLastProjectPath = $env:FodyLastProjectPath
$FodyLastWeaverName = $env:FodyLastWeaverName
$FodyLastXmlContents = $env:FodyLastXmlContents
if (
($FodyLastProjectPath -eq $project.FullName) -and
($FodyLastWeaverName -eq $addinName))
{
Write-Host "Upgrade detected. Restoring content for $addinName"
[System.IO.File]::WriteAllText($fodyWeaversPath, $FodyLastXmlContents)
FlushVariables
return
}
FlushVariables
$xml = [xml](get-content $fodyWeaversPath)
$weavers = $xml["Weavers"]
$node = $weavers.SelectSingleNode($addinName)
if (-not $node)
{
Write-Host "Appending node"
$newNode = $xml.CreateElement($addinName)
$weavers.AppendChild($newNode)
}
$xml.Save($fodyWeaversPath)
}
function Fix-ReferencesCopyLocal($package, $project)
{
Write-Host "Fix-ReferencesCopyLocal $($package.Id)"
$asms = $package.AssemblyReferences | %{$_.Name}
foreach ($reference in $project.Object.References)
{
if ($asms -contains $reference.Name + ".dll")
{
if($reference.CopyLocal -eq $true)
{
$reference.CopyLocal = $false;
}
}
}
}
function UnlockWeaversXml($project)
{
$fodyWeaversProjectItem = $project.ProjectItems.Item("FodyWeavers.xml");
if ($fodyWeaversProjectItem)
{
$fodyWeaversProjectItem.Open("{7651A701-06E5-11D1-8EBD-00A0C90F26EA}")
$fodyWeaversProjectItem.Save()
$fodyWeaversProjectItem.Document.Close()
}
}
UnlockWeaversXml($project)
RemoveForceProjectLevelHack $project
Update-FodyConfig $package.Id.Replace(".Fody", "") $project
Fix-ReferencesCopyLocal $package $project

View File

@ -1,47 +0,0 @@
param($installPath, $toolsPath, $package, $project)
function Update-FodyConfig($addinName, $project)
{
$fodyWeaversPath = [System.IO.Path]::Combine([System.IO.Path]::GetDirectoryName($project.FullName), "FodyWeavers.xml")
if (!(Test-Path ($fodyWeaversPath)))
{
return
}
Write-Host "Caching variables for possible update"
$env:FodyLastProjectPath = $project.FullName
$env:FodyLastWeaverName = $addinName
$env:FodyLastXmlContents = [IO.File]::ReadAllText($fodyWeaversPath)
$xml = [xml](get-content $fodyWeaversPath)
$weavers = $xml["Weavers"]
$node = $weavers.SelectSingleNode($addinName)
if ($node)
{
Write-Host "Removing node from FodyWeavers.xml"
$weavers.RemoveChild($node)
}
$xml.Save($fodyWeaversPath)
}
function UnlockWeaversXml($project)
{
$fodyWeaversProjectItem = $project.ProjectItems.Item("FodyWeavers.xml");
if ($fodyWeaversProjectItem)
{
$fodyWeaversProjectItem.Open("{7651A701-06E5-11D1-8EBD-00A0C90F26EA}")
$fodyWeaversProjectItem.Save()
$fodyWeaversProjectItem.Document.Close()
}
}
UnlockWeaversXml($project)
Update-FodyConfig $package.Id.Replace(".Fody", "") $project

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<Weavers>
</Weavers>

View File

@ -1,3 +0,0 @@
param($installPath, $toolsPath, $package, $project)
$item = $project.ProjectItems | where-object {$_.Name -eq "FodyWeavers.xml"}
$item.Properties.Item("BuildAction").Value = [int]0

View File

@ -1,100 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Choose>
<When Condition="$(NCrunchOriginalSolutionDir) != '' And $(NCrunchOriginalSolutionDir) != '*Undefined*'">
<PropertyGroup>
<FodySolutionDir>$(NCrunchOriginalSolutionDir)</FodySolutionDir>
</PropertyGroup>
</When>
<When Condition="$(SolutionDir) != '' And $(SolutionDir) != '*Undefined*'">
<PropertyGroup>
<FodySolutionDir>$(SolutionDir)</FodySolutionDir>
</PropertyGroup>
</When>
<When Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">
<PropertyGroup>
<FodySolutionDir>$(MSBuildProjectDirectory)..\..\..\</FodySolutionDir>
</PropertyGroup>
</When>
</Choose>
<Choose>
<When Condition="$(KeyOriginatorFile) != '' And $(KeyOriginatorFile) != '*Undefined*'">
<PropertyGroup>
<FodyKeyFilePath>$(KeyOriginatorFile)</FodyKeyFilePath>
</PropertyGroup>
</When>
<When Condition="$(AssemblyOriginatorKeyFile) != '' And $(AssemblyOriginatorKeyFile) != '*Undefined*'">
<PropertyGroup>
<FodyKeyFilePath>$(AssemblyOriginatorKeyFile)</FodyKeyFilePath>
</PropertyGroup>
</When>
<Otherwise >
<PropertyGroup>
<FodyKeyFilePath></FodyKeyFilePath>
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup>
<ProjectWeaverXml>$(ProjectDir)FodyWeavers.xml</ProjectWeaverXml>
<FodySignAssembly Condition="$(FodySignAssembly) == '' Or $(FodySignAssembly) == '*Undefined*'">$(SignAssembly)</FodySignAssembly>
<FodyPath Condition="$(FodyPath) == '' Or $(FodyPath) == '*Undefined*'">$(MSBuildThisFileDirectory)..\..\</FodyPath>
</PropertyGroup>
<UsingTask
TaskName="Fody.WeavingTask"
AssemblyFile="$(FodyPath)\Fody.dll" />
<Target
AfterTargets="AfterCompile"
Condition="Exists(@(IntermediateAssembly))"
Name="FodyTarget"
DependsOnTargets="$(FodyDependsOnTargets)"
Inputs="@(IntermediateAssembly->'%(FullPath)');$(FodyKeyFilePath);$(ProjectWeaverXml)"
Outputs="$(TargetPath)">
<Fody.WeavingTask
AssemblyPath="@(IntermediateAssembly)"
IntermediateDir="$(ProjectDir)$(IntermediateOutputPath)"
KeyFilePath="$(FodyKeyFilePath)"
NuGetPackageRoot="$(NuGetPackageRoot)"
ProjectDirectory="$(ProjectDir)"
SolutionDir="$(FodySolutionDir)"
References="@(ReferencePath)"
SignAssembly="$(FodySignAssembly)"
ReferenceCopyLocalPaths="@(ReferenceCopyLocalPaths)"
DefineConstants="$(DefineConstants)"
>
<Output
TaskParameter="ExecutedWeavers"
PropertyName="FodyExecutedWeavers" />
</Fody.WeavingTask>
<PropertyGroup>
<FodyWeavingTargetWasRun>True</FodyWeavingTargetWasRun>
</PropertyGroup>
</Target>
<UsingTask
TaskName="Fody.VerifyTask"
AssemblyFile="$(FodyPath)\Fody.dll" />
<Target Condition="'$(NCrunch)' != '1' And ('$(FodyWeavingTargetWasRun)' == 'True')"
AfterTargets="FodyTarget;AfterBuild"
Name="FodyVerifyTarget"
DependsOnTargets="$(FodyVerifyDependsOnTargets)">
<Fody.VerifyTask
ProjectDirectory="$(ProjectDir)"
TargetPath="$(TargetPath)"
SolutionDir="$(FodySolutionDir)"
DefineConstants="$(DefineConstants)"
/>
</Target>
<!--Support for ncrunch-->
<ItemGroup Condition="'$(NCrunch)' == '1'">
<None Include="$(FodyPath)\*.*" />
</ItemGroup>
</Project>

View File

@ -1,100 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Choose>
<When Condition="$(NCrunchOriginalSolutionDir) != '' And $(NCrunchOriginalSolutionDir) != '*Undefined*'">
<PropertyGroup>
<FodySolutionDir>$(NCrunchOriginalSolutionDir)</FodySolutionDir>
</PropertyGroup>
</When>
<When Condition="$(SolutionDir) != '' And $(SolutionDir) != '*Undefined*'">
<PropertyGroup>
<FodySolutionDir>$(SolutionDir)</FodySolutionDir>
</PropertyGroup>
</When>
<When Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">
<PropertyGroup>
<FodySolutionDir>$(MSBuildProjectDirectory)..\..\..\</FodySolutionDir>
</PropertyGroup>
</When>
</Choose>
<Choose>
<When Condition="$(KeyOriginatorFile) != '' And $(KeyOriginatorFile) != '*Undefined*'">
<PropertyGroup>
<FodyKeyFilePath>$(KeyOriginatorFile)</FodyKeyFilePath>
</PropertyGroup>
</When>
<When Condition="$(AssemblyOriginatorKeyFile) != '' And $(AssemblyOriginatorKeyFile) != '*Undefined*'">
<PropertyGroup>
<FodyKeyFilePath>$(AssemblyOriginatorKeyFile)</FodyKeyFilePath>
</PropertyGroup>
</When>
<Otherwise >
<PropertyGroup>
<FodyKeyFilePath></FodyKeyFilePath>
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup>
<ProjectWeaverXml>$(ProjectDir)FodyWeavers.xml</ProjectWeaverXml>
<FodySignAssembly Condition="$(FodySignAssembly) == '' Or $(FodySignAssembly) == '*Undefined*'">$(SignAssembly)</FodySignAssembly>
<FodyPath Condition="$(FodyPath) == '' Or $(FodyPath) == '*Undefined*'">$(MSBuildThisFileDirectory)..\..\</FodyPath>
</PropertyGroup>
<UsingTask
TaskName="Fody.WeavingTask"
AssemblyFile="$(FodyPath)\Fody.dll" />
<Target
AfterTargets="AfterCompile"
Condition="Exists(@(IntermediateAssembly))"
Name="FodyTarget"
DependsOnTargets="$(FodyDependsOnTargets)"
Inputs="@(IntermediateAssembly->'%(FullPath)');$(FodyKeyFilePath);$(ProjectWeaverXml)"
Outputs="$(TargetPath)">
<Fody.WeavingTask
AssemblyPath="@(IntermediateAssembly)"
IntermediateDir="$(ProjectDir)$(IntermediateOutputPath)"
KeyFilePath="$(FodyKeyFilePath)"
NuGetPackageRoot="$(NuGetPackageRoot)"
ProjectDirectory="$(ProjectDir)"
SolutionDir="$(FodySolutionDir)"
References="@(ReferencePath)"
SignAssembly="$(FodySignAssembly)"
ReferenceCopyLocalPaths="@(ReferenceCopyLocalPaths)"
DefineConstants="$(DefineConstants)"
>
<Output
TaskParameter="ExecutedWeavers"
PropertyName="FodyExecutedWeavers" />
</Fody.WeavingTask>
<PropertyGroup>
<FodyWeavingTargetWasRun>True</FodyWeavingTargetWasRun>
</PropertyGroup>
</Target>
<UsingTask
TaskName="Fody.VerifyTask"
AssemblyFile="$(FodyPath)\Fody.dll" />
<Target Condition="'$(NCrunch)' != '1' And ('$(FodyWeavingTargetWasRun)' == 'True')"
AfterTargets="FodyTarget;AfterBuild"
Name="FodyVerifyTarget"
DependsOnTargets="$(FodyVerifyDependsOnTargets)">
<Fody.VerifyTask
ProjectDirectory="$(ProjectDir)"
TargetPath="$(TargetPath)"
SolutionDir="$(FodySolutionDir)"
DefineConstants="$(DefineConstants)"
/>
</Target>
<!--Support for ncrunch-->
<ItemGroup Condition="'$(NCrunch)' == '1'">
<None Include="$(FodyPath)\*.*" />
</ItemGroup>
</Project>

Some files were not shown because too many files have changed in this diff Show More