This commit is contained in:
rogeralsing 2015-08-21 20:09:35 +02:00
Родитель 60a0c7ec9f
Коммит 092bf30403
12 изменённых файлов: 727 добавлений и 10 удалений

8
Wire.Nuget/NuGet.config Normal file
Просмотреть файл

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<apikeys>
</apikeys>
<packageSources>
<add key="NuGet official package source" value="https://www.nuget.org" />
</packageSources>
</configuration>

313
Wire.Nuget/NuGetPackage.ps1 Normal file
Просмотреть файл

@ -0,0 +1,313 @@
Param (
[switch]$Publish
)
$ErrorActionPreference = "Stop"
$global:ExitCode = 1
function Write-Log {
#region Parameters
[cmdletbinding()]
Param(
[Parameter(ValueFromPipeline=$true)]
[array] $Messages,
[Parameter()] [ValidateSet("Error", "Warn", "Info")]
[string] $Level = "Info",
[Parameter()]
[Switch] $NoConsoleOut = $false,
[Parameter()]
[String] $ForegroundColor = 'White',
[Parameter()] [ValidateRange(1,30)]
[Int16] $Indent = 0,
[Parameter()]
[IO.FileInfo] $Path = ".\NuGet.log",
[Parameter()]
[Switch] $Clobber,
[Parameter()]
[String] $EventLogName,
[Parameter()]
[String] $EventSource,
[Parameter()]
[Int32] $EventID = 1
)
#endregion
Begin {}
Process {
$ErrorActionPreference = "Continue"
if ($Messages.Length -gt 0) {
try {
foreach($m in $Messages) {
if ($NoConsoleOut -eq $false) {
switch ($Level) {
'Error' {
Write-Error $m -ErrorAction SilentlyContinue
Write-Host ('{0}{1}' -f (" " * $Indent), $m) -ForegroundColor Red
}
'Warn' {
Write-Warning $m
}
'Info' {
Write-Host ('{0}{1}' -f (" " * $Indent), $m) -ForegroundColor $ForegroundColor
}
}
}
if ($m.Trim().Length -gt 0) {
$msg = '{0}{1} [{2}] : {3}' -f (" " * $Indent), (Get-Date -Format "yyyy-MM-dd HH:mm:ss"), $Level.ToUpper(), $m
if ($Clobber) {
$msg | Out-File -FilePath $Path -Force
} else {
$msg | Out-File -FilePath $Path -Append
}
}
if ($EventLogName) {
if (-not $EventSource) {
$EventSource = ([IO.FileInfo] $MyInvocation.ScriptName).Name
}
if(-not [Diagnostics.EventLog]::SourceExists($EventSource)) {
[Diagnostics.EventLog]::CreateEventSource($EventSource, $EventLogName)
}
$log = New-Object System.Diagnostics.EventLog
$log.set_log($EventLogName)
$log.set_source($EventSource)
switch ($Level) {
"Error" { $log.WriteEntry($Message, 'Error', $EventID) }
"Warn" { $log.WriteEntry($Message, 'Warning', $EventID) }
"Info" { $log.WriteEntry($Message, 'Information', $EventID) }
}
}
}
}
catch {
throw "Failed to create log entry in: '$Path'. The error was: '$_'."
}
}
}
End {}
<#
.SYNOPSIS
Writes logging information to screen and log file simultaneously.
.DESCRIPTION
Writes logging information to screen and log file simultaneously. Supports multiple log levels.
.PARAMETER Messages
The messages to be logged.
.PARAMETER Level
The type of message to be logged.
.PARAMETER NoConsoleOut
Specifies to not display the message to the console.
.PARAMETER ConsoleForeground
Specifies what color the text should be be displayed on the console. Ignored when switch 'NoConsoleOut' is specified.
.PARAMETER Indent
The number of spaces to indent the line in the log file.
.PARAMETER Path
The log file path.
.PARAMETER Clobber
Existing log file is deleted when this is specified.
.PARAMETER EventLogName
The name of the system event log, e.g. 'Application'.
.PARAMETER EventSource
The name to appear as the source attribute for the system event log entry. This is ignored unless 'EventLogName' is specified.
.PARAMETER EventID
The ID to appear as the event ID attribute for the system event log entry. This is ignored unless 'EventLogName' is specified.
.EXAMPLE
PS C:\> Write-Log -Message "It's all good!" -Path C:\MyLog.log -Clobber -EventLogName 'Application'
.EXAMPLE
PS C:\> Write-Log -Message "Oops, not so good!" -Level Error -EventID 3 -Indent 2 -EventLogName 'Application' -EventSource "My Script"
.INPUTS
System.String
.OUTPUTS
No output.
.NOTES
Revision History:
2011-03-10 : Andy Arismendi - Created.
#>
}
function Create-Process() {
param([string] $fileName, [string] $arguments)
$pinfo = New-Object System.Diagnostics.ProcessStartInfo
$pinfo.RedirectStandardError = $true
$pinfo.RedirectStandardOutput = $true
$pinfo.UseShellExecute = $false
$pinfo.FileName = $fileName
$pinfo.Arguments = $arguments
$p = New-Object System.Diagnostics.Process
$p.StartInfo = $pinfo
return $p
}
function HandlePublishError {
param([string] $ErrorMessage)
# Run NuGet Setup
$encodedMessage = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($ErrorMessage))
$setupTask = Start-Process PowerShell.exe "-ExecutionPolicy Unrestricted -File .\NuGetSetup.ps1 -Url $url -Base64EncodedMessage $encodedMessage" -Wait -PassThru
#Write-Log ("NuGet Setup Task Exit Code: " + $setupTask.ExitCode)
if ($setupTask.ExitCode -eq 0) {
# Try to push package again
$publishTask = Create-Process .\NuGet.exe ("push " + $_.Name + " -Source " + $url)
$publishTask.Start() | Out-Null
$publishTask.WaitForExit()
$output = ($publishTask.StandardOutput.ReadToEnd() -Split '[\r\n]') |? {$_}
$error = (($publishTask.StandardError.ReadToEnd() -Split '[\r\n]') |? {$_})
Write-Log $output
Write-Log $error Error
if ($publishTask.ExitCode -eq 0) {
$global:ExitCode = 0
}
}
elseif ($setupTask.ExitCode -eq 2) {
$global:ExitCode = 2
}
else {
$global:ExitCode = 0
}
}
function Publish {
Write-Log " "
Write-Log "Publishing package..." -ForegroundColor Green
# Get nuget config
[xml]$nugetConfig = Get-Content .\NuGet.Config
$nugetConfig.configuration.packageSources.add | ForEach-Object {
$url = $_.value
Write-Log "Repository Url: $url"
Write-Log " "
Get-ChildItem *.nupkg | Where-Object { $_.Name.EndsWith(".symbols.nupkg") -eq $false } | ForEach-Object {
# Try to push package
$task = Create-Process .\NuGet.exe ("push " + $_.Name + " -Source " + $url)
$task.Start() | Out-Null
$task.WaitForExit()
$output = ($task.StandardOutput.ReadToEnd() -Split '[\r\n]') |? { $_ }
$error = ($task.StandardError.ReadToEnd() -Split '[\r\n]') |? { $_ }
Write-Log $output
Write-Log $error Error
if ($task.ExitCode -gt 0) {
HandlePublishError -ErrorMessage $error
#Write-Log ("HandlePublishError() Exit Code: " + $global:ExitCode)
}
else {
$global:ExitCode = 0
}
}
}
}
Write-Log " "
Write-Log "NuGet Packager 2.0.3" -ForegroundColor Yellow
# Make sure the nuget executable is writable
Set-ItemProperty NuGet.exe -Name IsReadOnly -Value $false
# Make sure the nupkg files are writeable and create backup
if (Test-Path *.nupkg) {
Set-ItemProperty *.nupkg -Name IsReadOnly -Value $false
Write-Log " "
Write-Log "Creating backup..." -ForegroundColor Green
Get-ChildItem *.nupkg | ForEach-Object {
Move-Item $_.Name ($_.Name + ".bak") -Force
Write-Log ("Renamed " + $_.Name + " to " + $_.Name + ".bak")
}
}
Write-Log " "
Write-Log "Updating NuGet..." -ForegroundColor Green
Write-Log (Invoke-Command {.\NuGet.exe update -Self} -ErrorAction Stop)
Write-Log " "
Write-Log "Creating package..." -ForegroundColor Green
# Create symbols package if any .pdb files are located in the lib folder
If ((Get-ChildItem *.pdb -Path .\lib -Recurse).Count -gt 0) {
$packageTask = Create-Process .\NuGet.exe ("pack Package.nuspec -Symbol -Verbosity Detailed")
$packageTask.Start() | Out-Null
$packageTask.WaitForExit()
$output = ($packageTask.StandardOutput.ReadToEnd() -Split '[\r\n]') |? {$_}
$error = (($packageTask.StandardError.ReadToEnd() -Split '[\r\n]') |? {$_})
Write-Log $output
Write-Log $error Error
$global:ExitCode = $packageTask.ExitCode
}
Else {
$packageTask = Create-Process .\NuGet.exe ("pack Package.nuspec -Verbosity Detailed")
$packageTask.Start() | Out-Null
$packageTask.WaitForExit()
$output = ($packageTask.StandardOutput.ReadToEnd() -Split '[\r\n]') |? {$_}
$error = (($packageTask.StandardError.ReadToEnd() -Split '[\r\n]') |? {$_})
Write-Log $output
Write-Log $error Error
$global:ExitCode = $packageTask.ExitCode
}
# Check if package should be published
if ($Publish -and $global:ExitCode -eq 0) {
Publish
}
Write-Log " "
Write-Log "Exit Code: $global:ExitCode" -ForegroundColor Gray
$host.SetShouldExit($global:ExitCode)
Exit $global:ExitCode

