Skip to main content

Questions tagged [msbuild]

Microsoft Build Engine, also known as MSBuild, is a build platform for managed code and was part of .NET Framework.

0 votes
0 answers
21 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 ...
dopr's user avatar
  • 1
-1 votes
0 answers
33 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 ...
Shionigami's user avatar
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 ...
Challex's user avatar
  • 52
0 votes
0 answers
32 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 ...
jdistro07's user avatar
  • 165
0 votes
0 answers
32 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 ...
AMDI's user avatar
  • 963
0 votes
1 answer
22 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 ...
Serg's user avatar
  • 4,188
0 votes
0 answers
48 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 ...
applecider's user avatar
1 vote
2 answers
78 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 ...
mortenbock's user avatar
0 votes
1 answer
54 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 ...
mortenbock's user avatar
0 votes
3 answers
53 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" ...
roi_saumon's user avatar
0 votes
0 answers
46 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 ...
MMDR's user avatar
  • 1
0 votes
0 answers
42 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 ...
TSDrake's user avatar
0 votes
1 answer
90 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 ...
Anitha v's user avatar
0 votes
1 answer
29 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 ...
AMDI's user avatar
  • 963
0 votes
1 answer
40 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 ...
meetaig's user avatar
  • 915
1 vote
1 answer
37 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.
Romain Hautefeuille's user avatar
0 votes
0 answers
40 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 ...
lrfalslev's user avatar
0 votes
1 answer
26 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 ...
Temeos's user avatar
  • 46
0 votes
1 answer
44 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 ...
Temeos's user avatar
  • 46
0 votes
0 answers
25 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 ...
AMDI's user avatar
  • 963
3 votes
2 answers
66 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\...
Carlos Siestrup's user avatar
0 votes
1 answer
60 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 ...
oreubens's user avatar
  • 339
0 votes
1 answer
44 views

Unwanted characters after version in assembly properties sheet

Something, possibly MSBuild, is appending a long string of numbers and characters to the Product version in my assembly's property sheet: 2024.6.22.6+9f3a8da557d9ed6941ee2dd3751916eb3ff1cece It ...
InteXX's user avatar
  • 6,299
1 vote
1 answer
40 views

Deployment Report using MSBuild in SQL Server Database Project

When I publish the SQL Server Database Project in Visual Studio, it generates a DeploymentReport.txt file which includes a preview of the changes to apply. When I publish using MSBuild the file is not ...
Abdullah Haidar's user avatar
1 vote
1 answer
33 views

What setting in MSBuild prints the ProjectGuid?

When creating a simple web project it contains the 'ProjectGuid' as a comment at the bottom of the web.config file. Where is it set that this comment is added (presumably something in MSBuild)? Is it ...
sr28's user avatar
  • 5,048
0 votes
1 answer
42 views

Can't get a "before build" target to work with MSBuild

I have a simple hello world console app with top level statements as follows: Console.WriteLine("Hello world"); I would like to experiment with automatically executing targets before the ...
user32882's user avatar
  • 5,656
1 vote
1 answer
45 views

MSBuild conditions: detect whether project file is built as project reference or standalone executable

I'm dealing with the NETSDK1152: Found multiple publish output files with the same relative path error while building a rather complex project. My project A depends on some classes in project B, both ...
Kile Kasmir Asmussen's user avatar
0 votes
1 answer
40 views

How can I launch PowerShell as a post-build step in MSBuild?

Currently, you cannot easily debug a binary PowerShell module in Visual Studio 2022 (not Code!). Instead of being required to manually open a PowerShell session, change the location to my project, ...
AxD's user avatar
  • 3,020
0 votes
2 answers
47 views

How To Get Nested TaskItem Metadata Values in MSBuild File?

I have an MSBuild TaskItem that contains metadata gathered from a JSON configuration. An example of a single piece of metadata would be %(Configuration.Object:Name) and in the case of arrays would be ...
Ken Garrett's user avatar
0 votes
1 answer
132 views

Visual Studio MSBuild Error MSB8066: Custom build

I have a Visual Studio solution with a project that generate a cpp and a hpp file. An other project have to compile these generated files, so I add the cpp file as a "Custom Build" target ...
Xavier Bigand's user avatar

15 30 50 per page
1
2 3 4 5
506