48 questions
0
votes
1
answer
75
views
"dotnet build" against one specific target framework
We have shared libraries between our .NET 8 backends and our .NET 4.7.2 frontends which then contain the multi-target attribute
<TargetFrameworks>net8.0;net472</TargetFrameworks>
When I ...
0
votes
1
answer
129
views
How to stop auto-generating a .sln file in C#?
I was wondering if anyone had any idea why when I use dotnet build with my foo.csproj file in my project directory (works as expected) it sometimes generates a foo.sln file (the name of the directory ...
0
votes
1
answer
318
views
How to include third party libraries in dotnet publish as single file?
We have a WPF application that we are trying to publish as a single file.
I am running the command:
dotnet publish .\{path_to_projectA_csproj_file}.csproj -c Release --self-contained -p:...
0
votes
1
answer
267
views
Globally configure dotnet build parallelism
The dotnet build command by default uses all cores. On an older machine, that makes
it completely unresponsive.
It can be configured by passing -m (or -maxCpuCount) to msbuild: dotnet build -m:3
Is ...
0
votes
0
answers
42
views
What is correct way to use dependency of a dependency library in .Net Core 8.x
Background
I'm building an app that depends upon a DLL which in turn has a dependency upon the Sqlite component.
My main app has no direct dependency upon Sqlite.
But, it does call functionality in ...
0
votes
1
answer
67
views
"Unable to load the specified metadata resource" after building using dotnet build
After some conclusions, a more precise questions:
I have a .NET 4.0 project with Entity Framework v4 which uses an .edmx file. Let's call it EFProject and MyDB to the database accessed by Entity ...
0
votes
0
answers
34
views
Different nugets restored on the same solution on different platforms
Platform:
Windows 10
Visual Studio 2022
.NET Core 3.1
C#
I have a small solution containing an executable (console application) as a start-up project and several class libraries projects.
Whenever I ...
4
votes
1
answer
630
views
Visual Studio build fails but CLI dotnet build succeeds
I have a problem where my solution contains a node_modules folder with some libraries with long paths.
This files are not needed in output directory, becuase they are only needed in another build step....
4
votes
1
answer
5k
views
dotnet build produce an error: "MSB3822: Non-string resources require the System.Resources.Extensions assembly at runtime
(Ignore code type error - it was copied ree handed)
The bottom line is:
The System.Resources.Extensions nuget dll is not uploading to the project runtime folder.
Here is the full story:
.Net Project ...
4
votes
1
answer
502
views
MAUI Android Azure Pipelines Install & Build only Android
I'm able to successfully Install/Build MAUI using the full commands:
- task: UseDotNet@2
displayName: 'install net core sdk'
inputs:
version: 8.0.x
performMultiLevelLookup: true
...
2
votes
3
answers
9k
views
NuGet NU1301 error during "dotnet-build", how to handle this?
I'm working on a C# project, having the following nuget.config file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear/...
0
votes
1
answer
199
views
I want to use dotnet restore command in "Execute Windows batch command" in my jenkins job but i am getting error
This is what i have put in "executr windows batch command" -
"dotnet restore
"C:\Users\nraut.SIPL.jenkins\workspace\WebNetAgentSln\WCFServiceGX.sln"
dotnet build "C:\...
1
vote
2
answers
1k
views
How to use artifacts for dotnet test
I would like to use the artifacts from my build stage for the test stage. But somehow the dotnet test command does not find any tests and instantly exits.
The dotnet restore & dotnet build command ...
1
vote
0
answers
353
views
What is causing the error: Bundler & Minifier error 0: Expected '}'
During a Jenkins build, I am getting the following errors:
Bundler: Begin processing bundleconfig.json
/src/Vizualization/wwwroot/js/datatables-knockout-binding.min.js(29,21,29,21): Bundler & ...
2
votes
2
answers
2k
views
Why is dotnet restore working and dotnet build failing on nuget packages from nuget.org?
I've read the following post about this problem, but with my solution and nuget file are located in the same folder, the task dotnet build fails, while the previous dotnet restore succeed.
I have no ...
0
votes
1
answer
953
views
How do I build & deploy a Photino.NET app so it does not display the console when it is ran?
I have read all of the Photino.NET documentation but it doesn't seem to mention how to build a final Release version.
Do you know the dotnet build parameters I need to provide?
Or, is there a code ...
1
vote
1
answer
4k
views
dotnet build for .net framework 4.7.2 project results in "The framework 'Microsoft.NETCore.App', version '6.0.3' (x64) was not found"
I have a .net framework 4.7.2 web API assembly that I've been building for a while using the command:
dotnet build 'D:\proj\folder\main\source\MyProj.WebApi\MyProj.WebApi.csproj'
-t:...
3
votes
1
answer
3k
views
build project for multiple runtime in dot net
I tried to build a project for multiple targets.
I using net 5 framework, and I want to build app for win64 and linux64 runtimes.
The problem
Missing linux 64 folder
The csproj file :
<Project ...
0
votes
1
answer
569
views
Dotnet CLI webapi Project Build Failure - Error MSB3021
Machine: Windows 10.
SDK: 5.0.401
Project Type: webapi
Issue: Running dotnet build produces the following...
Things I've already tried:
resmon.exe => to look for either the apphost.exe handle ...
1
vote
0
answers
171
views
Blazor server - localization dlls (xxx.resources.dll) missing inside the output folder when run dotnet publish --configuration release
I have a blazor server application with 2 localization resource files with following names
App.no.resx and App.resx, but these were missing when do the dotnet publish with below command,
dotnet ...
0
votes
0
answers
395
views
VS IDE can build, but run "dotnet build" command then got ".NETFramework,Version=v5.0 were not found"
My visual studio pro 2019 is v16.11.2. I can build my mvc project without any issue by pressing build button, and run this project very well. Of cause, I've installed .net sdk 5.0.400 on my win10
...
3
votes
1
answer
1k
views
How to resolve Could not find rule set file "ManagedMinimumRules.ruleset" error
Thanks in Advance, your help is greatly appreciated!
I am using this code dotnet build E:\abc\abc.sln /p:Congiguration=Release but it's giving error below error:
C:\Program Files\dotnet\sdk\5.0.201\...
0
votes
1
answer
489
views
build or publish via"dotnet" command with arguments/parmaters specifying windows Authentication=true and anonymous Authentication=false
Here are the details about our development environment:
DevExpress 20.2.3 (we are using DevExtreme)
Microsoft Visual Studio Enterprise 2019 (Version 16.4.6)
ASP.NET Core 3.1.0
AspNetCore.Mvc 3.1.0.0
...
0
votes
1
answer
2k
views
Multiple azure function projects in a solution
I have one VS Solution with multiple function Projects. If I run the solution build in VS, it all works well as it is going to push the bin & function.json in to respective project folder. However,...