nuget-package

Nuget Issue - 404 for all packages

落花浮王杯 提交于 2021-02-10 15:40:22
问题 I have been having some troubles with the nuget package manager. Firstly, I was suddenly unable to search nuget. If I tried to install something through the packet manager console, I would get the following error PM> Install-Package Microsoft.Bcl.Async Install-Package : The ServicePointManager does not support proxies with the https scheme. At line:1 char:16 + Install-Package <<<< Microsoft.Bcl.Async + CategoryInfo : NotSpecified: (:) [Install-Package], NotSupportedException +

dotnet restore not using PackageReference condition

落花浮王杯 提交于 2021-02-09 09:21:06
问题 my project has multiple target frameworks, 2 of the package reference need to use a different version for .net461 when building in VS 2017 everything works and the dependency shows using the right versions. but when build using dotnet cli, the dependency shows the wrong version is being use for .net461. is this a bug in dotnet cli? I also try putting those 2 pkg in another ItemGroup tag with condition but still the same update: for anyone else running in to this issue, I ended up using

Copy nuget package content file (of type .exe) to output directory of project using that nuget package

主宰稳场 提交于 2021-02-08 11:16:28
问题 I have some project which has some exe as "dependency" and I build that project as nuget package from .csproj file File looks like this: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> <Nullable>enable</Nullable> <LangVersion>latest</LangVersion> <Version>1.1.2</Version> <PackageId>MyLib</PackageId> <Authors>me</Authors> <Company>me</Company> </PropertyGroup> <ItemGroup> <None Remove="CliInterface\32BitInterface.exe" /> </ItemGroup>

Copy nuget package content file (of type .exe) to output directory of project using that nuget package

允我心安 提交于 2021-02-08 11:14:11
问题 I have some project which has some exe as "dependency" and I build that project as nuget package from .csproj file File looks like this: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> <Nullable>enable</Nullable> <LangVersion>latest</LangVersion> <Version>1.1.2</Version> <PackageId>MyLib</PackageId> <Authors>me</Authors> <Company>me</Company> </PropertyGroup> <ItemGroup> <None Remove="CliInterface\32BitInterface.exe" /> </ItemGroup>

Access remote Oracle database with Powershell

折月煮酒 提交于 2021-02-07 18:27:30
问题 I need to be able to connect to an Windows 7 based Oracle server (32 bit, Oracle XE) which is on my network. The machine I need to connect from is running Windows 7 64 bit, with Powershell installed on both machines. I have installed the Oracle 32 bit client on my 64 bit machine and have SQL Developer installed on both machines. I want to create a script that connects the the Oracle database and runs a simple SELECT query. I can't get it to connect though. I have tried using ODAC (I think I

Visual Studio - Nuget - Unable to load the service index for source

混江龙づ霸主 提交于 2021-02-07 14:05:38
问题 This is my NuGet.config : <?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> </packageSources> <disabledPackageSources> <add key="Microsoft and .NET" value="true" /> </disabledPackageSources> </configuration> Now, in Visual Studio, when I try to install 'geckofx45' package, I get the following error : install-package geckofx45 install-package : Unable to load the service index for

Regex to parse package name and version number from nuget package filenames

浪尽此生 提交于 2021-02-07 13:41:02
问题 I have a directory of nuget packages that I've downloaded from nuget.org. I'm trying to create a regex that will parse out the package name and version number from the filename. It doesn't seem difficult at first glance; the filenames have a clear pattern: {PackageName}.{VersionNumber}.nupkg Edge cases make it challenging though. Package names can have dashes, underscores, and numbers Package names can have effectively unlimited parts separated by dots Version numbers consist of 3-4 groups of

Regex to parse package name and version number from nuget package filenames

陌路散爱 提交于 2021-02-07 13:39:45
问题 I have a directory of nuget packages that I've downloaded from nuget.org. I'm trying to create a regex that will parse out the package name and version number from the filename. It doesn't seem difficult at first glance; the filenames have a clear pattern: {PackageName}.{VersionNumber}.nupkg Edge cases make it challenging though. Package names can have dashes, underscores, and numbers Package names can have effectively unlimited parts separated by dots Version numbers consist of 3-4 groups of

Override a nuget package reference with a local project reference

久未见 提交于 2021-02-07 06:47:41
问题 I'd like iterate on a nuget package without continuously pushing the package to a nuget feed. I'm wondering if it's possible to conditionally add a project reference instead of a nuget package reference via a target or props file in csproj files that would allow me to locally debug my nuget package. In my csproj I would have: <Reference Include="A"> if(Exists(localOverrides.props) { <HintPath>localOverrides.A.HintPath</HintPath> } else { <HintPath>..\packages\A.dll</HintPath> } </Reference>

Nuget copy and add files to solution level

帅比萌擦擦* 提交于 2021-02-07 06:47:28
问题 I want to create a NUGET package that adds several files to a certain solution folder. Specifically, the package must, on installation, do the following: Create a temp folder in the target project. Copy all the files matching an extension (say *.txt) to the temp folder. Move the files to Solution root. Create a Solution folder named "Solution Items". Add all the files just moved to that solution folder. Remove the temp folder from both solution and disk. I use the package.nuspec file to