Questions tagged [msbuild]
Microsoft Build Engine, also known as MSBuild, is a build platform for managed code and was part of .NET Framework.
msbuild
15,168
questions
0
votes
1
answer
13
views
How can I apply a transformation to a JSON file during build in Visual Studio?
I have a project A (.NET Core) that is referenced by a project B. In project A, I have a JSON file that needs to be updated at compile time (to replace some values) and I would like the JSON file in ...
0
votes
1
answer
19
views
Difference between using "dotnet pack" and "GeneratePackageOnBuild"?
I understand that using dotnet pack is intended for creating NuGet packages, and dotnet publish is intended for creating deployable DLLs/EXEs. However, using the GeneratePackageOnBuild property in the ...
0
votes
0
answers
10
views
GitHub Actions Self-Hosted Runner Build code
I have following that needs to be executed through a self-hosted runner.
MSBuild HelloWorldCustomRunner.sln /property:Configuration=Release /t:Clean;Build
I keep getting the below error:
Build is not ...
0
votes
0
answers
18
views
Multi-Framework Targeting for NuGet Packages
Background - My Build Scripting
I would like to use the dotnet CLI to create a nuget package that can target the following frameworks: net462, net48, net8.0. My library has no dependencies (i.e. it ...
0
votes
1
answer
29
views
msbuild error: AssemblyRef does not contain a definition for 'Configuration'
I am 'migrating' a visual studio build to a batch script,
I have a one big project that has many dependencies,
i build my project with msbuild.exe using windows batch script,
the main project (client) ...
0
votes
1
answer
29
views
Visual Studio automatically removes new files from custom MSBuild Task
Is there something I am doing wrong with this custom MSBuild target to cause Visual Studio to do this behavior?
I have a custom MSBuild task that bundles separate javascript files into a single file, ...
0
votes
0
answers
27
views
Build pulling in wrong framework version from ProjectReference
I have a solution which contains several projects. One of these (call it ProjectA) is set to build for <TargetFrameworks>net48;net6.0</TargetFrameworks>. There are a couple of other ...
0
votes
0
answers
25
views
Packing multiple projects into singular NuGet package
I would like to pack a Roslyn source generator and another project that contains the attributes the source generator acts upon together into one NuGet package. To do this, I've decided that using a ...
-1
votes
0
answers
36
views
Problem building Windows Service project using CLI (C#)
I want to build a Windows Service project using CLI (dotnet or msbuild) to be able to make continuous delivery of a new project.
No problem to build a Windows Application, but, if I use dotnet build ...
1
vote
0
answers
33
views
Build vcxproj with msbuild and warnings disabled [duplicate]
I have an Visual Studio example project with the purpose to generate compiler warnings. Warnings are enabled in the project settings. I want to build the project on the command line with msbuild and ...
0
votes
1
answer
42
views
problem when deploying a build in a vm scale set
This is the error that I have when deploying my pipeline:
[error]EchangeDonneesElectroniques\EchangeDonneesElectroniques\EDE.csproj(365,3): Error MSB4019: The imported project "C:\Program Files (...
0
votes
0
answers
46
views
dotnet build "Could not resolve this reference. Could not locate the assembly" error but only occurs on CI?
I have a simple CI that builds my solution on GitLab. The project consist of a .NET Core project and a WCF project. I am encountering an error after installing the latest version of Newtonsoft JSON ...
0
votes
0
answers
34
views
Exclude projects in nested folders while using dotnet build of solution file
Folder strucure of our project is below. While building the solution, we need to exclude some projects present. Please let me know if there is a way to exclude some projects while building a solution ...
0
votes
1
answer
23
views
Build a single project respecting solution-level configuration mappings
I have a solution (My.sln) with two projects
App.csproj - application
Lib.csproj - class library
The App project references the Lib project via the <ProjectReference/>
I have configuration ...
0
votes
0
answers
49
views
MSBuild detect if signed driver is same as previous built non-signed driver (prevent re-signing via caching)
My organization has a driver that now needs to be signed by both our organization and by Microsoft.
We have a build process that runs on windows as a batch file, it runs msbuild for all of the ...