Configure Nuget Package Source using Visual Studio Code to add packages from my local Folder.
- First I added an extension for Nuget Package Manager GUI
- In settings below is what I added.
{
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"git.terminalAuthentication": false,
"terminal.integrated.rendererType": "canvas",
"workbench.editorAssociations": {
"*.ipynb": "jupyter.notebook.ipynb"
},
,
"workbench.colorTheme": "Visual Studio Light",
"explorer.confirmDragAndDrop": false,
"nugetpackagemanagergui.nuget.searchPackage.urls": [
"C:\\packages"
],
"nuget"
}
- I also included a nuget.config file in my project root folder. "C:\packages"
- Now how do I add my custom created nuget package to my project.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="MyLocalNuget" value="C:\packages" />
</packageSources>
</configuration>
- Below command fails to execute, I get this message "There are no versions available for the package 'Framework.Blazor.1.0.0'."
dotnet add package Framework.Blazor.1.0.0
References are not added to my Project File
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.2" PrivateAssets="all" />
</ItemGroup>
</Project>
Please suggest what I missed. Thank you