├── .gitignore
├── ManagePackageSource
├── ManagePackageSource.nuspec
└── tools
│ ├── ManagePackageSources.psd1
│ ├── ManagePackageSources.psm1
│ └── init.ps1
├── NuSpec
├── NuSpec.nuspec
└── tools
│ ├── NuSpec.psd1
│ ├── NuSpec.psm1
│ ├── NuSpecTemplate.xml
│ ├── init.ps1
│ └── nuspec.xsd
├── README.md
└── license.txt
/.gitignore:
--------------------------------------------------------------------------------
1 | # Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
2 | bin
3 | obj
4 |
5 | # mstest test results
6 | TestResults
7 |
8 | # NuGet packages
9 | *.nupkg
--------------------------------------------------------------------------------
/ManagePackageSource/ManagePackageSource.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 0.1.0
5 | Maarten Balliauw,Xavier Decoster
6 | MyGet
7 | ManagePackageSource
8 | false
9 | Manage NuGet package sources from the NuGet PowerShell Console
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/ManagePackageSource/tools/ManagePackageSources.psd1:
--------------------------------------------------------------------------------
1 | @{
2 |
3 | # Script module or binary module file associated with this manifest
4 | ModuleToProcess = 'ManagePackageSources.psm1'
5 |
6 | # Version number of this module.
7 | ModuleVersion = '0.1'
8 |
9 | # ID used to uniquely identify this module
10 | GUID = '0012ae2A-89e4-414c-81a6-31861bafb6f2'
11 |
12 | # Author of this module
13 | Author = 'Maarten Balliauw'
14 |
15 | # Company or vendor of this module
16 | CompanyName = ''
17 |
18 | # Copyright statement for this module
19 | Copyright = '(c) 2011 Maarten Balliauw. All rights reserved.'
20 |
21 | # Description of the functionality provided by this module
22 | Description = 'Manage NuGet package sources from the NuGet PowerShell Console'
23 |
24 | # Minimum version of the Windows PowerShell engine required by this module
25 | PowerShellVersion = '2.0'
26 |
27 | # Name of the Windows PowerShell host required by this module
28 | PowerShellHostName = 'Package Manager Host'
29 |
30 | # Minimum version of the Windows PowerShell host required by this module
31 | PowerShellHostVersion = '1.2'
32 |
33 | # Minimum version of the .NET Framework required by this module
34 | DotNetFrameworkVersion = '4.0'
35 |
36 | # Minimum version of the common language runtime (CLR) required by this module
37 | CLRVersion = ''
38 |
39 | # Processor architecture (None, X86, Amd64, IA64) required by this module
40 | ProcessorArchitecture = ''
41 |
42 | # Modules that must be imported into the global environment prior to importing this module
43 | RequiredModules = @()
44 |
45 | # Assemblies that must be loaded prior to importing this module
46 | RequiredAssemblies = @()
47 |
48 | # Script files (.ps1) that are run in the caller's environment prior to importing this module
49 | ScriptsToProcess = @()
50 |
51 | # Type files (.ps1xml) to be loaded when importing this module
52 | TypesToProcess = @()
53 |
54 | # Format files (.ps1xml) to be loaded when importing this module
55 | FormatsToProcess = @()
56 |
57 | # Modules to import as nested modules of the module specified in ModuleToProcess
58 | NestedModules = @('ManagePackageSources.psm1')
59 |
60 | # Functions to export from this module
61 | FunctionsToExport = '*'
62 |
63 | # Cmdlets to export from this module
64 | CmdletsToExport = ''
65 |
66 | # Variables to export from this module
67 | VariablesToExport = ''
68 |
69 | # Aliases to export from this module
70 | AliasesToExport = ''
71 |
72 | # List of all files packaged with this module
73 | FileList = @()
74 |
75 | # Private data to pass to the module specified in ModuleToProcess
76 | PrivateData = ''
77 |
78 | }
--------------------------------------------------------------------------------
/ManagePackageSource/tools/ManagePackageSources.psm1:
--------------------------------------------------------------------------------
1 | function Get-PackageSource {
2 | param(
3 | [parameter(Mandatory = $false)]
4 | [string]$Name
5 | )
6 |
7 | $configuration = Get-Content "$env:AppData\NuGet\NuGet.config"
8 | $configurationXml = [xml]$configuration
9 |
10 | if ($Name -ne $null -and $Name -ne "") {
11 | return $configurationXml.configuration.packageSources.add | where { $_.key -eq $Name} | Format-Table @{Label="Name"; Expression={$_.key}}, @{Label="Source"; Expression={$_.value}}
12 | } else {
13 | return $configurationXml.configuration.packageSources.add | Format-Table @{Label="Name"; Expression={$_.key}}, @{Label="Source"; Expression={$_.value}}
14 | }
15 | }
16 |
17 | function Add-PackageSource {
18 | param(
19 | [parameter(Mandatory = $true)]
20 | [string]$Name,
21 | [parameter(Mandatory = $true)]
22 | [string]$Source
23 | )
24 |
25 | $configuration = Get-Content "$env:AppData\NuGet\NuGet.config"
26 | $configurationXml = [xml]$configuration
27 |
28 | $sourceToAdd = $configurationXml.createElement("add")
29 | $sourceToAdd.SetAttribute("key", $Name);
30 | $sourceToAdd.SetAttribute("value", $Source);
31 |
32 | $configurationXml.configuration.packageSources.appendChild($sourceToAdd)
33 |
34 | $configurationXml.save("$env:AppData\NuGet\NuGet.config");
35 |
36 | return $Name
37 | }
38 |
39 | function Remove-PackageSource {
40 | param(
41 | [parameter(Mandatory = $true)]
42 | [string]$Name
43 | )
44 |
45 | $configuration = Get-Content "$env:AppData\NuGet\NuGet.config"
46 | $configurationXml = [xml]$configuration
47 |
48 | $node = $configurationXml.SelectSingleNode("//packageSources/add[@key='$Name']")
49 | [Void]$node.ParentNode.RemoveChild($node)
50 |
51 | $configurationXml.save("$env:AppData\NuGet\NuGet.config");
52 | }
53 |
54 | function Set-ActivePackageSource {
55 | param(
56 | [parameter(Mandatory = $true)]
57 | [string]$Name
58 | )
59 |
60 | $configuration = Get-Content "$env:AppData\NuGet\NuGet.config"
61 | $configurationXml = [xml]$configuration
62 |
63 | $node = $configurationXml.SelectSingleNode("//packageSources/add[@key='$Name']").clone()
64 |
65 | $activeNode = $configurationXml.SelectSingleNode("//activePackageSource")
66 | $activeNode.innerXML = ""
67 | $activeNode.appendChild($node)
68 |
69 | $configurationXml.save("$env:AppData\NuGet\NuGet.config");
70 | }
71 |
72 | Export-ModuleMember *
--------------------------------------------------------------------------------
/ManagePackageSource/tools/init.ps1:
--------------------------------------------------------------------------------
1 | param($installPath, $toolsPath, $package, $project)
2 |
3 | $psd = (Join-Path $toolsPath ManagePackageSources.psd1)
4 | $psm = (Join-Path $toolsPath ManagePackageSources.psm1)
5 |
6 | # Check if the NuGet_profile.ps1 exists and register the ManagePackageSources.psd1 module
7 | if(!(Test-Path $profile)){
8 | mkdir -force (Split-Path $profile)
9 | New-Item $profile -Type file -Value "Import-Module ManagePackageSources -DisableNameChecking"
10 | }
11 | else{
12 | Add-Content -Path $profile -Value "`r`nImport-Module ManagePackageSources -DisableNameChecking"
13 | }
14 |
15 | # Copy the ManagePackageSources.psd1 and ManagePackageSources.psm1 files to the profile directory
16 | $profileDirectory = Split-Path $profile -parent
17 | $profileModulesDirectory = (Join-Path $profileDirectory "Modules")
18 | $managePackageSourcesModuleDir = (Join-Path $profileModulesDirectory "ManagePackageSources")
19 | if(!(Test-Path $managePackageSourcesModuleDir)){
20 | mkdir -force $managePackageSourcesModuleDir
21 | }
22 | copy $psd (Join-Path $managePackageSourcesModuleDir "ManagePackageSources.psd1")
23 | copy $psm (Join-Path $managePackageSourcesModuleDir "ManagePackageSources.psm1")
24 |
25 | # Reload NuGet PowerShell profile
26 | . $profile
27 |
28 | Write-Host ""
29 | Write-Host "*************************************************************************************"
30 | Write-Host "Congratulations! The following additional commands have been installed into your"
31 | Write-Host "NuGet PowerShell Profile and are now always available in this console:"
32 | Write-Host "- Get-PackageSource"
33 | Write-Host "- Add-PackageSource"
34 | Write-Host "- Remove-PackageSource"
35 | Write-Host "- Set-ActivePackageSource"
36 | Write-Host "*************************************************************************************"
37 | Write-Host ""
--------------------------------------------------------------------------------
/NuSpec/NuSpec.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | NuSpec
5 | 3.0.0
6 | Xavier Decoster
7 | MyGet
8 | https://github.com/myget/NuGetPackages/blob/master/license.txt
9 | https://github.com/myget/NuGetPackages
10 | false
11 | Powershell cmdlet that makes working with NuSpec files easier!
12 | Support for NuGet v2.7 Package Restore
13 |
14 |
--------------------------------------------------------------------------------
/NuSpec/tools/NuSpec.psd1:
--------------------------------------------------------------------------------
1 | @{
2 |
3 | # Script module or binary module file associated with this manifest
4 | ModuleToProcess = 'NuSpec.psm1'
5 |
6 | # Version number of this module.
7 | ModuleVersion = '2.0'
8 |
9 | # ID used to uniquely identify this module
10 | GUID = '6FA48925-78C1-43CB-9243-5FDB52F76434'
11 |
12 | # Author of this module
13 | Author = 'Xavier Decoster'
14 |
15 | # Company or vendor of this module
16 | CompanyName = 'MyGet'
17 |
18 | # Copyright statement for this module
19 | Copyright = '(c) 2012 MyGet. All rights reserved.'
20 |
21 | # Description of the functionality provided by this module
22 | Description = 'This module provides a powershell cmdlet that makes working with nuspec files easier'
23 |
24 | # Minimum version of the Windows PowerShell engine required by this module
25 | PowerShellVersion = '2.0'
26 |
27 | # Name of the Windows PowerShell host required by this module
28 | PowerShellHostName = 'Package Manager Host'
29 |
30 | # Minimum version of the Windows PowerShell host required by this module
31 | PowerShellHostVersion = '1.2'
32 |
33 | # Minimum version of the .NET Framework required by this module
34 | DotNetFrameworkVersion = '4.0'
35 |
36 | # Minimum version of the common language runtime (CLR) required by this module
37 | CLRVersion = ''
38 |
39 | # Processor architecture (None, X86, Amd64, IA64) required by this module
40 | ProcessorArchitecture = ''
41 |
42 | # Modules that must be imported into the global environment prior to importing this module
43 | RequiredModules = @()
44 |
45 | # Assemblies that must be loaded prior to importing this module
46 | RequiredAssemblies = @()
47 |
48 | # Script files (.ps1) that are run in the caller's environment prior to importing this module
49 | ScriptsToProcess = @()
50 |
51 | # Type files (.ps1xml) to be loaded when importing this module
52 | TypesToProcess = @()
53 |
54 | # Format files (.ps1xml) to be loaded when importing this module
55 | FormatsToProcess = @()
56 |
57 | # Modules to import as nested modules of the module specified in ModuleToProcess
58 | NestedModules = @('NuSpec.psm1')
59 |
60 | # Functions to export from this module
61 | FunctionsToExport = '*'
62 |
63 | # Cmdlets to export from this module
64 | CmdletsToExport = ''
65 |
66 | # Variables to export from this module
67 | VariablesToExport = ''
68 |
69 | # Aliases to export from this module
70 | AliasesToExport = ''
71 |
72 | # List of all files packaged with this module
73 | FileList = @()
74 |
75 | # Private data to pass to the module specified in ModuleToProcess
76 | PrivateData = ''
77 |
78 | }
--------------------------------------------------------------------------------
/NuSpec/tools/NuSpec.psm1:
--------------------------------------------------------------------------------
1 | function Get-SolutionDir {
2 | if($dte.Solution -and $dte.Solution.IsOpen) {
3 | return Split-Path $dte.Solution.Properties.Item("Path").Value
4 | }
5 | else {
6 | throw "Solution not avaliable"
7 | }
8 | }
9 |
10 | function Resolve-ProjectName {
11 | param(
12 | [parameter(ValueFromPipelineByPropertyName = $true)]
13 | [string[]]$ProjectName
14 | )
15 |
16 | if($ProjectName) {
17 | $projects = Get-Project $ProjectName
18 | }
19 | else {
20 | # All projects by default
21 | $projects = Get-Project -All
22 | }
23 |
24 | $projects
25 | }
26 |
27 | function Get-MSBuildProject {
28 | param(
29 | [parameter(ValueFromPipelineByPropertyName = $true)]
30 | [string[]]$ProjectName
31 | )
32 | Process {
33 | (Resolve-ProjectName $ProjectName) | % {
34 | $path = $_.FullName
35 | @([Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($path))[0]
36 | }
37 | }
38 | }
39 |
40 | function Set-MSBuildProperty {
41 | param(
42 | [parameter(Position = 0, Mandatory = $true)]
43 | $PropertyName,
44 | [parameter(Position = 1, Mandatory = $true)]
45 | $PropertyValue,
46 | [parameter(Position = 2, ValueFromPipelineByPropertyName = $true)]
47 | [string[]]$ProjectName
48 | )
49 | Process {
50 | (Resolve-ProjectName $ProjectName) | %{
51 | $buildProject = $_ | Get-MSBuildProject
52 | $buildProject.SetProperty($PropertyName, $PropertyValue) | Out-Null
53 | $_.Save()
54 | }
55 | }
56 | }
57 |
58 | function Get-MSBuildProperty {
59 | param(
60 | [parameter(Position = 0, Mandatory = $true)]
61 | $PropertyName,
62 | [parameter(Position = 2, ValueFromPipelineByPropertyName = $true)]
63 | [string]$ProjectName
64 | )
65 |
66 | $buildProject = Get-MSBuildProject $ProjectName
67 | $buildProject.GetProperty($PropertyName)
68 | }
69 |
70 | function Install-NuSpec {
71 | param(
72 | [parameter(ValueFromPipelineByPropertyName = $true)]
73 | [string[]]$ProjectName,
74 | [switch]$EnableIntelliSense,
75 | [string]$TemplatePath
76 | )
77 |
78 | Process {
79 |
80 | $projects = (Resolve-ProjectName $ProjectName)
81 |
82 | if(!$projects) {
83 | Write-Error "Unable to locate project. Make sure it isn't unloaded."
84 | return
85 | }
86 |
87 | $profileDirectory = Split-Path $profile -parent
88 | $profileModulesDirectory = (Join-Path $profileDirectory "Modules")
89 | $moduleDir = (Join-Path $profileModulesDirectory "NuSpec")
90 |
91 | if($EnableIntelliSense){
92 | Enable-NuSpecIntelliSense
93 | }
94 |
95 | # Add NuSpec file for project(s)
96 | $projects | %{
97 | $project = $_
98 |
99 | # Set the nuspec target path
100 | $projectFile = Get-Item $project.FullName
101 | $projectDir = [System.IO.Path]::GetDirectoryName($projectFile)
102 | $projectNuspec = "$($project.Name).nuspec"
103 | $projectNuspecPath = Join-Path $projectDir $projectNuspec
104 |
105 | # Get the nuspec template source path
106 | if($TemplatePath) {
107 | $nuspecTemplatePath = $TemplatePath
108 | }
109 | else {
110 | $nuspecTemplatePath = Join-Path $moduleDir NuSpecTemplate.xml
111 | }
112 |
113 | # Copy the templated nuspec to the project nuspec if it doesn't exist
114 | if(!(Test-Path $projectNuspecPath)) {
115 | Copy-Item $nuspecTemplatePath $projectNuspecPath
116 | }
117 | else {
118 | Write-Warning "Failed to install nuspec '$projectNuspec' into '$($project.Name)' because the file already exists."
119 | }
120 |
121 | try {
122 | # Add nuspec file to the project
123 | $project.ProjectItems.AddFromFile($projectNuspecPath) | Out-Null
124 | $project.Save()
125 |
126 | Set-MSBuildProperty NuSpecFile $projectNuspec $project.Name
127 |
128 | "Updated '$($project.Name)' to use nuspec '$projectNuspec'"
129 | }
130 | catch {
131 | Write-Warning "Failed to install nuspec '$projectNuspec' into '$($project.Name)'"
132 | }
133 | }
134 | }
135 | }
136 |
137 | function Enable-NuSpecIntelliSense {
138 | Process {
139 | $profileDirectory = Split-Path $profile -parent
140 | $profileModulesDirectory = (Join-Path $profileDirectory "Modules")
141 | $moduleDir = (Join-Path $profileModulesDirectory "NuSpec")
142 |
143 | $solutionDir = Get-SolutionDir
144 | $solution = Get-Interface $dte.Solution ([EnvDTE80.Solution2])
145 |
146 | # Set up solution folder "Solution Items"
147 | $solutionItemsProject = $dte.Solution.Projects | Where-Object { $_.ProjectName -eq "Solution Items" }
148 | if(!($solutionItemsProject)) {
149 | $solutionItemsProject = $solution.AddSolutionFolder("Solution Items")
150 | }
151 |
152 | # Copy the XSD in the solution directory
153 | try {
154 | $xsdInstallPath = Join-Path $solutionDir 'nuspec.xsd'
155 | $xsdToolsPath = Join-Path $moduleDir 'nuspec.xsd'
156 |
157 | if(!(Test-Path $xsdInstallPath)) {
158 | Copy-Item $xsdToolsPath $xsdInstallPath
159 | }
160 |
161 | $alreadyAdded = $solutionItemsProject.ProjectItems | Where-Object { $_.Name -eq 'nuspec.xsd' }
162 | if(!($alreadyAdded)) {
163 | $solutionItemsProject.ProjectItems.AddFromFile($xsdInstallPath) | Out-Null
164 | }
165 | }
166 | catch {
167 | Write-Warning "Failed to install nuspec.xsd into 'Solution Items'"
168 | }
169 | $solution.SaveAs($solution.FullName)
170 | }
171 | }
172 |
173 | # Statement completion for project names
174 | 'Install-NuSpec', 'Enable-NuSpecIntelliSense' | %{
175 | Register-TabExpansion $_ @{
176 | ProjectName = { Get-Project -All | Select -ExpandProperty Name }
177 | }
178 | }
179 |
180 | Export-ModuleMember Install-NuSpec, Enable-NuSpecIntelliSense
--------------------------------------------------------------------------------
/NuSpec/tools/NuSpecTemplate.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $version$
5 | $author$
6 |
7 | $id$
8 |
9 | false
10 | $description$
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/NuSpec/tools/init.ps1:
--------------------------------------------------------------------------------
1 | param($installPath, $toolsPath, $package, $project)
2 |
3 | # Configure
4 | $moduleName = "NuSpec"
5 |
6 | # Derived variables
7 | $psdFileName = "$moduleName.psd1"
8 | $psmFileName = "$moduleName.psm1"
9 | $psd = (Join-Path $toolsPath $psdFileName)
10 | $psm = (Join-Path $toolsPath $psmFileName)
11 |
12 | # Check if the NuGet_profile.ps1 exists and register the NuSpec.psd1 module
13 | if(!(Test-Path $profile)){
14 | mkdir -force (Split-Path $profile)
15 | New-Item $profile -Type file -Value "Import-Module $moduleName -DisableNameChecking"
16 | }
17 | else {
18 | if(!(Get-Content $profile | Select-String "Import-Module $moduleName" -quiet)){
19 | Add-Content -Path $profile -Value "`r`nImport-Module $moduleName -DisableNameChecking"
20 | }
21 | }
22 |
23 | # Copy the files to the module in the profile directory
24 | $profileDirectory = Split-Path $profile -parent
25 | $profileModulesDirectory = (Join-Path $profileDirectory "Modules")
26 | $moduleDir = (Join-Path $profileModulesDirectory $moduleName)
27 | if(Test-Path $moduleDir){
28 | # If you install this package and the dir exists, then you're upgrading...
29 | Remove-Item -Recurse -Force $moduleDir
30 | }
31 | if(!(Test-Path $moduleDir)){
32 | mkdir -force $moduleDir
33 | }
34 | copy $psd (Join-Path $moduleDir $psdFileName)
35 | copy $psm (Join-Path $moduleDir $psmFileName)
36 |
37 | # Copy additional files
38 | copy "$toolsPath\*.xsd" $moduleDir
39 | copy "$toolsPath\*.xml" $moduleDir
40 |
41 | # Reload NuGet PowerShell profile
42 | . $profile
43 |
44 | Write-Host ""
45 | Write-Host "*************************************************************************************"
46 | Write-Host " INSTRUCTIONS"
47 | Write-Host "*************************************************************************************"
48 | Write-Host " To create a NuSpec for a project use the Install-NuSpec command"
49 | Write-Host " By default, the target project selected in the NuGet Package Manager Console is used"
50 | Write-Host ""
51 | Write-Host " Additional options:"
52 | Write-Host " -ProjectName [An array of projectnames; use TAB-completion]"
53 | Write-Host " -Template [Choose a custom nuspec template]"
54 | Write-Host " -EnableIntelliSense [using the latest (unofficial) nuspec.xsd]"
55 | Write-Host ""
56 | Write-Host " For for information, see https://github.com/myget/NuGetPackages"
57 | Write-Host "*************************************************************************************"
58 | Write-Host ""
--------------------------------------------------------------------------------
/NuSpec/tools/nuspec.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 | The root element of a package definition
11 |
12 |
13 |
14 |
17 |
18 | Information about how the package should behave when installed
19 |
20 |
21 |
22 |
26 |
27 | REQUIRED - Unique identifier for the package
28 |
29 |
30 |
34 |
35 | REQUIRED - Version number of the package
36 |
37 |
38 |
42 |
43 | Human-friendly name of the package displayed in NuGet clients
44 |
45 |
46 |
50 |
51 | REQUIRED - Comma-separated list of authors of the package code
52 |
53 |
54 |
58 |
59 | Comma-separated list of the owners of the package - ignored by NuGet.org
60 |
61 |
62 |
66 |
67 | A long description of the package to show in NuGet clients
68 |
69 |
70 |
74 |
75 | A description of the changes made in each release of the package
76 |
77 |
78 |
82 |
83 | A short description of the package to show in NuGet clients
84 |
85 |
86 |
91 |
92 | The locale ID for the package, such as en-US
93 |
94 |
95 |
99 |
100 | A URL to learn more about the package - the package project's home page
101 |
102 |
103 |
107 |
108 | A URL for an image to use in NuGet clients. Should be a 64x64 PNG with a transparent background
109 |
110 |
111 |
115 |
116 | A URL for a license to the package
117 |
118 |
119 |
123 |
124 | Copyright details for the package
125 |
126 |
127 |
132 |
133 | Boolean - does the client need to ensure the package license is accepted before it is installed? Default: false
134 |
135 |
136 |
139 |
140 | Packages that this package depends upon
141 |
142 |
143 |
144 |
147 |
148 | A collection of packages to be installed as a group
149 |
150 |
151 |
152 |
156 |
157 |
160 |
161 | If the project target framework matches this value, then this group of packages will be installed. An empty value serves as a fall-back
162 |
163 |
164 |
165 |
166 |
170 |
171 |
172 |
173 |
174 |
177 |
178 | Names of assemblies (not the path) under the lib folder that are added as project references. Default: all assemblies are added
179 |
180 |
181 |
182 |
185 |
186 |
189 |
190 | Name of the file to include
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
203 |
204 | A space delimited list of tags and keywords that describe the package for use by NuGet repositories providing search capabilties
205 |
206 |
207 |
210 |
211 |
212 |
215 |
216 | .NET framework assemblies that this package requires
217 |
218 |
219 |
222 |
223 | REQUIRED - A fully qualified assembly name
224 |
225 |
226 |
229 |
230 | Specific target framework this reference applies to. Default: all frameworks
231 |
232 |
233 |
234 |
235 |
236 |
239 |
240 | Directions for how to include files as content in the package
241 |
242 |
243 |
244 |
247 |
248 | Defines a collection of files to be acted on by NuGet
249 |
250 |
251 |
254 |
255 | Location of the files under /contentFiles to act on
256 |
257 |
258 |
261 |
262 | A path, optionally with wild cards, to exclude matching files from
263 |
264 |
265 |
269 |
270 | The action MSBuild should take on the files
271 |
272 |
273 |
277 |
278 | If true, then copy these files to the output folder
279 |
280 |
281 |
285 |
286 | If files are copied to the output folder, when true the full folder structure is reproduced in output
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 | The minimum NuGet client version needed to install this package.
301 |
302 |
303 |
304 |
305 |
309 |
310 | If declared, these are the only files to include in the package
311 |
312 |
313 |
314 |
317 |
318 |
321 |
322 | REQUIRED - The location of the file or files to include relative to the NuSpec file
323 |
324 |
325 |
328 |
329 | Relative path to the directory within the package where the files will be placed
330 |
331 |
332 |
333 |
336 |
337 | The file or files to exclude within the src location
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
365 |
366 | The unique identifier of the package to reference
367 |
368 |
369 |
372 |
373 | The version numbers of the package to reference - a range can be specified
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 | No action should be taken by MSBuild
389 |
390 |
391 |
392 |
393 | These files should be compiled
394 |
395 |
396 |
397 |
398 | These files should be treated as content
399 |
400 |
401 |
402 |
403 | Treat these files an embedded resource
404 |
405 |
406 |
407 |
408 |
409 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # NuGetPackages
2 |
3 | Our collection of home-made NuGet packages :)
4 |
5 | ## NuSpec
6 |
7 | Simply run Install-Package NuSpec (once for the solution, doesn't matter which project) to get a set of extra cmdlets available in the NuGet Package Manager Console.
8 |
9 | Available cmdlets: *Install-NuSpec*, *Enable-NuSpecIntelliSense*
10 |
11 | ### Creating the package and auto-build
12 |
13 | Install-NuSpec [-EnableIntelliSense] [-TemplatePath]
14 |
15 | Adds a tokenized .nuspec file to the target project(s).
16 | Use the -EnableIntelliSense
swicth to add the nuspec.xsd to your Solution Items to provide IntelliSense.
17 |
18 | ### Done? Remove the dependency...
19 |
20 | There's not much value in keeping the NuSpec package dependency around after setting up this automation, so feel free to simply remove it using *Uninstall-Package NuSpec*.
21 |
--------------------------------------------------------------------------------
/license.txt:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
10 |
11 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12 |
13 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14 |
15 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16 |
17 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18 |
19 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20 |
21 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
22 |
23 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24 |
25 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26 |
27 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28 |
29 | 2. Grant of Copyright License.
30 |
31 | Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
32 |
33 | 3. Grant of Patent License.
34 |
35 | Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
36 |
37 | 4. Redistribution.
38 |
39 | You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
40 |
41 | 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
42 |
43 | 2. You must cause any modified files to carry prominent notices stating that You changed the files; and
44 |
45 | 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
46 |
47 | 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
48 |
49 | You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
50 |
51 | 5. Submission of Contributions.
52 |
53 | Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
54 |
55 | 6. Trademarks.
56 |
57 | This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
58 |
59 | 7. Disclaimer of Warranty.
60 |
61 | Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
62 |
63 | 8. Limitation of Liability.
64 |
65 | In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
66 |
67 | 9. Accepting Warranty or Additional Liability.
68 |
69 | While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
--------------------------------------------------------------------------------