Permalink
Browse files

added sqlserver compact and nugetpowertools package

  • Loading branch information...
1 parent 68c5281 commit f9ea7364f266d4cfb5c9103a343b7de915ed136a @iloire committed Dec 29, 2011
Showing with 1,246 additions and 0 deletions.
  1. BIN packages/NuGetPowerTools.0.29/NuGetPowerTools.0.29.nupkg
  2. +121 −0 packages/NuGetPowerTools.0.29/tools/MSBuild.psm1
  3. +175 −0 packages/NuGetPowerTools.0.29/tools/NuGetMSBuild.psm1
  4. +78 −0 packages/NuGetPowerTools.0.29/tools/NuGetPowerTools.psd1
  5. 0 packages/NuGetPowerTools.0.29/tools/NuGetPowerTools.psm1
  6. +28 −0 packages/NuGetPowerTools.0.29/tools/VS.psm1
  7. +14 −0 packages/NuGetPowerTools.0.29/tools/init.ps1
  8. +8 −0 packages/SqlServerCompact.4.0.8482.1/Content/web.config.transform
  9. +6 −0 ...s/SqlServerCompact.4.0.8482.1/NativeBinaries/amd64/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest
  10. BIN packages/SqlServerCompact.4.0.8482.1/NativeBinaries/amd64/Microsoft.VC90.CRT/README_ENU.txt
  11. BIN packages/SqlServerCompact.4.0.8482.1/NativeBinaries/amd64/Microsoft.VC90.CRT/msvcr90.dll
  12. BIN packages/SqlServerCompact.4.0.8482.1/NativeBinaries/amd64/sqlcecompact40.dll
  13. BIN packages/SqlServerCompact.4.0.8482.1/NativeBinaries/amd64/sqlceer40EN.dll
  14. BIN packages/SqlServerCompact.4.0.8482.1/NativeBinaries/amd64/sqlceme40.dll
  15. BIN packages/SqlServerCompact.4.0.8482.1/NativeBinaries/amd64/sqlceqp40.dll
  16. BIN packages/SqlServerCompact.4.0.8482.1/NativeBinaries/amd64/sqlcese40.dll
  17. +6 −0 ...ges/SqlServerCompact.4.0.8482.1/NativeBinaries/x86/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest
  18. BIN packages/SqlServerCompact.4.0.8482.1/NativeBinaries/x86/Microsoft.VC90.CRT/README_ENU.txt
  19. BIN packages/SqlServerCompact.4.0.8482.1/NativeBinaries/x86/Microsoft.VC90.CRT/msvcr90.dll
  20. BIN packages/SqlServerCompact.4.0.8482.1/NativeBinaries/x86/sqlcecompact40.dll
  21. BIN packages/SqlServerCompact.4.0.8482.1/NativeBinaries/x86/sqlceer40EN.dll
  22. BIN packages/SqlServerCompact.4.0.8482.1/NativeBinaries/x86/sqlceme40.dll
  23. BIN packages/SqlServerCompact.4.0.8482.1/NativeBinaries/x86/sqlceqp40.dll
  24. BIN packages/SqlServerCompact.4.0.8482.1/NativeBinaries/x86/sqlcese40.dll
  25. +778 −0 packages/SqlServerCompact.4.0.8482.1/SQLCE_EULA_ENU.rtf
  26. BIN packages/SqlServerCompact.4.0.8482.1/SqlServerCompact.4.0.8482.1.nupkg
  27. +12 −0 packages/SqlServerCompact.4.0.8482.1/Tools/GetSqlCEPostBuildCmd.ps1
  28. +11 −0 packages/SqlServerCompact.4.0.8482.1/Tools/install.ps1
  29. +9 −0 packages/SqlServerCompact.4.0.8482.1/Tools/uninstall.ps1
  30. BIN packages/SqlServerCompact.4.0.8482.1/lib/System.Data.SqlServerCe.dll
