Visual Studio プロジェクトの NuGet.Config ファイルはどこにありますか? 質問する

Visual Studio プロジェクトの NuGet.Config ファイルはどこにありますか? 質問する

Visual Studio の NuGet.Config ファイルがどこにあるか知りたいのですが2017プロジェクトですか? プロジェクトのルートに独自の NuGet.Config ファイルを作成しようとしましたが、新しいリポジトリ (NuGet ソース) が見つかりませんでした。誰か何かアイデアはありますか?

これは私が達成しようとしているファイルです.Net コアプロジェクト:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="AspNetCore" value="https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json" />
    <add key="AspNetCoreTools" value="https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json" />
    <add key="NuGet" value="https://api.nuget.org/v3/index.json" />
  </packageSources>
</configuration>

ベストアンサー1

Visual Studio は、ソリューション ルートから NuGet.Config ファイルを読み取ります。プロジェクトと同じフォルダーに配置するのではなく、そこに移動してみてください。

ファイルを に配置する%appdata%\NuGet\NuGet.Configと、どこでも使用できるようになります。

https://learn.microsoft.com/en-us/nuget/schema/nuget-config-file

おすすめ記事