将 packages.config 更改为 somethingelse.config [英] Changing packages.config to somethingelse.config

查看:48
本文介绍了将 packages.config 更改为 somethingelse.config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个 ASP.NET MVC 4.5 应用程序.
现在我想将packages.config 更改为mypackages1.config.文件的简单重命名.

I created an ASP.NET MVC 4.5 application.
Now I want to change packages.config to mypackages1.config. A simple renaming of the file.

我编辑了 .csproj 文件并按上述重命名.
我如上所述重命名了packages.config 文件.
我编辑了 repositories.config 并如上所述进行了更改.

I edited .csproj file and renamed as mentioned.
I renamed packages.config file as mentioned.
I edited repositories.config and made changes as mentioned.

但是,当我发出 Install-Package somepackage 时,它​​创建了一个新的 packages.config 文件.

But, when I issued Install-Package somepackage, it created a new packages.config file.

有没有办法重命名我的packages.config文件?我的解决方案中还没有 .nuget 文件夹.

Is there a way I can rename my packages.config file? I don't yet have .nuget folder in my solution.

推荐答案

这不受支持.您不能将packages.config 文件更改为任意名称.

This is not supported. You cannot change the packages.config file to any arbitrary name.

NuGet 唯一支持的是以项目文件本身命名的 packages.config 文件.这允许多个项目文件 (.csproj) 位于同一目录中.因此,如果您的项目名为 FooBar.csproj,您可以拥有一个名为:

The only thing NuGet supports is to have the packages.config file named after the project file itself. This allows multiple project files (.csproj) to be in the same directory. So if your project is called FooBar.csproj you can have a packages.config file named:

packages.FooBar.config

这篇关于将 packages.config 更改为 somethingelse.config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