我想将项目的packages.config
复制到新创建的项目中,并在VS2015 SP3中添加引用。
This post介绍Update-Package -Reinstall -ProjectName Your.Project.Name
,但它无法正常工作。并非所有软件包都添加到项目中,即使它具有相同的构建环境(.NET 4.5.2控制台应用程序)。此外,它会在重新安装过程之后将packages.config
覆盖为仅添加的包。
如何正确地做到这一点?
+附加以下是我的实际packages.config
内容。
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net452" />
<package id="Microsoft.Azure.WebJobs" version="1.1.2" targetFramework="net452" />
<package id="Microsoft.Azure.WebJobs.Core" version="1.1.2" targetFramework="net452" />
<package id="Microsoft.Azure.WebJobs.Extensions" version="1.0.1" targetFramework="net452" />
<package id="Microsoft.Data.Edm" version="5.8.1" targetFramework="net452" />
<package id="Microsoft.Data.OData" version="5.8.1" targetFramework="net452" />
<package id="Microsoft.Data.Services.Client" version="5.8.1" targetFramework="net452" />
<package id="Microsoft.EntityFrameworkCore" version="1.1.0" targetFramework="net452" />
<package id="Microsoft.EntityFrameworkCore.Relational" version="1.1.0" targetFramework="net452" />
<package id="Microsoft.EntityFrameworkCore.SqlServer" version="1.1.0" targetFramework="net452" />
<package id="Microsoft.Extensions.Caching.Abstractions" version="1.1.0" targetFramework="net452" />
<package id="Microsoft.Extensions.Caching.Memory" version="1.1.0" targetFramework="net452" />
<package id="Microsoft.Extensions.DependencyInjection" version="1.1.0" targetFramework="net452" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="1.1.0" targetFramework="net452" />
<package id="Microsoft.Extensions.Logging" version="1.1.0" targetFramework="net452" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="1.1.0" targetFramework="net452" />
<package id="Microsoft.Extensions.Options" version="1.1.0" targetFramework="net452" />
<package id="Microsoft.Extensions.Primitives" version="1.1.0" targetFramework="net452" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net452" />
<package id="Microsoft.Tpl.Dataflow" version="4.5.24" targetFramework="net452" />
<package id="Microsoft.Web.WebJobs.Publish" version="1.0.12" targetFramework="net452" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.2.3" targetFramework="net452" />
<package id="ncrontab" version="2.0.0" targetFramework="net452" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="net452" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
<package id="Remotion.Linq" version="2.1.1" targetFramework="net452" />
<package id="SimpleInjector" version="3.3.2" targetFramework="net452" />
<package id="SimpleInjector.Extensions.ExecutionContextScoping" version="3.3.2" targetFramework="net452" />
<package id="SlowCheetah" version="2.5.15" targetFramework="net452" />
<package id="System.Collections" version="4.3.0" targetFramework="net452" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net452" />
<package id="System.Collections.Immutable" version="1.3.1" targetFramework="net452" />
<package id="System.ComponentModel" version="4.3.0" targetFramework="net452" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net452" />
<package id="System.Diagnostics.DiagnosticSource" version="4.3.0" targetFramework="net452" />
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net452" />
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net452" />
<package id="System.Globalization" version="4.3.0" targetFramework="net452" />
<package id="System.Interactive.Async" version="3.0.0" targetFramework="net452" />
<package id="System.IO" version="4.3.0" targetFramework="net452" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net452" />
<package id="System.Linq" version="4.3.0" targetFramework="net452" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net452" />
<package id="System.Linq.Queryable" version="4.3.0" targetFramework="net452" />
<package id="System.Net.Http" version="4.3.0" targetFramework="net452" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="net452" />
<package id="System.ObjectModel" version="4.3.0" targetFramework="net452" />
<package id="System.Reflection" version="4.3.0" targetFramework="net452" />
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net452" />
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net452" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net452" />
<package id="System.Runtime" version="4.3.0" targetFramework="net452" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.3.0" targetFramework="net452" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net452" />
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net452" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net452" />
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net452" />
<package id="System.Spatial" version="5.8.1" targetFramework="net452" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net452" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net452" />
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net452" />
<package id="System.Threading" version="4.3.0" targetFramework="net452" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net452" />
<package id="System.Threading.Timer" version="4.3.0" targetFramework="net452" />
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net452" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net452" />
<package id="WindowsAzure.Storage" version="8.0.1" targetFramework="net452" />
</packages>