208
Wire.Nuget/NuGetSetup.ps1 Normal file
Просмотреть файл

@ -0,0 +1,208 @@
Param (
[string]$Url,
[string]$Base64EncodedMessage
)
$ErrorActionPreference = "Stop"
$ExitCode = 1
function Write-Log {
#region Parameters
[cmdletbinding()]
Param(
[Parameter(ValueFromPipeline=$true)]
[array] $Messages,
[Parameter()] [ValidateSet("Error", "Warn", "Info")]
[string] $Level = "Info",
[Parameter()]
[Switch] $NoConsoleOut = $false,
[Parameter()]
[String] $ForegroundColor = 'White',
[Parameter()] [ValidateRange(1,30)]
[Int16] $Indent = 0,
[Parameter()]
[IO.FileInfo] $Path = ".\NuGet.log",
[Parameter()]
[Switch] $Clobber,
[Parameter()]
[String] $EventLogName,
[Parameter()]
[String] $EventSource,
[Parameter()]
[Int32] $EventID = 1
)
#endregion
Begin {}
Process {
$ErrorActionPreference = "Continue"
if ($Messages.Length -gt 0) {
try {
foreach($m in $Messages) {
if ($NoConsoleOut -eq $false) {
switch ($Level) {
'Error' {
Write-Error $m -ErrorAction SilentlyContinue
Write-Host ('{0}{1}' -f (" " * $Indent), $m) -ForegroundColor Red
}
'Warn' {
Write-Warning $m
}
'Info' {
Write-Host ('{0}{1}' -f (" " * $Indent), $m) -ForegroundColor $ForegroundColor
}
}
}
if ($m.Trim().Length -gt 0) {
$msg = '{0}{1} [{2}] : {3}' -f (" " * $Indent), (Get-Date -Format "yyyy-MM-dd HH:mm:ss"), $Level.ToUpper(), $m
if ($Clobber) {
$msg | Out-File -FilePath $Path -Force
} else {
$msg | Out-File -FilePath $Path -Append
}
}
if ($EventLogName) {
if (-not $EventSource) {
$EventSource = ([IO.FileInfo] $MyInvocation.ScriptName).Name
}
if(-not [Diagnostics.EventLog]::SourceExists($EventSource)) {
[Diagnostics.EventLog]::CreateEventSource($EventSource, $EventLogName)
}
$log = New-Object System.Diagnostics.EventLog
$log.set_log($EventLogName)
$log.set_source($EventSource)
switch ($Level) {
"Error" { $log.WriteEntry($Message, 'Error', $EventID) }
"Warn" { $log.WriteEntry($Message, 'Warning', $EventID) }
"Info" { $log.WriteEntry($Message, 'Information', $EventID) }
}
}
}
}
catch {
throw "Failed to create log entry in: '$Path'. The error was: '$_'."
}
}
}
End {}
<#
.SYNOPSIS
Writes logging information to screen and log file simultaneously.
.DESCRIPTION
Writes logging information to screen and log file simultaneously. Supports multiple log levels.
.PARAMETER Messages
The messages to be logged.
.PARAMETER Level
The type of message to be logged.
.PARAMETER NoConsoleOut
Specifies to not display the message to the console.
.PARAMETER ConsoleForeground
Specifies what color the text should be be displayed on the console. Ignored when switch 'NoConsoleOut' is specified.
.PARAMETER Indent
The number of spaces to indent the line in the log file.
.PARAMETER Path
The log file path.
.PARAMETER Clobber
Existing log file is deleted when this is specified.
.PARAMETER EventLogName
The name of the system event log, e.g. 'Application'.
.PARAMETER EventSource
The name to appear as the source attribute for the system event log entry. This is ignored unless 'EventLogName' is specified.
.PARAMETER EventID
The ID to appear as the event ID attribute for the system event log entry. This is ignored unless 'EventLogName' is specified.
.EXAMPLE
PS C:\> Write-Log -Message "It's all good!" -Path C:\MyLog.log -Clobber -EventLogName 'Application'
.EXAMPLE
PS C:\> Write-Log -Message "Oops, not so good!" -Level Error -EventID 3 -Indent 2 -EventLogName 'Application' -EventSource "My Script"
.INPUTS
System.String
.OUTPUTS
No output.
.NOTES
Revision History:
2011-03-10 : Andy Arismendi - Created.
#>
}
$choices = [System.Management.Automation.Host.ChoiceDescription[]](
(New-Object System.Management.Automation.Host.ChoiceDescription "&Add API Key","Add an API Key for this URL"),
(New-Object System.Management.Automation.Host.ChoiceDescription "&Skip","Skip pushing to this URL"))
Write-Output ""
Write-Log "Invalid API key for this repository URL, or there is a version conflict" Warn
If ($Base64EncodedMessage) {
Write-Warning ([System.Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($Base64EncodedMessage)))
}
$firstAnswer = $Host.UI.PromptForChoice(("Would you like to try adding an API key for " + $Url + "?"), "", $choices, (1))
if ($firstAnswer -eq 0) {
$fields = new-object "System.Collections.ObjectModel.Collection``1[[System.Management.Automation.Host.FieldDescription]]"
$f = New-Object System.Management.Automation.Host.FieldDescription "API Key for $Url"
$f.SetParameterType( [System.Security.SecureString] )
$f.HelpMessage = "Please enter API Key for $Url"
$f.Label = "&API Key for $Url"
$fields.Add($f)
$results = $Host.UI.Prompt( "Add API Key", "", $fields )
$pass = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($results["API Key for $Url"]))
# Add API Key to config file
Write-Log (.\NuGet.exe setApiKey $pass -Source $Url)
if ($LASTEXITCODE -le 0) {
$ExitCode = 0
}
}
else {
Write-Log "Skipping..."
$ExitCode = 2
}
$host.SetShouldExit($ExitCode)
Exit $ExitCode

