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,165
questions
0
votes
1
answer
69
views
Build Boost with Conan 2.0 fails with MSVC
I am using the following setup:
Visual Studio:
Microsoft Visual Studio Professional 2022 (64-bit) - Current
Version 17.10.2
Conan:
Conan version 2.4.1
Here is my Conan profile:
[settings]
arch=...
0
votes
0
answers
10
views
Why is my MSBuild not renaming the extension?
<Target Name="BackupAssemblies">
<ItemGroup>
<Assemblies Include="$(MyInputs)" />
</ItemGroup>
<Message Text="Backing: @(...
0
votes
0
answers
22
views
Directory.Build.Props ignored for "old" .NET Projects
I'm trying to restructure our projects and one part was moving all versioning information into Directory.build.props.
This works for all projects which are .NET SDK style projects (many of them are ...
1
vote
1
answer
44
views
How to change targetframework based on Visual Studio version
I would like to support from .NET Standard 2.0 to .NET 8.0 every target in a projects. Currently
<TargetFrameworks>$(ExtraTargetFrameworks)netstandard2.0</TargetFrameworks>
is used along ...
0
votes
1
answer
57
views
How do I force dotnet publish to use Release configuration on a solution with multiple modules
We have a central .NET solution that uses multiple modules which each have its own .csproj and .sln, currently they use .NET 7.
I am trying to publish all of the modules and force them to all use ...
0
votes
1
answer
58
views
How to create a MSBuild target that runs when any file under 2 specific folders have changed
Context
I have two input folders - A and B.
I have an output folder - C.
There is a target that takes files from A and B and creates a set of files based on the inputs in directory C. There is no ...
0
votes
1
answer
26
views
How to produce same versions with Jenkins and local builds
I intend to use semver2.0 with + added as metadata for main branch.
eg: on main 1.2.3+20241202121212
eg: on release 1.2.3
I will provide major,mino,patch as a parameter to Jenkins.
My problem is, how ...
0
votes
1
answer
61
views
MSBuild ignores build configuration specified in the /p: key
There is a Delphi project with multiple build configurations. One of the .pas files has a conditional compilation directive that includes a specific resource file for one of the configurations.
{$...
0
votes
0
answers
32
views
Why an unnecessary project is built when building a project?
I am building a project for several versions of the framework. And I need to output a message after building the release of each version, for this I use AfterTargets. But AfterTarget is triggered 3 ...
0
votes
0
answers
12
views
How can I build a project if the build machine doesn't have the SDK for one of the (unused) target frameworks of a library?
I have an ASP.NET Core project that targets .NET 5.0. That project depends on a library that targets .NET Standard 2.1, .NET 5.0 and .NET 8.0. When I build the project on a build machine that only has ...
0
votes
1
answer
42
views
MSBuild: How to get project sdk version (TargetFramework) inside Directory.Build.props file?
I have been playing around with a few MSBuild properties inside a Directory.Builds.props of which the latest is changing location of obj/bin folders. By default the project output is put inside of sdk ...
0
votes
1
answer
50
views
OutputPath property not set for 'VCTargetsPath.vcxproj'
I try to build the OsmAnd native rendering library following this guide: Compile Native rendering library for OsmAndMapCreator.
However, I get an error in step #3 of the guide, when I execute amd64-...
1
vote
1
answer
57
views
Publishing WPF Project using command
When publishing my WPF project i normally use Visual Studio 22 by going to "Publish Selection", plugging in my settings (win-x86, any-cpu, self-contained).
This works as expected, however i ...
0
votes
1
answer
34
views
How to include a .lic file in a NuGet package?
In addition to three .NET assemblies, I have a .lic license file in a NuGet package that I need to have copied to the consuming project's root directory with its CopyToOutputDirectory property set to ...
0
votes
0
answers
55
views
Azure Devops SelfHosted Agent MSBuild post build launching exe from incorrect path
We are setting up CI via Azure Dev Ops pipelines. As a proof of concept I am using the VSBuild step on a self hosted build agent. I hoped this would most closely mirror how we are currently building ...