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,160
questions
1
vote
2
answers
59
views
Directory.Build.props only respected when building .sln file
When I build my projects with the MyConfig target, I want the code to be optimized, and I don't want any .pdb files.
To achieve this, I have created a Directory.Build.props file like this in the root ...
0
votes
1
answer
39
views
How do I run npm build as part of dotnet publish
I have an ASP.NET Core 8 web project, where the client source code lives in a client folder.
I also have an npm run build that will compile those client files, and copy the output to the wwwroot ...
0
votes
3
answers
39
views
Getting exact cl.exe call when building a visual studio project or solution
When building a visual studio project or solution, how can I get the actual call to cl.exe that is executed? For instance, I would like to see something like
cl.exe /c /I"C:\Path\to\Include" ...
0
votes
0
answers
21
views
Can I build a project targeting .NET 8 using msbuild from older version of Visual Studio?
I have an older version of Visual Studio 2022 that came out with .NET 7. Due to system requirements reasons I cannot upgrade the Visual Studio 2022 to the most recent version that supports .NET 8.
I ...
0
votes
0
answers
40
views
Build csproj on Visual Studio without building references
Lets say you have a solution with projects A and B. A needs to B be build at least once so in order to be built with MSBuild i need it to be some kind of reference to setup the order of build.
But ...
0
votes
1
answer
60
views
MAUI .NET 8 on Android - throwing an exception
I have created a new MAUI .NET 8 project and migrated the Xamarin forms project code. When I tried to run the project with the Android device with Visual Studio Windows, which threw the exception ...
0
votes
0
answers
13
views
Issue with Nuget restore for .Net core application using dotnetbuild
We have our application developed in .Net 6.
While using dotnet build/msbuild nuget restore is getting error with letter 'v' we are using along with version number.
Please let me know if there is away ...
0
votes
1
answer
37
views
Parsing .targets file with ElementTree does not find specified tag
I am trying to use ElementTree to parse information out of a .targets file from a NuGet package.
What I am trying to find is the tag <AdditionalIncludeDirectories>. I am using the following ...
1
vote
1
answer
34
views
Is it possible to attach Visual Studio Code debugger using System.Diagnostics.Debugger.Launch()?
The context involves trying to debug a Fody addin (MsBuild task).
Using System.Diagnostics.Debugger.Launch(); only prompts me with Visual Studio debuggers.
0
votes
0
answers
28
views
.Net 8 Project Reference Specify .net Version of Multi-Targeted Transitive Project Dependency
I have a .net6 sdk project that I need to upgrade to .net8 for some new functionality. It has some shared project libraries with other projects that are still .net6.
Project A includes Project B which ...
-1
votes
1
answer
20
views
heat.exe harvesting adding the old v3 namespace to the harvested file
I ran into this problem when upgrading from WiX v3 to v4 and want to provide an answer that worked for me, as i did not find any here.
The Problem:
In my case i was trying to automate the proccess for ...
0
votes
0
answers
30
views
Building wix bundle overwrites package
Overview:
I am making an installer for a web app build on asp.net 8. I started with just doing an msi installer (Package) with a custom UI. I then wanted to also include the installers for the dotnet ...
0
votes
0
answers
24
views
Facing issue using Msbuild for building .NET Core project on Windows 2012 server
Our application is developed on .NET 6 framework and when we tried to use this command in a .bat file and ran on the local system, we are able to build solution and everything is working fine.
When we ...
3
votes
2
answers
53
views
Change default path of bin and obj folders in VS 2022
I would like to change the directory of the bin and obj folders created from build by Visual Studio 2022.
For example, a project in this path :
C:\Users\MyUserName\source\repos\SolutionName\...
0
votes
1
answer
39
views
VS2022 C++ Custom Build Step for "custom compiler"
In my C++ project I have a (large) number of .foo files that get transformed into .bar files using a custom build step that runs foo2bar on the .foo file.
The resultant .bar output file is not further ...