42
Wire.Nuget/Package.nuspec Normal file
Просмотреть файл

@ -0,0 +1,42 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>Wire</id>
<version>0.0.1</version>
<title>Wire</title>
<authors>ralsing</authors>
<owners></owners>
<description>
Wire is a fast binary serializer, the internal format is similar to BSON.
The main features are high performance, sitting somewhere between protobuf.net and Json.NET.
Surrogate support, translate special objects into DTO's and back again.
Polymorphic values, Wire will store type information for all values to ensure that they are correctly deserialized into their original form.
</description>
<releaseNotes>
</releaseNotes>
<summary>
Wire is a fast binary serializer, the internal format is similar to BSON.
The main features are high performance, sitting somewhere between protobuf.net and Json.NET.
Surrogate support, translate special objects into DTO's and back again.
Polymorphic values, Wire will store type information for all values to ensure that they are correctly deserialized into their original form.
</summary>
<language>en-US</language>
<projectUrl>https://nuget.org/packages/Wire.Nuget</projectUrl>
<iconUrl>https://nuget.org/Content/Images/packageDefaultIcon-50x50.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<licenseUrl>http://opensource.org/licenses/Apache-2.0</licenseUrl>
<copyright>Copyright 2015</copyright>
<dependencies>
<group targetFramework="net45">
<!--<dependency id="log4net" version="1.2.10" />-->
</group>
</dependencies>
<references></references>
<tags></tags>
</metadata>
<files>
<file src="lib\Wire.dll" target="lib" />
<file src="tools\" target="tools" />
<file src="content\" target="content" />
</files>
</package>

