Questions tagged [dotnet-build]
32 questions
3
votes
1 answer
MSB3474: The task “SGen” is not supported on the .NET Core ver sion of MSBuild. Use the Microsoft XML Serializer Generator package instead
Step :1
Code:
dotnet build E:\abc.csproj /p:Platform=ANYCPU /p:Configuration=Release
.
Error:
C:\Program Files\dotnet\sdk\5.0.202\Microsoft.Common.CurrentVersion.targets(3624,5): error MSB3474: The tas
k "SGen" is not supported on the .NET Core…

Nirav Patel
- 77
- 7
3
votes
1 answer
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\Microsoft.CSharp.CurrentVersion.targets(135,9):…

Nirav Patel
- 77
- 7
2
votes
0 answers
How to exclude a .NET 5.0 project from build depending on the OS
We have a Visual Studio solution with several .NET 5.0 projects, one of which is a Windows Application (TargetFramework is net5.0-windows). It obviously fails to build on Linux and Mac. How can we make it so that it would build or not build,…

Andrew
- 1,139
- 1
- 12
- 27
2
votes
1 answer
Dotnet build behaves differently when executed from TeamCity
We're seeing a Lucene.NET analyzer build warning that shouldn't be there when executing dotnet build for one of our ASP.NET Core 3.1 web apps. The strange thing is that this warning seems to happen only when executed with the .NET runner in…

Piedone
- 2,693
- 2
- 24
- 43
1
vote
1 answer
Azure functions using dotnet-isolated runtime do not run and are not visible in the Azure Portal
I have an Azure function project on the .Net 7 runtime that I've configured to run in dotnet-isolated mode. It runs successfully locally when I publish it through Visual Studio, using Azurite as the storage emulated.
The problem is that when I…

Agreene
- 508
- 7
- 16
1
vote
0 answers
Is it possible to produce multiple sets of libraries from single dotnet build?
We have a project that creates a set of libraries that are later included in some external projects. Due to some conflicts (that happened when these external projects were used together) we were made to create a separate set of libraries dedicated…

Piotrek
- 169
- 3
- 17
1
vote
1 answer
dotnet build configuration Release throws MSB3474
When executing a default (Debug) configuration I get no errors, but when I do run this:
dotnet build .\src\Burriquin\Burriquin.csproj -c=Release
I get this error:
C:\Program Files\dotnet\sdk\7.0.102\Microsoft.Common.CurrentVersion.targets(3822,5):…

juagicre
- 1,065
- 30
- 42
1
vote
0 answers
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 & Minifier error 0: Expected '}': ...…

Erik Blessman
- 573
- 3
- 11
1
vote
2 answers
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 HintPath in my project, just direct references to…
anon
1
vote
0 answers
Getting CSC : error CS0009: Metadata file 'C:\Y.dll' could not be opened -- Image is too small when using remote signed from jenkins pipeline
I have two project X.csproj and Y.csproj and X is referring Y.
Now If I build X.csproj using following command from Jenkins pipeline,
powershell "dotnet build ./X.csproj /p:Configuration=Release /p:ApiKey=${env.SignApiKey} -p:RemoteSignEnabled=true…

Gourango Ghosh
- 40
- 8
1
vote
1 answer
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:Rebuild -p:Configuration=Debug…

Jacques
- 6,936
- 8
- 43
- 102
1
vote
1 answer
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 :
...
…

Michael Gabbay
- 413
- 1
- 4
- 20
1
vote
1 answer
dotnet build failing with "The type or namespace name... does not exist" in solution with netstandard2.0 and 4.7.2
I have a solution that contains two projects, one targeting 4.7.2 and one targeting netstandard2.0. I can build the solution just fine within Visual Studio 2019. However, when I run dotnet build MySolution.sln it fails with a number of "Type of…

Mark Nadig
- 4,901
- 4
- 37
- 46
1
vote
0 answers
dotnet build failing inside container
I encountered a really annoying issue when trying to execute dotnet builds within a container for a standard CI/CD flow. The issues seem to occur 'randomly' (on average about 4/10 builds fail when ran from Jenkins without any changes made to the…

LisekKL
- 131
- 2
- 12
1
vote
0 answers
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 publish --configuration release
but the resource dlls…

Shanjee
- 491
- 5
- 16