dotnet-cli

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

How can I change the default build output directory in Visual Studio Code

烈酒焚心 提交于 2021-02-08 06:27:38
问题 I'm new to Visual Studio Code. I want to define the output directory in my csproj. I don't know where to change in Visual Studio Code the destination folder to locate the dll files generated. 回答1: VSCode uses dotnet CLI and particularly for building the dotnet build command. Among others, it has the following option -o|--output <OUTPUT_DIRECTORY> Directory in which to place the built binaries. Assuming your building task is defined in .vscode/tasks.json file: { "version": "2.0.0", "tasks": [

how to add a new c# file to a project using dotnet-cli

可紊 提交于 2021-02-06 14:27:19
问题 I'm learning how to use dotnet-cli with VSCode. I've seen many commands on how to create solution, projects, add reference to projects... but I don't see anywhere in the documentation how to add a file. If remember, in RubyOnRails it was possible to add file from the command line. Thanks for helping 回答1: Not that I know of (I was also researching that topic) but I found helpful extension for VS code called C# Extensions by jchannon, which helps you create classes and interfaces with correct

how to add a new c# file to a project using dotnet-cli

心不动则不痛 提交于 2021-02-06 14:24:20
问题 I'm learning how to use dotnet-cli with VSCode. I've seen many commands on how to create solution, projects, add reference to projects... but I don't see anywhere in the documentation how to add a file. If remember, in RubyOnRails it was possible to add file from the command line. Thanks for helping 回答1: Not that I know of (I was also researching that topic) but I found helpful extension for VS code called C# Extensions by jchannon, which helps you create classes and interfaces with correct

dotnet core build in parallel or simultaneously

做~自己de王妃 提交于 2021-01-21 08:11:28
问题 In this solution I have 2 apps: AppA , AppB that share class library Shared . I have tried automating the build/running of these in parallel with both a PowerShell and node scripts (I'd be open to other solutions). I'm using both --no-dependencies and --no-restore flags, but intermittently I get: 'CSC : error CS2012: Cannot open \'C:\\Users\\User\\source\\repos\\ParallelBuild\\Shared\\obj\\Debug\\netcoreapp2.0\\Shared.dll\' for writing -- \'The process cannot access the file \'C:\\Users\\User

dotnet core build in parallel or simultaneously

让人想犯罪 __ 提交于 2021-01-21 08:07:39
问题 In this solution I have 2 apps: AppA , AppB that share class library Shared . I have tried automating the build/running of these in parallel with both a PowerShell and node scripts (I'd be open to other solutions). I'm using both --no-dependencies and --no-restore flags, but intermittently I get: 'CSC : error CS2012: Cannot open \'C:\\Users\\User\\source\\repos\\ParallelBuild\\Shared\\obj\\Debug\\netcoreapp2.0\\Shared.dll\' for writing -- \'The process cannot access the file \'C:\\Users\\User

dotnet core build in parallel or simultaneously

给你一囗甜甜゛ 提交于 2021-01-21 08:05:21
问题 In this solution I have 2 apps: AppA , AppB that share class library Shared . I have tried automating the build/running of these in parallel with both a PowerShell and node scripts (I'd be open to other solutions). I'm using both --no-dependencies and --no-restore flags, but intermittently I get: 'CSC : error CS2012: Cannot open \'C:\\Users\\User\\source\\repos\\ParallelBuild\\Shared\\obj\\Debug\\netcoreapp2.0\\Shared.dll\' for writing -- \'The process cannot access the file \'C:\\Users\\User

How to override nuget dependencies id in nuspec file

被刻印的时光 ゝ 提交于 2020-07-10 10:27:26
问题 I have projectA and projectB in the same solution. projectA creates its own package, but I override the package id by using a prefix: <PackageIdPrefix></PackageIdPrefix> <PackageId>$(PackageIdPrefix)$(MSBuildProjectName)</PackageId> The command to generate the package is : dotnet pack .\$(ProjectName).csproj --include-symbols --no-build -o C:\dev\UPP\Packages -p:PackageIdPrefix=MyPrefix." Therefore the generated package name is MyPrefix.ProjectA.nupkg projectB references projectA as a project