Просмотреть файл

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Wire.Nuget")]
[assembly: AssemblyDescription("Project template made by EyeCatch (http://www.eyecatch.no/)")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Wire.Nuget")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("5b586874-8d3e-4137-9ba8-e982413416d5")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Просмотреть файл

@ -0,0 +1,88 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0451BAEF-DF2E-4B98-8644-94EE9415E389}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wire.Nuget</RootNamespace>
<AssemblyName>Wire.Nuget</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputPath>bin\Release\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="NuGetPackage.ps1" />
<None Include="NuGetSetup.ps1" />
<None Include="NuGet.exe" />
<None Include="NuGet.config" />
<None Include="Package.nuspec">
<SubType>Designer</SubType>
</None>
<None Include="tools\init.ps1" />
<None Include="tools\install.ps1" />
<None Include="tools\uninstall.ps1" />
</ItemGroup>
<ItemGroup>
<Folder Include="content\" />
<Folder Include="lib\" />
<Folder Include="src\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>-->
<Target Name="AfterBuild">
<Delete Files=".\NuGet.log" />
<Exec WorkingDirectory="$(MSBuildProjectDirectory)" Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " ContinueOnError="True" Command="PowerShell.exe -NoProfile -NonInteractive -WindowStyle Hidden -ExecutionPolicy Unrestricted -Command &quot;&amp; {.\NuGetPackage.ps1} &quot;" IgnoreExitCode="true">
<Output TaskParameter="ExitCode" PropertyName="ExitCode" />
</Exec>
<Exec WorkingDirectory="$(MSBuildProjectDirectory)" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " ContinueOnError="True" Command="PowerShell.exe -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command &quot;&amp; {.\NuGetPackage.ps1 -Publish} &quot;" IgnoreExitCode="true">
<Output TaskParameter="ExitCode" PropertyName="ExitCode" />
</Exec>
<Message Text=" " Importance="High" />
<Message Text="Build Exit Code: $(ExitCode)" Importance="High" />
<Error Text="Encountered error(s) when creating package.%0aCheck the NuGet.log file for details." Condition=" '$(ExitCode)' == '1' " File="NuGet.log" />
<Error Text="Created package but encountered error(s) when trying to publish it.%0aCheck the NuGet.log file for details." Condition=" '$(Configuration)|$(Platform)|$(ExitCode)' == 'Release|AnyCPU|2' " File="NuGet.log" />
<Message Text="SUCCESS: Created package." Condition=" '$(Configuration)|$(Platform)|$(ExitCode)' == 'Debug|AnyCPU|0' " Importance="High" />
<Message Text="SUCCESS: Published package." Condition=" '$(Configuration)|$(Platform)|$(ExitCode)' == 'Release|AnyCPU|0' " Importance="High" />
</Target>
</Project>