Binary file not shown.
@@ -0,0 +1,121 @@
+function Resolve-ProjectName {
+ param(
+ [parameter(ValueFromPipelineByPropertyName = $true)]
+ [string[]]$ProjectName
+ )
+
+ if($ProjectName) {
+ $projects = Get-Project $ProjectName
+ }
+ else {
+ # All projects by default
+ $projects = Get-Project
+ }
+
+ $projects
+}
+
+function Get-MSBuildProject {
+ param(
+ [parameter(ValueFromPipelineByPropertyName = $true)]
+ [string[]]$ProjectName
+ )
+ Process {
+ (Resolve-ProjectName $ProjectName) | % {
+ $path = $_.FullName
+ @([Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($path))[0]
+ }
+ }
+}
+
+function Add-Import {
+ param(
+ [parameter(Position = 0, Mandatory = $true)]
+ [string]$Path,
+ [parameter(Position = 1, ValueFromPipelineByPropertyName = $true)]
+ [string[]]$ProjectName
+ )
+ Process {
+ (Resolve-ProjectName $ProjectName) | %{
+ $buildProject = $_ | Get-MSBuildProject
+ $buildProject.Xml.AddImport($Path)
+ $_.Save()
+ }
+ }
+}
+
+function Set-MSBuildProperty {
+ param(
+ [parameter(Position = 0, Mandatory = $true)]
+ $PropertyName,
+ [parameter(Position = 1, Mandatory = $true)]
+ $PropertyValue,
+ [parameter(Position = 2, ValueFromPipelineByPropertyName = $true)]
+ [string[]]$ProjectName
+ )
+ Process {
+ (Resolve-ProjectName $ProjectName) | %{
+ $buildProject = $_ | Get-MSBuildProject
+ $buildProject.SetProperty($PropertyName, $PropertyValue) | Out-Null
+ $_.Save()
+ }
+ }
+}
+
+function Get-MSBuildProperty {
+ param(
+ [parameter(Position = 0, Mandatory = $true)]
+ $PropertyName,
+ [parameter(Position = 2, ValueFromPipelineByPropertyName = $true)]
+ [string]$ProjectName
+ )
+
+ $buildProject = Get-MSBuildProject $ProjectName
+ $buildProject.GetProperty($PropertyName)
+}
+
+function Add-SolutionDirProperty {
+ param(
+ [parameter(ValueFromPipelineByPropertyName = $true)]
+ [string[]]$ProjectName
+ )
+
+ (Resolve-ProjectName $ProjectName) | %{
+ $buildProject = $_ | Get-MSBuildProject
+
+ if(!($buildProject.Xml.Properties | ?{ $_.Name -eq 'SolutionDir' })) {
+ # Get the relative path to the solution
+ $relativeSolutionPath = [NuGet.PathUtility]::GetRelativePath($_.FullName, $dte.Solution.Properties.Item("Path").Value)
+ $relativeSolutionPath = [IO.Path]::GetDirectoryName($relativeSolutionPath)
+ $relativeSolutionPath = [NuGet.PathUtility]::EnsureTrailingSlash($relativeSolutionPath)
+
+ $solutionDirProperty = $buildProject.Xml.AddProperty("SolutionDir", $relativeSolutionPath)
+ $solutionDirProperty.Condition = '$(SolutionDir) == '''' Or $(SolutionDir) == ''*Undefined*'''
+ $_.Save()
+ }
+ }
+}
+
+
+'Set-MSBuildProperty', 'Add-SolutionDirProperty', 'Add-Import','Add-SolutionDirProperty' | %{
+ Register-TabExpansion $_ @{
+ ProjectName = { Get-Project -All | Select -ExpandProperty Name }
+ }
+}
+
+Register-TabExpansion 'Get-MSBuildProperty' @{
+ ProjectName = { Get-Project -All | Select -ExpandProperty Name }
+ PropertyName = {param($context)
+ if($context.ProjectName) {
+ $buildProject = Get-MSBuildProject $context.ProjectName
+ }
+
+ if(!$buildProject) {
+ $buildProject = Get-MSBuildProject
+ }
+
+ $buildProject.Xml.Properties | Sort Name | Select -ExpandProperty Name -Unique
+ }
+}
+
+Export-ModuleMember Get-MSBuildProject, Add-SolutionDirProperty, Add-Import, Get-MSBuildProperty, Set-MSBuildProperty
@@ -0,0 +1,175 @@
+function Resolve-ProjectName {
+ param(
+ [parameter(ValueFromPipelineByPropertyName = $true)]
+ [string[]]$ProjectName
+ )
+
+ if($ProjectName) {
+ $projects = Get-Project $ProjectName
+ }
+ else {
+ # All projects by default
+ $projects = Get-Project -All
+ }
+
+ $projects
+}
+
+function Get-InstallPath {
+ param(
+ $package
+ )
+ # Get the repository path
+ $componentModel = Get-VSComponentModel
+ $repositorySettings = $componentModel.GetService([NuGet.VisualStudio.IRepositorySettings])
+ $pathResolver = New-Object NuGet.DefaultPackagePathResolver($repositorySettings.RepositoryPath)
+ $pathResolver.GetInstallPath($package)
+}
+
+function Ensure-NuGetBuild {
+ # Install the nuget command line if it doesn't exist
+ $solutionDir = Get-SolutionDir
+ $nugetToolsPath = (Join-Path $solutionDir .nuget)
+
+ if(!(Test-Path $nugetToolsPath) -or !(Get-ChildItem $nugetToolsPath)) {
+ Install-Package NuGet.Build -Source 'https://go.microsoft.com/fwlink/?LinkID=206669'
+
+ $nugetBuildPackage = @(Get-Package NuGet.Build)[0]
+ $nugetExePackage = @(Get-Package NuGet.CommandLine)[0]
+
+ if(!$nugetBuildPackage -and !$nugetExePackage) {
+ return $false
+ }
+
+ # Get the package path
+ $nugetBuildPath = Get-InstallPath $nugetBuildPackage
+ $nugetExePath = Get-InstallPath $nugetExePackage
+
+ if(!(Test-Path $nugetToolsPath)) {
+ mkdir $nugetToolsPath | Out-Null
+ }
+
+ Write-Host "Copying nuget.exe and msbuild scripts to $nugetToolsPath"
+
+ Copy-Item "$nugetBuildPath\tools\*.*" $nugetToolsPath -Force | Out-Null
+ Copy-Item "$nugetExePath\tools\*.*" $nugetToolsPath -Force | Out-Null
+ Uninstall-Package NuGet.Build -RemoveDependencies
+
+ Write-Host "Don't forget to commit the .nuget folder"
+ }
+
+ return $true
+}
+
+function Add-NuGetTargets {
+ param(
+ [parameter(ValueFromPipelineByPropertyName = $true)]
+ [string[]]$ProjectName
+ )
+ Process {
+ if($ProjectName) {
+ $projects = Get-Project $ProjectName
+ }
+ else {
+ # All projects by default
+ $projects = Get-Project -All
+ }
+
+ if(!$projects) {
+ Write-Error "Unable to locate project. Make sure it isn't unloaded."
+ return
+ }
+
+ $targetsPath = '$(SolutionDir)\.nuget\NuGet.targets'
+
+ $projects | %{
+ $project = $_
+ try {
+ if($project.Type -eq 'Web Site') {
+ Write-Warning "Skipping '$($project.Name)', Website projects are not supported"
+ return
+ }
+
+ if(!$initialized) {
+ # Make sure the nuget tools exists
+ $initialized = Ensure-NuGetBuild
+ }
+
+ $project | Add-SolutionDirProperty
+
+ $buildProject = $project | Get-MSBuildProject
+ if(!($buildProject.Xml.Imports | ?{ $_.Project -eq $targetsPath } )) {
+ $buildProject.Xml.AddImport($targetsPath) | Out-Null
+ $project.Save()
+ $buildProject.ReevaluateIfNecessary()
+
+ "Updated '$($project.Name)' to use 'NuGet.targets'"
+ }
+ }
+ catch {
+ Write-Warning "Failed to add import 'NuGet.targets' to $($project.Name)"
+ }
+ }
+ }
+}
+
+function Enable-PackageRestore {
+ param(
+ [parameter(ValueFromPipelineByPropertyName = $true)]
+ [string[]]$ProjectName
+ )
+
+ # Add the nuget targets on demand
+ Add-NuGetTargets $ProjectName
+
+ (Resolve-ProjectName $ProjectName) | %{
+ $_ | Set-MSBuildProperty RestorePackages true
+ "Enabled package restore for $($_.Name)"
+ }
+}
+
+function Disable-PackageRestore {
+ param(
+ [parameter(ValueFromPipelineByPropertyName = $true)]
+ [string[]]$ProjectName
+ )
+ (Resolve-ProjectName $ProjectName) | %{
+ $_ | Set-MSBuildProperty RestorePackages false
+ "Disabled package restore for $($_.Name)"
+ }
+}
+
+function Enable-PackageBuild {
+ param(
+ [parameter(ValueFromPipelineByPropertyName = $true)]
+ [string[]]$ProjectName
+ )
+
+ # Add the nuget targets on demand
+ Add-NuGetTargets $ProjectName
+
+ (Resolve-ProjectName $ProjectName) | %{
+ $_ | Set-MSBuildProperty BuildPackage true
+ "Enabled package build for $($_.Name)"
+ }
+}
+
+function Disable-PackageBuild {
+ param(
+ [parameter(ValueFromPipelineByPropertyName = $true)]
+ [string[]]$ProjectName
+ )
+ (Resolve-ProjectName $ProjectName) | %{
+ $_ | Set-MSBuildProperty BuildPackage false
+ "Disabled package build for $($_.Name)"
+ }
+}
+
+# Statement completion for project names
+'Enable-PackageRestore', 'Disable-PackageRestore', 'Enable-PackageBuild', 'Disable-PackageBuild' | %{
+ Register-TabExpansion $_ @{
+ ProjectName = { Get-Project -All | Select -ExpandProperty Name }
+ }
+}
+
+Export-ModuleMember Enable-PackageRestore, Disable-PackageRestore, Enable-PackageBuild, Disable-PackageBuild
@@ -0,0 +1,78 @@
+@{
+
+# Script module or binary module file associated with this manifest
+ModuleToProcess = 'NuGetPowerTools.psm1'
+
+# Version number of this module.
+ModuleVersion = '0.1'
+
+# ID used to uniquely identify this module
+GUID = '0093ae2d-89e4-494c-81a6-35881fafb6f2'
+
+# Author of this module
+Author = 'David Fowler'
+
+# Company or vendor of this module
+CompanyName = 'Outercurve Foundation'
+
+# Copyright statement for this module
+Copyright = '(c) 2011 Outercurve Foundation. All rights reserved.'
+
+# Description of the functionality provided by this module
+Description = 'This module provide some powershell goodies that makes working with nuget even easier'
+
+# Minimum version of the Windows PowerShell engine required by this module
+PowerShellVersion = '2.0'
+
+# Name of the Windows PowerShell host required by this module
+PowerShellHostName = 'Package Manager Host'
+
+# Minimum version of the Windows PowerShell host required by this module
+PowerShellHostVersion = '1.2'
+
+# Minimum version of the .NET Framework required by this module
+DotNetFrameworkVersion = '4.0'
+
+# Minimum version of the common language runtime (CLR) required by this module
+CLRVersion = ''
+
+# Processor architecture (None, X86, Amd64, IA64) required by this module
+ProcessorArchitecture = ''
+
+# Modules that must be imported into the global environment prior to importing this module
+RequiredModules = @()
+
+# Assemblies that must be loaded prior to importing this module
+RequiredAssemblies = @()
+
+# Script files (.ps1) that are run in the caller's environment prior to importing this module
+ScriptsToProcess = @()
+
+# Type files (.ps1xml) to be loaded when importing this module
+TypesToProcess = @()
+
+# Format files (.ps1xml) to be loaded when importing this module
+FormatsToProcess = @()
+
+# Modules to import as nested modules of the module specified in ModuleToProcess
+NestedModules = @('VS.psm1', 'MSBuild.psm1', 'NuGetMSBuild.psm1')
+
+# Functions to export from this module
+FunctionsToExport = '*'
+
+# Cmdlets to export from this module
+CmdletsToExport = ''
+
+# Variables to export from this module
+VariablesToExport = ''
+
+# Aliases to export from this module
+AliasesToExport = ''
+
+# List of all files packaged with this module
+FileList = @()
+
+# Private data to pass to the module specified in ModuleToProcess
+PrivateData = ''
+
+}
Oops, something went wrong.

0 comments on commit f9ea736

Please sign in to comment.