Visual Studio 始终使用 Paket 重建解决方案

Visual Studio always rebuilds solution with Paket

我对 Visual Studio 中的包使用 Paket 而不是 Nuget 非常感兴趣。

到目前为止效果还不错。但问题是,Visual Studio 总是认为每个项目的 app.config 已被更改。但是查看我在 Git 工具中所做的更改,没有任何变化。即使我直接在 运行 之前构建,例如我的单元测试。

你有什么建议吗?

我的 paket.dependencies 看起来像这样:

// Only the target frameworks that are used in projects.
framework: net461
content: none

source https://api.nuget.org/v3/index.json
source http://myownnugetrepo.com/nexus/

nuget SharpZipLib 0.86.0
nuget Autofac.WebApi2.Owin
nuget My.Own.Package redirects: on
nuget EasyNetQ.DI.Autofac
nuget EFInteractiveViews
nuget ExcelDataReader.DataSet
nuget FluentAssertions
nuget Microsoft.AspNet.WebApi.OwinSelfHost 
nuget Microsoft.CSharp
nuget Microsoft.Diagnostics.Tracing.EventSource
nuget Microsoft.Graph
nuget Microsoft.Identity.Client
nuget Microsoft.IdentityModel.Clients.ActiveDirectory 
nuget Microsoft.VisualStudio.SlowCheetah
nuget NSubstitute
nuget NUnit
nuget Oracle.ManagedDataAccess.EntityFramework
nuget RestSharp.Newtonsoft.Json.Extensions 
nuget Serilog.Sinks.Async
nuget Serilog.Sinks.Console
nuget Serilog.Sinks.RollingFile
nuget Swashbuckle
nuget Topshelf.Serilog

Visual Studio 说了什么(如果使用 Diagonistic 模式构建):

Project 'My.Project' is not up to date. Input file 'C:\Projects\My.Project\src\My.Project.Interface\app.config' is modified after output file ''.

好的,我知道了。在睡过头之后,我发现了一个 Paket 命令来执行此操作:

paket auto-restore on

这解决了我的问题。我认为这是通过将项目从 nuget 转换为 paket 自动完成的,但事实并非如此。现在可以了。