Просмотреть файл

@ -0,0 +1,8 @@
# Runs the first time a package is installed in a solution, and every time the solution is opened.
param($installPath, $toolsPath, $package, $project)
# $installPath is the path to the folder where the package is installed.
# $toolsPath is the path to the tools directory in the folder where the package is installed.
# $package is a reference to the package object.
# $project is null in init.ps1

Просмотреть файл

@ -0,0 +1,8 @@
# Runs every time a package is installed in a project
param($installPath, $toolsPath, $package, $project)
# $installPath is the path to the folder where the package is installed.
# $toolsPath is the path to the tools directory in the folder where the package is installed.
# $package is a reference to the package object.
# $project is a reference to the project the package was installed to.

Просмотреть файл

@ -0,0 +1,8 @@
# Runs every time a package is uninstalled
param($installPath, $toolsPath, $package, $project)
# $installPath is the path to the folder where the package is installed.
# $toolsPath is the path to the tools directory in the folder where the package is installed.
# $package is a reference to the package object.
# $project is a reference to the project the package was installed to.

Просмотреть файл

@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wire.Tests", "Wire.Tests\Wi
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wire.PerfTest", "Wire.PerfTest\Wire.PerfTest.csproj", "{35352664-E867-48EC-A0B1-39013CA42FE0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wire.Nuget", "Wire.Nuget\Wire.Nuget.csproj", "{0451BAEF-DF2E-4B98-8644-94EE9415E389}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -27,6 +29,9 @@ Global
{35352664-E867-48EC-A0B1-39013CA42FE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35352664-E867-48EC-A0B1-39013CA42FE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{35352664-E867-48EC-A0B1-39013CA42FE0}.Release|Any CPU.Build.0 = Release|Any CPU
{0451BAEF-DF2E-4B98-8644-94EE9415E389}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0451BAEF-DF2E-4B98-8644-94EE9415E389}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0451BAEF-DF2E-4B98-8644-94EE9415E389}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Просмотреть файл

@ -32,14 +32,6 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="Akka, Version=1.0.4.12, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Akka.1.0.4\lib\net45\Akka.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
@ -87,6 +79,9 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)Wire.Nuget\lib\" /Y /I</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

Просмотреть файл

@ -1,6 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Akka" version="1.0.4" targetFramework="net45" userInstalled="true" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" userInstalled="true" />
</packages>