diff --git a/.editorconfig b/.editorconfig
index a7ab1957..039c4069 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,26 +1,53 @@
-; EditorConfig to support per-solution formatting.
-; Use the EditorConfig VS add-in to make this work.
-; http://editorconfig.org/
+# EditorConfig is awesome:http://EditorConfig.org
-; This is the default for the codeline.
+# top-most EditorConfig file
root = true
+# Don't use tabs for indentation.
[*]
-end_of_line = CRLF
+indent_style = space
+# (Please don't specify an indent_size here; that has too many unintended consequences.)
-[*.{cs,fs}]
-indent_style = tab
+# Code files
+[*.{cs,csx,vb,vbx}]
+indent_size = 4
-[*.{sln,proj,props,targets,xaml,config,nuspec,vsixmanifest,vsct,vstemplate}]
-indent_style = tab
+# Xml project files
+[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,msbuildproj}]
+indent_size = 2
-[*.{csproj,ps1,resx,rst,fsproj,wxs,wxi}]
-indent_style = space
+# Xml config files
+[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2
-[*.{tt}]
-indent_style = space
-indent_size = 4
+# YAML files
+[*.{yaml,yml}]
+indent_size = 2
+
+# JSON files
+[*.json]
+indent_size = 2
+
+# Dotnet code style settings:
+[*.{cs,vb}]
+# Sort using and Import directives with System.* appearing first
+dotnet_sort_system_directives_first = true
+# Avoid "this." and "Me." if not necessary
+dotnet_style_qualification_for_field = false:suggestion
+dotnet_style_qualification_for_property = false:suggestion
+dotnet_style_qualification_for_method = false:suggestion
+dotnet_style_qualification_for_event = false:suggestion
+
+# Use language keywords instead of framework type names for type references
+dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
+dotnet_style_predefined_type_for_member_access = true:suggestion
+
+# Suggest more modern language features when available
+dotnet_style_object_initializer = true:suggestion
+dotnet_style_collection_initializer = true:suggestion
+dotnet_style_coalesce_expression = true:suggestion
+dotnet_style_null_propagation = true:suggestion
+dotnet_style_explicit_tuple_names = true:suggestion
# CSharp code style settings:
[*.cs]
@@ -34,17 +61,17 @@ csharp_style_expression_bodied_methods = false:none
csharp_style_expression_bodied_constructors = false:none
csharp_style_expression_bodied_operators = false:none
-# Prefer property-like constructs to have a block body
-csharp_style_expression_bodied_properties = false:none
-csharp_style_expression_bodied_indexers = false:none
-csharp_style_expression_bodied_accessors = false:none
+# Prefer property-like constructs to have an expression-body
+csharp_style_expression_bodied_properties = true:none
+csharp_style_expression_bodied_indexers = true:none
+csharp_style_expression_bodied_accessors = true:none
-# Don't suggest more modern language features when available
-csharp_style_pattern_matching_over_is_with_cast_check = false:suggestion
-csharp_style_pattern_matching_over_as_with_null_check = false:suggestion
-csharp_style_inlined_variable_declaration = false:suggestion
-csharp_style_throw_expression = false:suggestion
-csharp_style_conditional_delegate_call = false:suggestion
+# Suggest more modern language features when available
+csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
+csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
+csharp_style_inlined_variable_declaration = true:suggestion
+csharp_style_throw_expression = true:suggestion
+csharp_style_conditional_delegate_call = true:suggestion
# Newline settings
csharp_new_line_before_open_brace = all
@@ -53,33 +80,3 @@ csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
-
-# Indentation preferences
-csharp_indent_block_contents = true
-csharp_indent_braces = false
-csharp_indent_case_contents = true
-csharp_indent_switch_labels = true
-csharp_indent_labels = flush_left
-
-# Space preferences
-csharp_space_after_cast = false
-csharp_space_after_colon_in_inheritance_clause = true
-csharp_space_after_comma = true
-csharp_space_after_dot = false
-csharp_space_after_keywords_in_control_flow_statements = true
-csharp_space_after_semicolon_in_for_statement = true
-csharp_space_around_binary_operators = before_and_after
-csharp_space_around_declaration_statements = do_not_ignore
-csharp_space_before_colon_in_inheritance_clause = true
-csharp_space_before_comma = false
-csharp_space_before_dot = false
-csharp_space_before_open_square_brackets = false
-csharp_space_before_semicolon_in_for_statement = false
-csharp_space_between_empty_square_brackets = false
-csharp_space_between_method_call_empty_parameter_list_parentheses = false
-csharp_space_between_method_call_name_and_opening_parenthesis = false
-csharp_space_between_method_call_parameter_list_parentheses = false
-csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
-csharp_space_between_method_declaration_name_and_open_parenthesis = false
-csharp_space_between_method_declaration_parameter_list_parentheses = false
-csharp_space_between_square_brackets = false
\ No newline at end of file
diff --git a/.gitattributes b/.gitattributes
index 624569f6..1ff0c423 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,30 +1,63 @@
-# This file is understood by git 1.7.2 and higher. Everyone should
-# be on this version by now.
+###############################################################################
+# Set default behavior to automatically normalize line endings.
+###############################################################################
+* text=auto
-# sln, csproj files (and friends) are always CRLF, even on linux
-*.sln text eol=crlf
-*.proj text eol=crlf
+###############################################################################
+# Set default behavior for command prompt diff.
+#
+# This is need for earlier builds of msysgit that does not have it on by
+# default for csharp files.
+# Note: This is only used by command line
+###############################################################################
+#*.cs diff=csharp
-# These are windows specific files which we may as well ensure are
-# always crlf on checkout
-*.bat text eol=crlf
-*.cmd text eol=crlf
+###############################################################################
+# Set the merge driver for project and solution files
+#
+# Merging from the command prompt will add diff markers to the files if there
+# are conflicts (Merging from VS is not affected by the settings below, in VS
+# the diff markers are never inserted). Diff markers may cause the following
+# file extensions to fail to load in VS. An alternative would be to treat
+# these files as binary and thus will always conflict and require user
+# intervention with every merge. To do so, just uncomment the entries below
+###############################################################################
+#*.sln merge=binary
+#*.csproj merge=binary
+#*.vbproj merge=binary
+#*.vcxproj merge=binary
+#*.vcproj merge=binary
+#*.dbproj merge=binary
+#*.fsproj merge=binary
+#*.lsproj merge=binary
+#*.wixproj merge=binary
+#*.modelproj merge=binary
+#*.sqlproj merge=binary
+#*.wwaproj merge=binary
-# Opt in known filetypes to always normalize line endings on checkin
-# and always use native endings on checkout
-*.c text
-*.config text
-*.h text
-*.cs text
-*.csproj text
-*.md text
-*.tt text
-*.txt text
-*.vspackage text
-*.vspackage.diagram text
-
-# Some must always be checked out as lf so enforce that for those files
-# If these are not lf then bash/cygwin on windows will not be able to
-# excute the files
-*.sh text eol=lf
+###############################################################################
+# behavior for image files
+#
+# image files are treated as binary by default.
+###############################################################################
+#*.jpg binary
+#*.png binary
+#*.gif binary
+###############################################################################
+# diff behavior for common document formats
+#
+# Convert binary document formats to text before diffing them. This feature
+# is only available from the command line. Turn it on by uncommenting the
+# entries below.
+###############################################################################
+#*.doc diff=astextplain
+#*.DOC diff=astextplain
+#*.docx diff=astextplain
+#*.DOCX diff=astextplain
+#*.dot diff=astextplain
+#*.DOT diff=astextplain
+#*.pdf diff=astextplain
+#*.PDF diff=astextplain
+#*.rtf diff=astextplain
+#*.RTF diff=astextplain
diff --git a/.gitignore b/.gitignore
index e4178aca..2ed6a02a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,29 +1,16 @@
+.nuget
+.vs
+.idea
+out
bin
obj
-out
-temp
-.vs
-
-*.suo
-*.sdf
-*.userprefs
-*.user
*.nupkg
-*.vsix
-*.sln.ide
-*.metaproj
-*.tmp
-*.cache
-
-NuGet.exe
-packages
-project.lock.json
-.nuget
+*.lock.json
*.nuget.props
*.nuget.targets
-
-log.txt
-test.proj
+*.suo
+*.user
+*.cache
*.log
-*.g
*.binlog
+*.rsp
\ No newline at end of file
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index 07efdbb3..00000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "external/ApiIntersect"]
- path = external/ApiIntersect
- url = https://github.com/xamarin/ApiInteresect.git
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index f6bf28b6..00000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,56 +0,0 @@
-# Setup
-
-Just open the available `.sln` files under `src` and build :) (see Building in Visual Studio below).
-
-Build, test and run code coverage:
-
-Windows:
-
- build.cmd
-
-Mac:
-
- make
-
-> Mac support comming as soon as MSBuild ships by default with XS/Mono on Mac
-
-
-# Building in Visual Studio
-
-There are two parts to the project:
-1. The build targets and tasks
-2. The NuGet package project system
-
-## Targets and tasks
-
-Install [Visual Studio 2015](https://www.visualstudio.com/) (preferrable also Update 3 or later).
-
-These can be built by just opening the [NuGet.Packaging.Build.sln](src\Build\NuGet.Packaging.Build.sln) solution.
-
-Alternatively, you can also build with the default configuration and platform from the command line with `msbuild`
-from a developer command prompt.
-
-## NuGet Project System
-
-The project system is built on top of the new [Visual Studio Project System](https://github.com/Microsoft/VSProjectSystem/)
-also known as "CPS" (Common Project System).
-
-There were API changes between CPS for Visual Studio 2015 and the upcoming `Visual Studio 15` (code name), so
-at the moment, we require installing a [Preview 4](https://www.visualstudio.com/en-us/news/releasenotes/vs15-relnotes)
-or later version.
-
-> NOTE: The project system is in flux at the moment, as many artifacts will move to the authoring package
-> under the `src\Build` directory.
-
-# Contributing
-
-1. [Open an issue here](https://github.com/NuGet/Home/issues) and get some feedback from the NuGet team.
-1. Create a branch. Base it on the `dev` branch.
-1. Add unit tests (to the test project in the relevant solution).
-1. Make sure all tests pass (via `Test -> Run -> All Tests`, or by running `build.cmd` on Windows).
-1. Create a [pull request](https://github.com/NuGet/NuGet.Build.Packaging/pulls).
-1. _One-time_: Sign the contributor license agreement, if you haven't signed it before.
- The [.NET Foundation Bot](https://github.com/dnfclas) will comment on the pull request you just
- created and guide you on how to sign the CLA.
-1. Consider submitting a doc pull request to the [nugetdocs](https://github.com/NuGet/NuGetDocs/tree/master/NuGet.Docs)
- repo, if this is a new feature or behavior change.
\ No newline at end of file
diff --git a/GitInfo.txt b/GitInfo.txt
deleted file mode 100644
index 28af839c..00000000
--- a/GitInfo.txt
+++ /dev/null
@@ -1 +0,0 @@
-0.2.5
\ No newline at end of file
diff --git a/LICENSE.txt b/LICENSE
similarity index 100%
rename from LICENSE.txt
rename to LICENSE
diff --git a/NuGetizer.sln b/NuGetizer.sln
new file mode 100644
index 00000000..444e219b
--- /dev/null
+++ b/NuGetizer.sln
@@ -0,0 +1,41 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30509.190
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CDF1828A-0877-4238-A218-5E4FE219F6CC}"
+ ProjectSection(SolutionItems) = preProject
+ src\Directory.Build.props = src\Directory.Build.props
+ src\Directory.Build.targets = src\Directory.Build.targets
+ src\NuGet.Config = src\NuGet.Config
+ EndProjectSection
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NuGet.Build.Packaging.Tasks", "src\Build\NuGet.Build.Packaging.Tasks\NuGet.Build.Packaging.Tasks.csproj", "{57F59BF6-9272-4B66-98A1-334B3FDA5721}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NuGet.Build.Packaging.Tests", "src\Build\NuGet.Build.Packaging.Tests\NuGet.Build.Packaging.Tests.csproj", "{50032C88-1B52-4DB1-BFC5-6BADE2CC58CC}"
+ ProjectSection(ProjectDependencies) = postProject
+ {57F59BF6-9272-4B66-98A1-334B3FDA5721} = {57F59BF6-9272-4B66-98A1-334B3FDA5721}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {57F59BF6-9272-4B66-98A1-334B3FDA5721}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {57F59BF6-9272-4B66-98A1-334B3FDA5721}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {57F59BF6-9272-4B66-98A1-334B3FDA5721}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {57F59BF6-9272-4B66-98A1-334B3FDA5721}.Release|Any CPU.Build.0 = Release|Any CPU
+ {50032C88-1B52-4DB1-BFC5-6BADE2CC58CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {50032C88-1B52-4DB1-BFC5-6BADE2CC58CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {50032C88-1B52-4DB1-BFC5-6BADE2CC58CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {50032C88-1B52-4DB1-BFC5-6BADE2CC58CC}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {2260BB27-4F44-4309-9D78-E459B90C1A3B}
+ EndGlobalSection
+EndGlobal
diff --git a/README.md b/README.md
index ea944ef9..7bcf3c9a 100644
--- a/README.md
+++ b/README.md
@@ -1,30 +1,12 @@

-# NuGetizer3000
+# NuGetizer 3000
-NuGetizer 3000 is here, and will be beyond awesome!
+For the original design and intended goals and features, check out the [spec](https://github.com/NuGet/Home/wiki/NuGetizer-3000).
-Check out the [spec](https://github.com/NuGet/Home/wiki/NuGetizer-3000) for more details.
+## Why
-[](https://ci.appveyor.com/project/MobileEssentials/nuget-build-packaging)
+I got sick of trying to modify the gazillion properties, weird item, property and target names and more from the built-in SDK Pack targets, and still never quite achieving the simple goals I had in mind. Also, the original clean and clear design from [NuGet.Build.Packaging](https://github.com/NuGet/NuGet.Build.Packaging) never got traction or support from the NuGet team, so the weirdness kept evolving in ever more incomprehensible ways ¯\_(ツ)_/¯.
-## Installing
-
-Add the following NuGet feed to Visual Studio:
-
- https://ci.appveyor.com/nuget/nugetizer3000
-
-Install the following package:
-
- Install-Package NuGet.Build.Packaging
-
-Add [NuGet properties to your MSBuild project](https://github.com/NuGet/Home/wiki/Adding-nuget-pack-as-a-msbuild-target) and invoke the `/t:Pack` target to generated a `.nupkg` for the project.
-
-## Issues
-
-Please report issues on the [NuGet/Home](https://github.com/NuGet/Home/issues?q=is%3Aopen+is%3Aissue+label%3AArea%3ANuGetizer) repo, and tag with `Area:NuGetizer`.
-
-### IDE Integration Early Preview
-
-Install the following VSIX from the evergreen CI URL [NuGetizer 3000 for VS2017](http://bit.ly/nugetizer-2017). Alternatively, you can download the specific build artifact for specifc builds from our [AppVeyor CI](https://ci.appveyor.com/project/MobileEssentials/nuget-build-packaging)
+So, on to forking and shipping for real the simplified, understandable way of packing your libraries.
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100644
index ae254c78..00000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-os: Visual Studio 2017
-
-init:
-- ps: >-
- reg ADD "HKLM\Software\Microsoft\StrongName\Verification\*,*" /f
-
- if ($env:PROCESSOR_ARCHITECTURE -eq "AMD64")
-
- {
- reg ADD "HKLM\Software\Wow6432Node\Microsoft\StrongName\Verification\*,*" /f
- }
-
-build_script:
- - cmd: echo /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" >> msbuild.rsp
- - cmd: build.cmd /restore
- - cmd: build.cmd /release
-
-install:
-- cmd: git submodule update --init --recursive
-
-# we run the tests ourselves in build.proj for coverage
-test: off
-
-nuget:
- project_feed: true
- disable_publish_on_pr: false
-
-artifacts:
- - path: 'out\*.nupkg'
- name: Package
- - path: 'out\*.vsix'
- name: Extension
- - path: 'msbuild.log'
- name: Log
diff --git a/build.cmd b/build.cmd
deleted file mode 100644
index e37071a7..00000000
--- a/build.cmd
+++ /dev/null
@@ -1,114 +0,0 @@
-@echo off
-setlocal enabledelayedexpansion
-
-set BatchFile=%0
-set Root=%~dp0
-set BuildConfiguration=Debug
-set MSBuildTarget=All
-set NodeReuse=true
-set MultiProcessor=/m
-set MSBuildAdditionalArguments=/m
-
-:ParseArguments
-if "%1" == "" goto :DoneParsing
-if /I "%1" == "/?" call :Usage && exit /b 1
-if /I "%1" == "/debug" set BuildConfiguration=Debug&&shift&& goto :ParseArguments
-if /I "%1" == "/release" set BuildConfiguration=Release&&shift&& goto :ParseArguments
-if /I "%1" == "/build" set MSBuildTarget=Build&&shift&& goto :ParseArguments
-if /I "%1" == "/rebuild" set MSBuildTarget=Rebuild&&shift&& goto :ParseArguments
-if /I "%1" == "/package" set MSBuildTarget=Package&&shift&& goto :ParseArguments
-if /I "%1" == "/test" set MSBuildTarget=Test&&shift&& goto :ParseArguments
-if /I "%1" == "/restore" set MSBuildTarget=Restore&&shift&& goto :ParseArguments
-if /I "%1" == "/no-node-reuse" set NodeReuse=false&&shift&& goto :ParseArguments
-if /I "%1" == "/no-multi-proc" set MultiProcessor=&&shift&& goto :ParseArguments
-set MSBuildAdditionalArguments=%MSBuildAdditionalArguments% %1&&shift&& goto :ParseArguments
-:DoneParsing
-
-:: Detect if MSBuild is in the path
-for /f "delims=" %%i in ('where msbuild') do set "MSBuildPath=%%i" & goto :MSBuildPathDone
-:MSBuildPathDone
-
-if not exist "%MSBuildPath%" (
- call :PrintColor Red "To build this repository, MSBuild.exe must be in the PATH."
- echo MSBuild is included with Visual Studio 2017 or later.
- echo.
- echo If Visual Studio is not installed, visit this page to download:
- echo.
- echo https://www.visualstudio.com/vs/
- echo.
- exit /b 1
-)
-
-:: Detect MSBuild version >= 15
-for /f "delims=" %%i in ('msbuild -nologo -version') do set MSBuildFullVersion=%%i
-for /f "delims=. tokens=1" %%a in ("%MSBuildFullVersion%") do (
- set MSBuildMajorVersion=%%a
-)
-
-if %MSBuildMajorVersion% LSS 15 (
- call :PrintColor Red "To build this repository, the MSBuild.exe in the PATH needs to be 15.0 or higher."
- echo MSBuild 15.0 is included with Visual Studio 2017 or later.
- echo.
- echo If Visual Studio is not installed, visit this page to download:
- echo.
- echo https://www.visualstudio.com/vs/
- echo.
- echo Located MSBuild in the PATH was "%MSBuildPath%".
- exit /b 1
-)
-
-:: Ensure developer command prompt variables are set
-if "%VisualStudioVersion%" == "" (
- for /f "delims=" %%i in ('msbuild build.props /nologo /v:m /t:GetVsInstallRoot') do set "VsInstallRoot=%%i" & goto :VsInstallRootDone
-:VsInstallRootDone
- for /f "tokens=* delims= " %%i in ("%VsInstallRoot%") do set "VsInstallRoot=%%i"
- set "DeveloperCommandPrompt=%VsInstallRoot%\Common7\Tools\VsDevCmd.bat"
- if not exist "%DeveloperCommandPrompt%" (
- call :PrintColor Red "Failed to locate 'Common7\Tools\VsDevCmd.bat' under the reported Visual Studio installation root '%VsInstallRoot%'."
- echo.
- echo If Visual Studio is not installed, visit this page to download:
- echo.
- echo https://www.visualstudio.com/vs/
- echo.
- exit /b 1
- )
- call "%DeveloperCommandPrompt%" || goto :BuildFailed
-)
-
-@echo on
-msbuild /nologo /nodeReuse:%NodeReuse% /t:"%MSBuildTarget%" /p:target="%MSBuildTarget%" /p:Configuration="%BuildConfiguration%" %MSBuildAdditionalArguments%
-@echo off
-if ERRORLEVEL 1 (
- echo.
- call :PrintColor Red "Build failed, for full log see msbuild.log."
- exit /b 1
-)
-
-echo.
-call :PrintColor Green "Build completed successfully, for full log see msbuild.log"
-exit /b 0
-
-:Usage
-echo Usage: %BatchFile% [/build^|/rebuild^|/test^|/restore^] [/debug^|/release] [/no-node-reuse] [/no-multi-proc]
-echo.
-echo Build targets:
-echo /build Perform build
-echo /rebuild Perform a clean, then build
-echo /package Packages the product
-echo /test Builds and runs tests only
-echo /restore Only restore NuGet packages
-echo.
-echo Build options:
-echo /debug Perform debug build (default)
-echo /release Perform release build
-echo /no-node-reuse Prevents MSBuild from reusing existing MSBuild instances,
-echo useful for avoiding unexpected behavior on build machines
-echo /no-multi-proc No multi-proc build, useful for diagnosing build logs
-goto :eof
-
-:BuildFailed
-call :PrintColor Red "Build failed with ERRORLEVEL %ERRORLEVEL%"
-exit /b 1
-
-:PrintColor
-"%Windir%\System32\WindowsPowerShell\v1.0\Powershell.exe" -noprofile write-host -foregroundcolor %1 "'%2'"
\ No newline at end of file
diff --git a/build.proj b/build.proj
deleted file mode 100644
index f3df9cd9..00000000
--- a/build.proj
+++ /dev/null
@@ -1,149 +0,0 @@
-
-
-
-
-
-
-
- Debug
-
-
- Release
-
-
-
- https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
- false
- false
- .nuget\
- $(IntermediateOutputPath)packages
- WarningLevel=0;NoWarn=1591;Out=$(Out);Configuration=$(Configuration);RunCodeAnalysis=$(RunCodeAnalysis);PackageOutputPath=$(Out)
- high
- %WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe
- high
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- "$(XunitConsolePath)"
- $(XunitOptions) -html $(Out)\test.html -xml $(Out)\test.xml -parallel none -noshadow
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(XunitOptions) -html $(Out)\test.html -xml $(Out)\test.xml -parallel none -noshadow
-
- $(PackagesPath)\OpenCover\tools\OpenCover.Console.exe
- $(CoverageOptions) -output:$(Out)\coverage.xml -returntargetcode -register:user -filter:"+[NuGet.Build.Packaging*]* -[NuGet.Packaging.Core*]* -[NuGet.Packaging.VisualStudio*]* -[Clide*]* -[xunit*]* -[*Tests]* -[*]*ThisAssembly*" -excludebyattribute:*ExcludeFromCodeCoverage*;*CompilerGenerated* -skipautoprops -showunvisited -mergebyhash
- $(CoverageConsole) $(CoverageOptions) -target:$(XunitConsole) -targetargs:"@(TestAssembly, ' ') $(XunitOptions)"
-
- $(PackagesPath)\ReportGenerator\tools\ReportGenerator.exe
- -reports:$(Out)\coverage.xml -targetdir:$(Out)\coverage -reporttypes:Html;Xml;Badges
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/build.props b/build.props
deleted file mode 100644
index 3f5ff8c9..00000000
--- a/build.props
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
- true
- true
- true
- true
- true
-
- true
-
-
-
-
-
-
-
-
- $(MSBuildThisFileDirectory)out
-
-
-
\ No newline at end of file
diff --git a/corebuild/corebuild.props b/corebuild/corebuild.props
deleted file mode 100644
index 1a26ab11..00000000
--- a/corebuild/corebuild.props
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- netcore50
-
- PackageReference
-
- $(MSBuildThisFileDirectory).nuget
- 9f31d2c2a2dcddd79bfc28ddb5217663b761a17c
- true
-
-
-
-
-
\ No newline at end of file
diff --git a/corebuild/corebuild.targets b/corebuild/corebuild.targets
deleted file mode 100644
index 35823f1e..00000000
--- a/corebuild/corebuild.targets
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
- $(VsInstallRoot)\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- All
-
-
- All
-
-
-
-
- cdac7d6eaa07b64767e32bcb207a7dbdce1caf07
-
-
-
-
-
\ No newline at end of file
diff --git a/corebuild/update.targets b/corebuild/update.targets
deleted file mode 100644
index c3a2d2fa..00000000
--- a/corebuild/update.targets
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- https://raw.githubusercontent.com/kzu/corebuild/master/src/corebuild
-
-
- <_Updatable Include="$(MSBuildThisFileDirectory)corebuild.props" />
- <_Updatable Include="$(MSBuildThisFileDirectory)corebuild.targets" />
-
-
-
-
-
-
-
-
diff --git a/external/ApiIntersect b/external/ApiIntersect
deleted file mode 160000
index a7c652ca..00000000
--- a/external/ApiIntersect
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit a7c652ca3f399bbace7fd7f1e13b71da4b614d53
diff --git a/packages.config b/packages.config
deleted file mode 100644
index dcf8e590..00000000
--- a/packages.config
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Build/NuGet.Build.Packaging.Tasks.Shared.targets b/src/Build/NuGet.Build.Packaging.Tasks.Shared.targets
deleted file mode 100644
index ac1cc5d5..00000000
--- a/src/Build/NuGet.Build.Packaging.Tasks.Shared.targets
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
- Microsoft
- Microsoft
- © Microsoft Corporation. All rights reserved.
- en
- https://raw.githubusercontent.com/NuGet/NuGet.Build.Packaging/dev/LICENSE.txt
- https://github.com/NuGet/NuGet.Build.Packaging
-
-
-
- $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
- true
-
-
\ No newline at end of file
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/ApiIntersect.cs b/src/Build/NuGet.Build.Packaging.Tasks/ApiIntersect.cs
deleted file mode 100644
index 61402d04..00000000
--- a/src/Build/NuGet.Build.Packaging.Tasks/ApiIntersect.cs
+++ /dev/null
@@ -1,164 +0,0 @@
-using System;
-using System.IO;
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-using NuGet.Common;
-using NuGet.Frameworks;
-
-namespace NuGet.Build.Packaging.Tasks
-{
- public class ApiIntersect : ToolTask
- {
- [Required]
- public ITaskItem Framework { get; set; }
-
- [Required]
- public ITaskItem[] IntersectionAssembly { get; set; }
-
- public ITaskItem[] ReferencePath { get; set; }
-
- public ITaskItem[] ExcludeType { get; set; }
-
- public ITaskItem[] RemoveAbstractTypeMembers { get; set; }
-
- public ITaskItem[] ExcludeAssembly { get; set; }
-
- public string KeepInternalConstructors { get; set; }
-
- public string KeepMarshalling { get; set; }
-
- public string IgnoreUnresolvedAssemblies { get; set; }
-
- [Required]
- public ITaskItem RootOutputDirectory { get; set; }
-
- [Output]
- public ITaskItem OutputDirectory { get; set; }
-
- protected override string ToolName
- {
- get { return "ApiIntersect"; }
- }
-
- protected override string GenerateFullPathToTool()
- {
- return Path.Combine(ToolPath, ToolExe);
- }
-
- protected override MessageImportance StandardErrorLoggingImportance
- {
- get { return MessageImportance.High; }
- }
-
- protected override string GenerateCommandLineCommands()
- {
- var builder = new CommandLineBuilder();
-
- var nugetFramework = NuGetFramework.Parse(Framework.ItemSpec);
-
- builder.AppendSwitch("-o");
- CreateOutputDirectoryItem(nugetFramework);
- builder.AppendFileNameIfNotNull(OutputDirectory.ItemSpec);
-
- string frameworkPath = GetFrameworkPath(nugetFramework);
- builder.AppendSwitch("-f");
- builder.AppendFileNameIfNotNull(frameworkPath);
-
- foreach (var assembly in IntersectionAssembly.NullAsEmpty())
- {
- builder.AppendSwitch("-i");
- builder.AppendFileNameIfNotNull(assembly.ItemSpec);
- }
-
- foreach (var referencePath in ReferencePath.NullAsEmpty())
- {
- builder.AppendSwitch("-r");
- builder.AppendFileNameIfNotNull(referencePath.ItemSpec);
- }
-
- foreach (var excludeType in ExcludeType.NullAsEmpty())
- {
- builder.AppendSwitch("-b");
- builder.AppendTextUnquoted(" \"");
- builder.AppendTextUnquoted(excludeType.ItemSpec);
- builder.AppendTextUnquoted("\"");
- }
-
- foreach (var removeAbstractType in RemoveAbstractTypeMembers.NullAsEmpty())
- {
- builder.AppendSwitch("-a");
- builder.AppendTextUnquoted(" \"");
- builder.AppendTextUnquoted(removeAbstractType.ItemSpec);
- builder.AppendTextUnquoted("\"");
- }
-
- foreach (var assembly in ExcludeAssembly.NullAsEmpty())
- {
- builder.AppendSwitch("-e");
- builder.AppendFileNameIfNotNull(assembly.ItemSpec);
- }
-
- AppendSwitchIfTrue(builder, "-k", KeepInternalConstructors);
-
- AppendSwitchIfTrue(builder, "-m", KeepMarshalling);
-
- AppendSwitchIfTrue(builder, "-iua", IgnoreUnresolvedAssemblies);
-
- return builder.ToString();
- }
-
- void CreateOutputDirectoryItem(NuGetFramework framework)
- {
- string fullOutputPath = GetApiIntersectTargetPaths.GetOutputDirectory(RootOutputDirectory.ItemSpec, framework);
- OutputDirectory = new TaskItem(fullOutputPath + Path.DirectorySeparatorChar);
- OutputDirectory.SetMetadata("TargetFrameworkVersion", "v" + framework.Version.ToString(2));
- OutputDirectory.SetMetadata("TargetFrameworkProfile", framework.Profile);
- OutputDirectory.SetMetadata(MetadataName.TargetFrameworkMoniker, Framework.ItemSpec);
- }
-
- string GetFrameworkPath(NuGetFramework framework)
- {
- if (framework.IsPCL)
- {
- return GetPortableLibraryPath(framework);
- }
-
- throw new NotImplementedException("Only PCL profiles supported.");
- }
-
- string GetPortableLibraryPath(NuGetFramework framework)
- {
- return Path.Combine(
- GetPortableRootDirectory(),
- "v" + framework.Version.ToString(2),
- "Profile",
- framework.Profile);
- }
-
- static string GetPortableRootDirectory()
- {
- if (RuntimeEnvironmentHelper.IsMono)
- {
- string macPath = "/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks/.NETPortable/";
- if (Directory.Exists(macPath))
- return macPath;
-
- return Path.Combine(Path.GetDirectoryName(typeof(Object).Assembly.Location), "../xbuild-frameworks/.NETPortable/");
- }
-
- return Path.Combine(
- Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86, Environment.SpecialFolderOption.DoNotVerify),
- @"Reference Assemblies\Microsoft\Framework\.NETPortable");
- }
-
- static void AppendSwitchIfTrue(CommandLineBuilder builder, string switchName, string value)
- {
- if (string.IsNullOrEmpty(value))
- return;
-
- bool result;
- if (bool.TryParse(value, out result))
- builder.AppendSwitch(switchName);
- }
- }
-}
\ No newline at end of file
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/AssignPackagePath.cs b/src/Build/NuGet.Build.Packaging.Tasks/AssignPackagePath.cs
index 376df0ea..217139df 100644
--- a/src/Build/NuGet.Build.Packaging.Tasks/AssignPackagePath.cs
+++ b/src/Build/NuGet.Build.Packaging.Tasks/AssignPackagePath.cs
@@ -4,20 +4,19 @@
using System.Linq;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
-using static NuGet.Build.Packaging.Properties.Strings;
-using static NuGet.Client.ManagedCodeConventions;
+using static ThisAssembly.Strings;
using NuGet.Packaging;
namespace NuGet.Build.Packaging.Tasks
{
- ///
- /// Ensures all files have the PackagePath metadata.
- /// If the PackagePath was not explicitly specified,
- /// determine one from the project relative path and
- /// the TargetFramework and Kind metadata, and set it
- /// on the projected item.
- ///
- public class AssignPackagePath : Task
+ ///
+ /// Ensures all files have the PackagePath metadata.
+ /// If the PackagePath was not explicitly specified,
+ /// determine one from the project relative path and
+ /// the TargetFramework and Kind metadata, and set it
+ /// on the projected item.
+ ///
+ public class AssignPackagePath : Task
{
public string IsPackaging { get; set; }
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/CreatePackage.cs b/src/Build/NuGet.Build.Packaging.Tasks/CreatePackage.cs
index bfa5f080..a501e44b 100644
--- a/src/Build/NuGet.Build.Packaging.Tasks/CreatePackage.cs
+++ b/src/Build/NuGet.Build.Packaging.Tasks/CreatePackage.cs
@@ -3,18 +3,17 @@
using System.IO;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
-using System.Runtime.Versioning;
using NuGet.Versioning;
using NuGet.Frameworks;
using NuGet.Packaging.Core;
using NuGet.Packaging;
using System.Collections.Generic;
-using static NuGet.Build.Packaging.Properties.Strings;
+using static ThisAssembly.Strings;
using System.Security.Cryptography;
namespace NuGet.Build.Packaging.Tasks
{
- public class CreatePackage : Task
+ public class CreatePackage : Task
{
[Required]
public ITaskItem Manifest { get; set; }
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/GenerateAssemblyInfo.cs b/src/Build/NuGet.Build.Packaging.Tasks/GenerateAssemblyInfo.cs
deleted file mode 100644
index c4dad1d0..00000000
--- a/src/Build/NuGet.Build.Packaging.Tasks/GenerateAssemblyInfo.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using System;
-using System.IO;
-using System.Reflection;
-using System.Linq;
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-
-namespace NuGet.Build.Packaging.Tasks
-{
- public class GenerateAssemblyInfo : Task
- {
- [Required]
- public ITaskItem[] Assemblies { get; set; }
-
- [Required]
- public ITaskItem[] OutputDirectories { get; set; }
-
- [Output]
- public string AssemblyName { get; set; }
-
- public override bool Execute()
- {
- AssemblyName name = GetAssemblyName();
- CreateAssemblyInfo(name);
-
- AssemblyName = name.Name;
-
- return true;
- }
-
- AssemblyName GetAssemblyName()
- {
- AssemblyName[] assemblyNames = Assemblies.NullAsEmpty()
- .Select(assembly => System.Reflection.AssemblyName.GetAssemblyName(assembly.ItemSpec))
- .ToArray();
-
- string[] allNames = assemblyNames.Select(name => name.Name).ToArray();
- if (allNames.Distinct().Count() > 1)
- {
- Log.LogWarningCode("NG1003",
- BuildEngine.ProjectFileOfTaskNode,
- "Assembly names should be the same for a bait and switch NuGet package. Names: '{0}' Assemblies: {1}",
- string.Join(", ", allNames),
- string.Join(", ", Assemblies.Select(assembly => assembly.ItemSpec)));
- }
-
- Version[] allVersions = assemblyNames.Select(name => name.Version).ToArray();
- if (allVersions.Distinct().Count() > 1)
- {
- Log.LogWarningCode("NG1004",
- BuildEngine.ProjectFileOfTaskNode,
- "Assembly versions should be the same for a bait and switch NuGet package. Versions: '{0}' Assemblies: {1}",
- string.Join(", ", allVersions.Select(version => version.ToString())),
- string.Join(", ", Assemblies.Select(assembly => assembly.ItemSpec)));
- }
-
- return assemblyNames.FirstOrDefault();
- }
-
- void CreateAssemblyInfo(AssemblyName assemblyName)
- {
- string text = "using System.Reflection;" + Environment.NewLine +
- string.Format("[assembly: AssemblyVersion (\"{0}\")]", assemblyName.Version);
-
- foreach (ITaskItem directory in OutputDirectories.NullAsEmpty())
- {
- string fileName = Path.Combine(directory.ItemSpec, "AssemblyInfo.cs");
- File.WriteAllText(fileName, text);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/GenerateReferenceAssembly.csproj b/src/Build/NuGet.Build.Packaging.Tasks/GenerateReferenceAssembly.csproj
deleted file mode 100644
index a0c250f9..00000000
--- a/src/Build/NuGet.Build.Packaging.Tasks/GenerateReferenceAssembly.csproj
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
- Debug
- AnyCPU
- {9886C7D1-0610-4292-9E13-94EC012D0900}
- {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- true
- Library
-
-
- true
- full
- false
- bin\Debug
- DEBUG;
- prompt
- 4
-
-
- true
- bin\Release
- prompt
- 4
-
-
-
-
- _CollectCompileFiles;
- $(PrepareResourcesDependsOn)
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/GetApiIntersectTargetPaths.cs b/src/Build/NuGet.Build.Packaging.Tasks/GetApiIntersectTargetPaths.cs
deleted file mode 100644
index 00c9109c..00000000
--- a/src/Build/NuGet.Build.Packaging.Tasks/GetApiIntersectTargetPaths.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-using NuGet.Frameworks;
-
-namespace NuGet.Build.Packaging.Tasks
-{
- public class GetApiIntersectTargetPaths : Task
- {
- [Required]
- public ITaskItem[] Frameworks { get; set; }
-
- [Required]
- public ITaskItem[] Assemblies { get; set; }
-
- [Required]
- public ITaskItem RootOutputDirectory { get; set; }
-
- [Output]
- public ITaskItem[] TargetPaths { get; set; }
-
- public override bool Execute()
- {
- string assemblyFileName = GetAssemblyFileName();
-
- TargetPaths = Frameworks.NullAsEmpty()
- .Select(framework => GetTargetPath(framework, assemblyFileName))
- .ToArray();
-
- return true;
- }
-
- string GetAssemblyFileName()
- {
- string[] fileNames = Assemblies.NullAsEmpty()
- .Select(assembly => Path.GetFileName(assembly.ItemSpec))
- .ToArray();
-
- if (fileNames.Distinct().Count() > 1)
- {
- Log.LogWarningCode("NG1003",
- BuildEngine.ProjectFileOfTaskNode,
- "Assembly names should be the same for a bait and switch NuGet package. Names: '{0}' Assemblies: {1}",
- string.Join(", ", fileNames),
- string.Join(", ", Assemblies.Select(assembly => assembly.ItemSpec)));
- }
-
- return fileNames.FirstOrDefault();
- }
-
- private ITaskItem GetTargetPath(ITaskItem framework, string assemblyFileName)
- {
- var nugetFramework = NuGetFramework.Parse(framework.ItemSpec);
- string outputDirectory = GetOutputDirectory(RootOutputDirectory.ItemSpec, nugetFramework);
-
- string outputPath = Path.Combine(outputDirectory, "bin", assemblyFileName);
-
- var item = new TaskItem(outputPath);
- item.SetMetadata(MetadataName.TargetFrameworkMoniker, framework.ItemSpec);
-
- return item;
- }
-
- internal static string GetOutputDirectory(string rootDirectory, NuGetFramework framework)
- {
- return Path.Combine(rootDirectory, GetOutputDirectoryName(framework));
- }
-
- static string GetOutputDirectoryName(NuGetFramework framework)
- {
- if (framework.IsPCL && framework.HasProfile)
- {
- return framework.Profile;
- }
-
- return framework.GetShortFolderName();
- }
- }
-}
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Authoring.props b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Authoring.props
index d6bbc285..b776f603 100644
--- a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Authoring.props
+++ b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Authoring.props
@@ -13,7 +13,7 @@ Copyright (c) .NET Foundation. All rights reserved.
PackageReference
netstandard1.0
- net11;net20;net35;net40;net403;net45;net451;net452;net46;net461;net462;net47;net471;netcore;netcore45;netcore451;netcore50;win8;win81;win10;sl4;sl5;wp;wp7;wp75;wp8;wp81;wpa81;uap;uap10;netstandard1.0;netstandard1.1;netstandard1.2;netstandard1.3;netstandard1.4;netstandard1.5;netstandard1.6;netstandard2.0;netcoreapp1.0;netcoreapp2.0;monoandroid;monotouch;monomac;xamarinios;xamarinmac;xamarinpsthree;xamarinpsfour;xamarinpsvita;xamarinwatchos;xamarintvos;xamarinxboxthreesixty;xamarinxboxone
+ net11;net20;net35;net40;net403;net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;netcore;netcore45;netcore451;netcore50;net5.0;win8;win81;win10;sl4;sl5;wp;wp7;wp75;wp8;wp81;wpa81;uap;uap10;netstandard1.0;netstandard1.1;netstandard1.2;netstandard1.3;netstandard1.4;netstandard1.5;netstandard1.6;netstandard2.0;netstandard2.1;netcoreapp1.0;netcoreapp2.0;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;monoandroid;monotouch;monomac;xamarinios;xamarinmac;xamarinpsthree;xamarinpsfour;xamarinpsvita;xamarinwatchos;xamarintvos;xamarinxboxthreesixty;xamarinxboxone
.nupkg
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Authoring.targets b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Authoring.targets
index 6af93b86..23319003 100644
--- a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Authoring.targets
+++ b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Authoring.targets
@@ -33,7 +33,6 @@ Copyright (c) .NET Foundation. All rights reserved.
-
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Inference.targets b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Inference.targets
index cf0843e9..24ef3b91 100644
--- a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Inference.targets
+++ b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Inference.targets
@@ -10,13 +10,8 @@ Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
-
-
-
- true
-
Lib
@@ -254,19 +249,4 @@ Copyright (c) .NET Foundation. All rights reserved.
-
-
- <_ProjectJson>$(MSBuildProjectDirectory)\project.json
- <_PackagesConfig>$(MSBuildProjectDirectory)\packages.config
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Legacy.props b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Legacy.props
deleted file mode 100644
index c83f7e5b..00000000
--- a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Legacy.props
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
- $(PrimaryOutputPackageFileKind)
-
-
- $(IncludeOutputsInPackage)
-
-
-
\ No newline at end of file
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Legacy.targets b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Legacy.targets
deleted file mode 100644
index 4824a38d..00000000
--- a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Legacy.targets
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
-
- %(Content.IncludeInPackage)
-
-
- %(None.IncludeInPackage)
-
-
-
-
-
-
-
-
- %(ProjectReference.IncludeInPackage)
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.MultiTargeting.targets b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.MultiTargeting.targets
index d5b5a802..ada493bb 100644
--- a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.MultiTargeting.targets
+++ b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.MultiTargeting.targets
@@ -11,10 +11,10 @@ Copyright (c) .NET Foundation. All rights reserved.
-->
-
-
+
+
-
-
-
-
- true
-
-
-
+
+
+ true
+
+
+
-
-
- GetTargetPathWithTargetPlatformMoniker
-
-
+
+
+ GetTargetPathWithTargetPlatformMoniker
+
+
-
-
-
- <_PackageContent Include="@(InnerOutput)" />
-
-
+
+
+ <_PackageContent Include="@(InnerOutput)" />
+
+
-
-
- GetPackageContents
-
-
+
+
+ GetPackageContents
+
+
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.ReferenceAssembly.targets b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.ReferenceAssembly.targets
deleted file mode 100644
index 545f3902..00000000
--- a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.ReferenceAssembly.targets
+++ /dev/null
@@ -1,118 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- $(CleanDependsOn);_CleanReferenceAssemblyIntermediateOutputs
-
-
-
-
- <_ReferenceAssemblyProjects Include="@(_MSBuildProjectReferenceExistent)" Condition="'%(_MSBuildProjectReferenceExistent.Pack)' != 'false'" />
-
-
-
-
-
-
-
-
-
-
-
-
- Lib
- Implicit
- %(_ReferenceAssemblyTargetPath.TargetFrameworkMoniker)
-
-
-
-
-
-
-
- true
- true
-
-
-
- <_IntersectionReferencePath Include="@(IntersectionAssembly->'%(RootDir)%(Directory)')" Condition="'$(EnableDefaultIntersectionAssemblyReferencePath)' == 'true'" />
- <_IntersectionReferencePath Include="$(IntersectionAssemblyReferencePath)" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_ReferenceAssemblyIntermediateOutputDirectories>$([System.IO.Directory]::GetDirectories('$(IntermediateOutputPath)'))
-
-
-
- <_ReferenceAssemblyIntermediateOutputDirectory Include="$(_ReferenceAssemblyIntermediateOutputDirectories)" />
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Tasks.csproj b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Tasks.csproj
index ecffd19f..1683bb5f 100644
--- a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Tasks.csproj
+++ b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Tasks.csproj
@@ -1,58 +1,35 @@
-
-
+
+
- {A3D231D7-31E4-4A70-8CD1-7246C7D069F6}
- net46
+ netstandard2.0
+ NuGetizer
NO-SDK-PACK
-
+ false
+ true
+ true
+ NuGet.Build.Packaging
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
- PreserveNewest
-
-
-
- PreserveNewest
-
+
- buildMultiTargeting\NuGet.Build.Packaging%(Extension)
+ buildMultiTargeting\NuGetizer%(Extension)
+
-
- PublicResXFileCodeGenerator
- Resources.Designer.cs
-
-
-
-
- true
- PrimaryOutputKind=build
- {cd767d93-6c99-4d6a-a303-3c139a73400e}
- ApiIntersect
-
-
-
-
- GlobalAssemblyInfo.cs
-
-
-
-
- True
- True
- Resources.resx
-
+
-
+
+
+
\ No newline at end of file
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Tasks.targets b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Tasks.targets
index 22e2a16a..0a57f9de 100644
--- a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Tasks.targets
+++ b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.Tasks.targets
@@ -1,7 +1,7 @@
-
+
-
+
@@ -14,19 +14,18 @@
$(MSBuildAllProjects);$(MSBuildThisFileFullPath)
- NuGet.Build.Packaging
- NuGetizer-3000
- NuGetizer-3000
+ NuGetizer
+ NuGetizer
+ Simple and flexible NuGet packaging
true
build
- true
true
- ..\..\..\out
+ ..\..\bin
-
+
@@ -53,7 +52,6 @@
PackageItemKind;
$(CoreCompileDependsOn);
- $(IntermediateOutputPath)PackageItemKind.g$(DefaultLanguageSourceExtension)
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.props b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.props
index 5e6cb8a4..0c230589 100644
--- a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.props
+++ b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.props
@@ -11,54 +11,49 @@ Copyright (c) .NET Foundation. All rights reserved.
-->
-
- true
-
-
- NO-SDK-PACK
- false
-
- true
-
-
-
- $(MSBuildThisFileDirectory)
- ApiIntersect.exe
-
-
-
-
-
-
-
-
-
- None
-
+ NO-SDK-PACK
+ false
+
+ true
+
+
+
+
+
+
+
+
+
+ None
+
- Explicit
-
-
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+
- contentFiles
- true
-
-
-
-
- lib
- true
-
-
- build
-
-
- tools
-
-
- native
-
-
- runtimes
-
-
- ref
-
-
- analyzers
-
-
- source
-
-
-
-
+
-
-
-
-
- true
-
+
+
+
+
+ true
+
-
-
+
+
-
-
- true
-
-
+
+
+ true
+
+
-
-
-
+
+
+
-
-
- true
- true
-
+
+
+ true
+ true
+
-
-
+
+
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.targets b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.targets
index b4d44d03..c93608fc 100644
--- a/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.targets
+++ b/src/Build/NuGet.Build.Packaging.Tasks/NuGet.Build.Packaging.targets
@@ -10,54 +10,53 @@ Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
-
-
-
-
-
-
-
-
-
-
- true
-
- false
-
-
- true
- false
-
- true
-
-
- $(OutputPath)
-
-
- $(MSBuildProjectDirectory)\.packonbuild
-
-
- false
-
- $(OutputPath)\$(PackageId).nuspec
-
-
-
-
-
-
-
-
-
-
-
-
- $(IsPackable)
- true
-
-
-
-
+
+
+
+
+ true
+
+ false
+
+
+ true
+ false
+
+ true
+
+
+ $(OutputPath)
+
+
+ $(MSBuildProjectDirectory)\.packonbuild
+
+
+ false
+
+ $(OutputPath)\$(PackageId).nuspec
+
+
+
+
+
+
+
+
+
+
+
+
+ $(IsPackable)
+ true
+
+
+
+
-
-
- $(GetPackageVersionDependsOn);
- _SetDefaultPackageVersion
-
-
-
-
-
- $(Version)
-
-
-
-
-
-
- $(GetPackageTargetPathDependsOn);
- GetPackageVersion;
- _SetDefaultPackageTargetPath;
-
-
-
-
-
-
-
- $(PackageId)
- $(PackageVersion)
- true
-
- $(Authors)
- $(Owners)
- $(Title)
- $(Description)
- $(Summary)
- $(NeutralLanguage)
- $(Copyright)
-
- $(PackageRequireLicenseAcceptance)
- $(PackageLicenseUrl)
- $(PackageProjectUrl)
- $(PackageIconUrl)
- $(PackageTags)
-
- $(PackageReleaseNotes)
- $(RepositoryUrl)
- $(RepositoryType)
- $(PackageType)
-
-
-
-
-
- $([System.IO.Path]::Combine('$(PackageOutputPath)', '$(PackageId).$(PackageVersion).nupkg'))
-
-
-
-
+
+ $(PackageId)
+ $(PackageVersion)
+ true
+
+ $(Authors)
+ $(Owners)
+ $(Title)
+ $(Description)
+ $(Summary)
+ $(NeutralLanguage)
+ $(Copyright)
+
+ $(PackageRequireLicenseAcceptance)
+ $(PackageLicenseUrl)
+ $(PackageProjectUrl)
+ $(PackageIconUrl)
+ $(PackageTags)
+
+ $(PackageReleaseNotes)
+ $(RepositoryUrl)
+ $(RepositoryType)
+ $(PackageType)
+
+
+
+
+
+ $([System.IO.Path]::Combine('$(PackageOutputPath)', '$(PackageId).$(PackageVersion).nupkg'))
+
+
+
+
-
- GetPackageTargetPath;$(PackageOutputGroupDependsOn)
-
-
+
+ GetPackageTargetPath;$(PackageOutputGroupDependsOn)
+
+
-
-
-
- $(GetPackageContentsDependsOn);
- GetPackageTargetPath;
- _AddPackageManifest
-
-
- $(GetPackageContentsDependsOn);
- _GetReferencedPackageContents
-
-
-
-
-
-
-
- $(PackageId)
- $(Platform)
- $(TargetFrameworkMoniker)
-
-
-
-
-
-
-
-
-
-
-
-
-
- Metadata
- $(PackageId)
- $(Platform)
- $(TargetFrameworkMoniker)
-
-
-
-
-
+
+
+
+
+
+
+
+
+ Metadata
+ $(PackageId)
+ $(Platform)
+ $(TargetFrameworkMoniker)
+
+
+
+
+
-
+ Text="Some project references cannot be properly packaged. Please install the NuGetizer package on the following projects: @(_NonNuGetizedProjectReference)." />
-
-
-
-
-
+
+
-
- <_ReferencedPackageDependency Include="@(_ReferencedPackageContent)"
+
+ <_ReferencedPackageDependency Include="@(_ReferencedPackageContent)"
Condition="'%(_ReferencedPackageContent.PackageId)' != '$(PackageId)' and '%(_ReferencedPackageContent.Kind)' == 'Metadata'">
-
- $(PackageId)
- $(TargetFrameworkMoniker)
- Dependency
-
-
- <_PackageContentFromDependency Include="@(_ReferencedPackageContent)"
+
+ $(PackageId)
+ $(TargetFrameworkMoniker)
+ Dependency
+
+
+ <_PackageContentFromDependency Include="@(_ReferencedPackageContent)"
Condition="'%(_ReferencedPackageContent.PackageId)' != '' and
'%(_ReferencedPackageContent.PackageId)' != '$(PackageId)'" />
- <_ReferencedPackageContent Remove="@(_PackageContentFromDependency)" />
-
+ <_ReferencedPackageContent Remove="@(_PackageContentFromDependency)" />
+
-
-
+
-
-
-
-
-
- <_ReferencedPackageContentWithOriginalValues Condition="'%(_ReferencedPackageContentWithOriginalValues.PackageId)' == ''">
- $(PackageId)
-
-
-
-
+ <_ReferencedPackageContentWithOriginalValues Condition="'%(_ReferencedPackageContentWithOriginalValues.PackageId)' == ''">
+ $(PackageId)
+
+
+
+
- $(TargetFrameworkMoniker)
-
-
-
-
-
- <_ReferencedPackageContentWithOriginalValues Condition="'%(_ReferencedPackageContentWithOriginalValues.PackageId)' == ''">
- $(PackageId)
-
-
-
- %(_ReferencedPackageContentWithOriginalValues.OriginalTargetFrameworkMoniker)
-
-
-
-
-
+
+
+ <_ReferencedPackageContentWithOriginalValues Condition="'%(_ReferencedPackageContentWithOriginalValues.PackageId)' == ''">
+ $(PackageId)
+
+
+
+ %(_ReferencedPackageContentWithOriginalValues.OriginalTargetFrameworkMoniker)
+
+
+
+
+
-
- $(BuildingPackage)
-
-
-
-
-
-
+ $(BuildingPackage)
+
+
+
+
+
+
-
-
-
-
-
- <_IsNuGetized Condition="'%(_ReferencedProjectTargetPath.IsNuGetized)' != ''">true
-
-
-
-
- <_NonNuGetizedProjectReference Include="@(_MSBuildProjectReferenceExistent)" Condition="'%(_MSBuildProjectReferenceExistent.Pack)' != 'false' and '$(_IsNuGetized)' != 'true'" />
-
- <_NuGetizedProjectReference Include="@(_MSBuildProjectReferenceExistent)" Condition="'%(_MSBuildProjectReferenceExistent.Pack)' != 'false' and '$(_IsNuGetized)' == 'true'" />
-
-
-
-
-
-
- <_ShouldPackOnBuild Condition="('$(PackOnBuild)' == 'true' Or Exists('$(PackOnBuildFile)')) And '$(IsPackable)' == 'true'">true
-
- $(BuildDependsOn);
- Pack;
-
-
-
- Build;
-
-
- $(PackDependsOn)
- GetPackageTargetPath;
- GetPackageContents
-
-
-
-
+
+
+ <_NonNuGetizedProjectReference Include="@(_MSBuildProjectReferenceExistent)" Condition="'$(_IsNuGetized)' != 'true'" />
+
+ <_NuGetizedProjectReference Include="@(_MSBuildProjectReferenceExistent)" Condition="'$(_IsNuGetized)' == 'true'" />
+
+
+
+
+
+
+ <_ShouldPackOnBuild Condition="('$(PackOnBuild)' == 'true' Or Exists('$(PackOnBuildFile)')) And '$(IsPackable)' == 'true'">true
+
+ $(BuildDependsOn);
+ Pack;
+
+
+
+ Build;
+
+
+ $(PackDependsOn)
+ GetPackageTargetPath;
+ GetPackageContents
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
- <_AllProjectCapabilities>@(ProjectCapability)
-
- <_SupportsProjectReferences>$(_AllProjectCapabilities.Contains('ProjectReferences'))
- <_GetReferencedPackageContentsDependsOn Condition="'$(_SupportsProjectReferences)' == 'true'">
- $(_GetReferencedPackageContentsDependsOn);
- AssignProjectConfiguration;
- _SplitProjectReferencesByFileExistence;
- _SplitProjectReferencesByIsNuGetized
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ <_AllProjectCapabilities>@(ProjectCapability)
+
+ <_SupportsProjectReferences>$(_AllProjectCapabilities.Contains('ProjectReferences'))
+ <_GetReferencedPackageContentsDependsOn Condition="'$(_SupportsProjectReferences)' == 'true'">
+ $(_GetReferencedPackageContentsDependsOn);
+ AssignProjectConfiguration;
+ _SplitProjectReferencesByFileExistence;
+ _SplitProjectReferencesByIsNuGetized
+
+
+
+
+
+
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/NuGetizer.props b/src/Build/NuGet.Build.Packaging.Tasks/NuGetizer.props
new file mode 100644
index 00000000..30dd346d
--- /dev/null
+++ b/src/Build/NuGet.Build.Packaging.Tasks/NuGetizer.props
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/NuGetizer.targets b/src/Build/NuGet.Build.Packaging.Tasks/NuGetizer.targets
new file mode 100644
index 00000000..e8e297a5
--- /dev/null
+++ b/src/Build/NuGet.Build.Packaging.Tasks/NuGetizer.targets
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/Program.cs b/src/Build/NuGet.Build.Packaging.Tasks/Program.cs
deleted file mode 100644
index d08bf312..00000000
--- a/src/Build/NuGet.Build.Packaging.Tasks/Program.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using System;
-
-namespace NuGet.Build.Packaging
-{
- class Program
- {
- [STAThread]
- public static void Main(string[] args) { }
- }
-}
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/Properties/Resources.Designer.cs b/src/Build/NuGet.Build.Packaging.Tasks/Properties/Resources.Designer.cs
deleted file mode 100644
index 912df383..00000000
--- a/src/Build/NuGet.Build.Packaging.Tasks/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace NuGet.Build.Packaging.Properties {
- using System;
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- public class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- public static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NuGet.Build.Packaging.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- public static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
-
- ///
- /// Looks up a localized string similar to Package file '{0}' must have either 'Kind' or 'PackagePath' metadata..
- ///
- public static string ErrorCode_NG0010 {
- get {
- return ResourceManager.GetString("ErrorCode_NG0010", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Project references to include in package must be nugetized..
- ///
- public static string ErrorCode_NG0011 {
- get {
- return ResourceManager.GetString("ErrorCode_NG0011", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Duplicate package source files with distinct content detected. Duplicates are not allowed in the package. Please remove the conflict between these files:
- ///{0}.
- ///
- public static string ErrorCode_NG0012 {
- get {
- return ResourceManager.GetString("ErrorCode_NG0012", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Content files cannot specify the reserved 'contentFiles' relative directory. Please use the 'CodeLanguage' and 'TargetFramework' item metadata for '{0}' to control its relative path within 'contentFiles'..
- ///
- public static string ErrorCode_NG0013 {
- get {
- return ResourceManager.GetString("ErrorCode_NG0013", resourceCulture);
- }
- }
- }
-}
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/ReadLegacyConfigDependencies.cs b/src/Build/NuGet.Build.Packaging.Tasks/ReadLegacyConfigDependencies.cs
deleted file mode 100644
index 9999510d..00000000
--- a/src/Build/NuGet.Build.Packaging.Tasks/ReadLegacyConfigDependencies.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-using System;
-using System.Linq;
-using System.IO;
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-using Newtonsoft.Json.Linq;
-using NuGet.ProjectManagement;
-using System.Collections.Generic;
-using NuGet.Packaging.Core;
-using System.Xml.Linq;
-using NuGet.Packaging;
-using NuGet.Versioning;
-
-namespace NuGet.Build.Packaging.Tasks
-{
- public class ReadLegacyConfigDependencies : Task
- {
- [Required]
- public ITaskItem PackagesConfigPath { get; set; }
-
- [Output]
- public ITaskItem[] PackageReferences { get; set; }
-
- public override bool Execute()
- {
- var fullPath = PackagesConfigPath.GetMetadata("FullPath");
- var config = XDocument.Load(fullPath);
- PackageReferences = new PackagesConfigReader(config).GetPackages()
- .Where(reference => !reference.IsDevelopmentDependency)
- .Select(ConvertToTaskItem)
- .ToArray();
-
- return true;
- }
-
- static ITaskItem ConvertToTaskItem(PackageReference reference)
- {
- var metadata = new Dictionary();
- if (reference.HasAllowedVersions)
- metadata.Add("Version", reference.AllowedVersions.ToString());
- else if (reference.PackageIdentity.HasVersion)
- metadata.Add("Version", VersionRange.Parse(reference.PackageIdentity.Version.ToString()).ToString());
-
- return new TaskItem(reference.PackageIdentity.Id, metadata);
- }
- }
-}
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/ReadLegacyJsonDependencies.cs b/src/Build/NuGet.Build.Packaging.Tasks/ReadLegacyJsonDependencies.cs
deleted file mode 100644
index d1b52cdd..00000000
--- a/src/Build/NuGet.Build.Packaging.Tasks/ReadLegacyJsonDependencies.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-using System;
-using System.Linq;
-using System.IO;
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-using Newtonsoft.Json.Linq;
-using NuGet.ProjectManagement;
-using System.Collections.Generic;
-using NuGet.Packaging.Core;
-
-namespace NuGet.Build.Packaging.Tasks
-{
- public class ReadLegacyJsonDependencies : Task
- {
- [Required]
- public ITaskItem ProjectJsonPath { get; set; }
-
- [Output]
- public ITaskItem[] PackageReferences { get; set; }
-
- public override bool Execute()
- {
- var fullPath = ProjectJsonPath.GetMetadata("FullPath");
- using (var reader = new StreamReader(fullPath))
- {
- var json = JObject.Parse(reader.ReadToEnd());
- PackageReferences = JsonConfigUtility.GetDependencies(json)
- .Select(ConvertToTaskItem)
- .ToArray();
- }
-
- return true;
- }
-
- static ITaskItem ConvertToTaskItem(PackageDependency dependency)
- {
- var metadata = new Dictionary
- {
- { "Version", dependency.VersionRange.ToString() },
- };
-
- // NOTE: due to https://github.com/NuGet/Home/issues/520,
- // we currently have no way of determining if the dependency is a
- // development dependency. We'll just skip our own package id for now.
- if (dependency.Id == ThisAssembly.Project.Properties.PackageId)
- metadata.Add("PrivateAssets", "All");
-
- return new TaskItem(dependency.Id, metadata);
- }
- }
-}
diff --git a/src/Build/NuGet.Build.Packaging.Tasks/Properties/Resources.resx b/src/Build/NuGet.Build.Packaging.Tasks/Resources.resx
similarity index 99%
rename from src/Build/NuGet.Build.Packaging.Tasks/Properties/Resources.resx
rename to src/Build/NuGet.Build.Packaging.Tasks/Resources.resx
index 5307508d..0a63a5d9 100644
--- a/src/Build/NuGet.Build.Packaging.Tasks/Properties/Resources.resx
+++ b/src/Build/NuGet.Build.Packaging.Tasks/Resources.resx
@@ -124,8 +124,7 @@
Project references to include in package must be nugetized.
- Duplicate package source files with distinct content detected. Duplicates are not allowed in the package. Please remove the conflict between these files:
-{0}
+ Duplicate package source files with distinct content detected. Duplicates are not allowed in the package. Please remove the conflict between these files: {0}
Content files cannot specify the reserved 'contentFiles' relative directory. Please use the 'CodeLanguage' and 'TargetFramework' item metadata for '{0}' to control its relative path within 'contentFiles'.
diff --git a/src/Build/NuGet.Build.Packaging.Tests/AssignPackagePathTests.cs b/src/Build/NuGet.Build.Packaging.Tests/AssignPackagePathTests.cs
index 559b1bb4..5a552388 100644
--- a/src/Build/NuGet.Build.Packaging.Tests/AssignPackagePathTests.cs
+++ b/src/Build/NuGet.Build.Packaging.Tests/AssignPackagePathTests.cs
@@ -7,40 +7,37 @@
using Xunit.Abstractions;
using System.Linq;
using NuGet.Build.Packaging.Tasks;
-using static NuGet.Build.Packaging.Properties.Strings;
using Metadata = System.Collections.Generic.Dictionary;
using System;
-using NuGet.Build.Packaging.Properties;
namespace NuGet.Build.Packaging
{
public class AssignPackagePathTests
{
- static readonly ITaskItem[] kinds;
+ static ITaskItem[] kinds;
+
+ static ITaskItem[] Kinds
+ => kinds ??= new Project(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "NuGet.Build.Packaging.props"), null, null, new ProjectCollection())
+ .GetItems("PackageItemKind")
+ .Select(item => new TaskItem(item.EvaluatedInclude, item.Metadata.ToDictionary(meta => meta.Name, meta => meta.UnevaluatedValue)))
+ .ToArray();
+
ITestOutputHelper output;
MockBuildEngine engine;
- static AssignPackagePathTests()
- {
- kinds = new Project(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "NuGet.Build.Packaging.props"), null, null, new ProjectCollection())
- .GetItems("PackageItemKind")
- .Select(item => new TaskItem(item.EvaluatedInclude, item.Metadata.ToDictionary(meta => meta.Name, meta => meta.UnevaluatedValue)))
- .ToArray();
- }
-
public AssignPackagePathTests(ITestOutputHelper output)
{
this.output = output;
engine = new MockBuildEngine(output);
- }
+ }
- [Fact]
+ [Fact]
public void when_file_has_no_kind_then_logs_error_code()
{
var task = new AssignPackagePath
{
BuildEngine = engine,
- Kinds = kinds,
+ Kinds = Kinds,
Files = new ITaskItem[]
{
new TaskItem("library.dll", new Metadata
@@ -52,7 +49,7 @@ public void when_file_has_no_kind_then_logs_error_code()
};
Assert.False(task.Execute());
- Assert.Equal(nameof(ErrorCode.NG0010), engine.LoggedErrorEvents[0].Code);
+ Assert.Equal(nameof(ThisAssembly.Strings.ErrorCode.NG0010), engine.LoggedErrorEvents[0].Code);
}
[Fact]
@@ -61,7 +58,7 @@ public void when_file_has_no_kind_and_no_framework_specific_then_it_is_not_assig
var task = new AssignPackagePath
{
BuildEngine = engine,
- Kinds = kinds,
+ Kinds = Kinds,
Files = new ITaskItem[]
{
new TaskItem("library.dll", new Metadata
@@ -86,7 +83,7 @@ public void when_file_has_no_kind_and_package_path_and_framework_specific_then_i
var task = new AssignPackagePath
{
BuildEngine = engine,
- Kinds = kinds,
+ Kinds = Kinds,
Files = new ITaskItem[]
{
new TaskItem("library.dll", new Metadata
@@ -112,7 +109,7 @@ public void assigned_files_contains_all_files()
var task = new AssignPackagePath
{
BuildEngine = engine,
- Kinds = kinds,
+ Kinds = Kinds,
Files = new ITaskItem[]
{
new TaskItem("a.dll", new Metadata
@@ -141,7 +138,7 @@ public void when_file_has_no_package_id_then_package_path_is_not_specified()
var task = new AssignPackagePath
{
BuildEngine = engine,
- Kinds = kinds,
+ Kinds = Kinds,
Files = new ITaskItem[]
{
new TaskItem("library.dll", new Metadata
@@ -163,7 +160,7 @@ public void when_file_has_no_package_id_but_is_packaging_true_then_package_path_
{
IsPackaging = "true",
BuildEngine = engine,
- Kinds = kinds,
+ Kinds = Kinds,
Files = new ITaskItem[]
{
new TaskItem("library.dll", new Metadata
@@ -184,7 +181,7 @@ public void when_file_has_no_package_id_then_target_framework_is_calculated_anyw
var task = new AssignPackagePath
{
BuildEngine = engine,
- Kinds = kinds,
+ Kinds = Kinds,
Files = new ITaskItem[]
{
new TaskItem("library.dll", new Metadata
@@ -208,7 +205,7 @@ public void when_file_has_no_package_id_then_package_folder_is_calculated_anyway
var task = new AssignPackagePath
{
BuildEngine = engine,
- Kinds = kinds,
+ Kinds = Kinds,
Files = new ITaskItem[]
{
new TaskItem("library.dll", new Metadata
@@ -232,7 +229,7 @@ public void when_file_has_no_tfm_then_assigned_file_contains_no_target_framework
var task = new AssignPackagePath
{
BuildEngine = engine,
- Kinds = kinds,
+ Kinds = Kinds,
Files = new ITaskItem[]
{
new TaskItem("library.dll", new Metadata
@@ -258,7 +255,7 @@ public void when_file_has_target_framework_and_tfm_then_existing_value_is_preser
var task = new AssignPackagePath
{
BuildEngine = engine,
- Kinds = kinds,
+ Kinds = Kinds,
Files = new ITaskItem[]
{
new TaskItem("library.dll", new Metadata
@@ -285,7 +282,7 @@ public void when_content_file_has_link_then_package_path_is_relative_to_link()
var task = new AssignPackagePath
{
BuildEngine = engine,
- Kinds = kinds,
+ Kinds = Kinds,
Files = new ITaskItem[]
{
new TaskItem(@"..\..\readme.txt", new Metadata
@@ -313,7 +310,7 @@ public void when_none_file_has_link_then_package_path_is_relative_to_link()
var task = new AssignPackagePath
{
BuildEngine = engine,
- Kinds = kinds,
+ Kinds = Kinds,
Files = new ITaskItem[]
{
new TaskItem(@"..\..\readme.txt", new Metadata
@@ -342,7 +339,7 @@ public void when_content_is_not_framework_specific_then_has_any_lang_and_tfm()
var task = new AssignPackagePath
{
BuildEngine = engine,
- Kinds = kinds,
+ Kinds = Kinds,
Files = new ITaskItem[]
{
new TaskItem("readme.txt", new Metadata
@@ -378,7 +375,7 @@ public void when_file_has_tfm_then_assigned_file_contains_target_framework(strin
var task = new AssignPackagePath
{
BuildEngine = engine,
- Kinds = kinds,
+ Kinds = Kinds,
Files = new ITaskItem[]
{
new TaskItem("library.dll", new Metadata
@@ -400,21 +397,21 @@ public void when_file_has_tfm_then_assigned_file_contains_target_framework(strin
}));
}
- public static IEnumerable