dotnet-cli

Push a NuGet package to VSTS with .NET CLI

为君一笑 提交于 2020-06-25 01:26:07
问题 I'm trying to publish a NuGet package to a private VSTS feed. I'd like to achieve that using only .NET CLI and without creating or modifying a nuget.config file. I've tried to do: dotnet nuget push <PackageName> --source https://XXX.pkgs.visualstudio.com/_packaging/YYY/nuget/v3/index.json --api-key <VSTS UserName>:<PersonalAccessToken> I get: error: Unable to load the service index for source https://XXX.pkgs.visualstudio.com/_packaging/YYY/nuget/v3/index.json. error: Response status code

How to “dotnet pack” an already compiled project

笑着哭i 提交于 2020-05-27 07:47:39
问题 I'm trying to design a build script for a dotnet core 2.0 project that does the following actions Cleans output directories Builds Solution with -o bin\Publish Runs Unit Tests with dotnet vstest Creates a Nuget package with dotnet pack Because I know the source code has been built and tested in steps 1-3 I do not want to rebuild my code for the nuget package, so I am specifying --no-build and --no-restore The difficulty I'm having is that when creating the package, because I am not building

How to “dotnet pack” an already compiled project

吃可爱长大的小学妹 提交于 2020-05-27 07:47:34
问题 I'm trying to design a build script for a dotnet core 2.0 project that does the following actions Cleans output directories Builds Solution with -o bin\Publish Runs Unit Tests with dotnet vstest Creates a Nuget package with dotnet pack Because I know the source code has been built and tested in steps 1-3 I do not want to rebuild my code for the nuget package, so I am specifying --no-build and --no-restore The difficulty I'm having is that when creating the package, because I am not building

mac/linux `dotnet build` The reference assemblies for framework “.NETFramework..” were not found

痴心易碎 提交于 2020-05-27 06:22:31
问题 When trying to build Microsoft.NET.Sdk style project that targets net47 rather than .netcore or .net std. The dotnet build will give an error about missing targeting pack. msbuild will work instead, but i'd prefer to use dotnet build . Is there a way. /usr/local/share/dotnet/sdk/2.1.200/Microsoft.Common.CurrentVersion.targets (1179,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.7" were not found. To resolve this, install the SDK or Targeting Pack for this

mac/linux `dotnet build` The reference assemblies for framework “.NETFramework..” were not found

萝らか妹 提交于 2020-05-27 06:22:20
问题 When trying to build Microsoft.NET.Sdk style project that targets net47 rather than .netcore or .net std. The dotnet build will give an error about missing targeting pack. msbuild will work instead, but i'd prefer to use dotnet build . Is there a way. /usr/local/share/dotnet/sdk/2.1.200/Microsoft.Common.CurrentVersion.targets (1179,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.7" were not found. To resolve this, install the SDK or Targeting Pack for this

Unable to push nuGet packages to GitLab with dotnet CLI due to Unauthorized error

蹲街弑〆低调 提交于 2020-03-03 10:01:49
问题 GitLab now supports nuget public and private feed repository. I've got a public project (e.g: https://gitlab.com/sunnyatticsoftware/sasw-test-support) I create an access token for my user with api and write_repository (e.g: AAABBBCCCDDD) I create a group variable in my CI/CD: SASW_API_ACCESS_TOKEN : AAABBBCCCDDD . All normal. Then I create the multi stage CI/CD script to build, pack and publish. When attempting to publish the nuGet package with the following: dotnet nuget push **/*.nupkg -

Unable to push nuGet packages to GitLab with dotnet CLI due to Unauthorized error

*爱你&永不变心* 提交于 2020-03-03 10:01:40
问题 GitLab now supports nuget public and private feed repository. I've got a public project (e.g: https://gitlab.com/sunnyatticsoftware/sasw-test-support) I create an access token for my user with api and write_repository (e.g: AAABBBCCCDDD) I create a group variable in my CI/CD: SASW_API_ACCESS_TOKEN : AAABBBCCCDDD . All normal. Then I create the multi stage CI/CD script to build, pack and publish. When attempting to publish the nuGet package with the following: dotnet nuget push **/*.nupkg -

Dotnet test on .NET Core 1.1 in VSTS: No Test Discoverer is Registered

♀尐吖头ヾ 提交于 2020-01-23 07:21:11
问题 I'm using VS 2017 with the new csproj in a .NET Standard class library, trying to test the library with a .NET Core 1.1 test project using MSTest testing framework with the dotnet test command. Running locally works perfectly fine; when I send the build to continuous integration, I get the error: No test discoverer is registered to perform discovery of test cases. How do I get this discoverer registered, and my tests running, in VSTS? 回答1: This is my build process on VSTS (detailed on my blog

Build Error with pre-compiled Azure Function Library

寵の児 提交于 2019-12-30 23:50:04
问题 Recently, I converted an Azure Function that used a C# script ( *.csx ) to a pre-complied class library using the Visual Studio Studio Tools for Azure Functions. It builds successfully in Visual Studio 2017 (as well as running and debugging too). I'd like to build this AF library via our CI process. However, when I run the command dotnet build locally it fails with the following error: C:\Users\ray\.nuget\packages\microsoft.net.sdk.functions\1.0.2\build\netstandard1.0\Microsoft.NET.Sdk

Unable to install packages using dotnet add package

被刻印的时光 ゝ 提交于 2019-12-24 16:48:05
问题 I'm a .NET newbie using VS Code while following an online course on Angular and .NET Core. The course requires the AutoMapper.Extensions.Microsoft.DependencyInjection package to be installed but I keep getting the following errors when I try install any package. Unable to resolve <package_name> for '.NETCoreApp,Version=v2.2' Package <package_name> is incompatible with 'all' frameworks in project <csproj_path> I use the following command to install the package: dotnet add package AutoMapper