29 questions
0
votes
1
answer
430
views
How to set project name and context name in 'dotnet ef' command simultaneously for 'add migrations' command (.NET 8)
I execute this command
dotnet ef dbcontext -v info
And I get this answer:
Finding DbContext classes in the project...
Microsoft.EntityFrameworkCore.Design.OperationException: No DbContext was found ...
0
votes
0
answers
164
views
Azure DevOps pipeline: publishing to the symbol server using DotNetCoreCLI
We have converted our pipelines to use DotNetCoreCLI@2 tasks. I do not see a DotNetCoreCLI task to publish symbols for debugging. Is there an alternative task to PublishSymbols@2? The PublishSymbols ...
0
votes
1
answer
442
views
Referencing ApplicationUser from Model .net core
I'm working on a project and I have two objects Group and ApplicationUser with a reference from Group to ApplicationUser. My Group model has a property CreatedBy to provide the info about the user who ...
2
votes
1
answer
2k
views
dotnet CLI “error: There are no versions available for the package 'myCustomPackage'.”
I've added my private source of packages that hosted on gitlab by this command
dotnet nuget add source
its done successfully and added to my list of sources, then I've pushed my packages on it, the ...
1
vote
0
answers
637
views
Runtime Compilation doesn't work on .net core
https://learn.microsoft.com/tr-tr/aspnet/core/mvc/views/view-compilation?view=aspnetcore-3.1&tabs=netcore-cli
I followed that link. First i installed nuget package
Project 'razorapp' has the ...
0
votes
2
answers
681
views
Disable package type on nuget
Using dotnetcore cli the packages are being generated with a packagetype node, causing Visual Studio to not be able to install the package.
Building the package on Visual Studio does not generate the ...
2
votes
1
answer
4k
views
What dotnet core cli command(or msbuild commands) does Visual Studio use when Building, Rebuilding and Cleaning the Solution?
I want to know the exact dotnet cli commands that Visual Studio uses when I Build/Rebuild and Clean solution in my dotnet core application?
I know that the dotnet core cli was build on top of msbuild ...
3
votes
2
answers
2k
views
NU1100: Unable to resolve 'System.Reflection.TypeExtensions (>= 4.5.1)' for '.NETStandard,Version=v1.3'
I'm trying to migrate my small OSS project from AppVeyor to Azure DevOps and got almost everything done but now getting this error on the dotnet restore step:
NU1100: Unable to resolve 'System....
2
votes
1
answer
54
views
Custom NET CORE CLI tool does not run on build
I have written a small test tool
namespace dotnet_cqsgen
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
File....
0
votes
0
answers
124
views
Having trouble running a file with vs code
I'm new to coding with c# and looking for a little help
I have set up c# with visual studio code and in the terminal trying to use dotnet run but when i do it comes up with this:
visual studio code ...
55
votes
4
answers
70k
views
How to add a Project (.csproj) to Solution (.sln) under a Solution Folder using dotnet CLI (command line)?
I am trying to add a csproj to a sln using dotnet sln command line.
Adding the project is easily achievable using the below command.
dotnet sln todo.sln add todo-app/todo-app.csproj
But how do I ...
4
votes
1
answer
2k
views
How do I update nuget.exe version used by dotnet cli
I have installed the dotnet core sdk and it all works. I want to update the nuget version though so that when I run dotnet pack it uses the latest nuget. With normal nuget.exe I can run nuget.exe ...
0
votes
3
answers
3k
views
Is it possible to scaffold my controller using the .NET CLI?
I'm following the ASP.NET Core tutorials at https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/adding-model. I'm up to the Scaffolding a Controller section and I'm trying to create ...
4
votes
1
answer
1k
views
Stackoverflowexception with xUnit and dotnet CLI - which test?
I'm using dotnet to run my unit tests in xUnit.
In one of my unit tests I get a Stackoverflow. How do I determine which unit test causes this?
Project.json (relevant parts):
"dependencies": {
"...
0
votes
1
answer
2k
views
How to copy specific files to the publish directory in post-publish event
I'm doing a publish by using dot net core and I noticed all files contained in wwroot are copied the output folder, in my pre publish script I run tasks for concatenation, minification and uncss and ...