Questions tagged [msbuild-itemgroup]

Inside a Microsoft Build project, itemgroups contains a set of user-defined Item elements.

Description

Inside a Microsoft Build project, itemgroups contains a set of user-defined Item elements. Every item used in a MSBuild project must be specified as a child of an ItemGroup element.

References

MSBuild ItemGroup Element

14 questions
2
votes
2 answers

msbuild create itemgroup from property group

I want to pass a semi-colon separated list of strings. Each string represents a file name. Newtonsoft.Json;Reactive C:/ Now I want to…
vkg
  • 685
  • 1
  • 8
  • 21
2
votes
1 answer

Transforming multiple config files for multiple projects via MsBuildProj file

I am trying to run multiple commands on a list of files based on a pattern (all files of form *.config under sub directories of a given directory), like so:
Danny Varod
  • 17,324
  • 5
  • 69
  • 111
1
vote
0 answers

include file for each target framework in nuget

I have a project (SDK style) with several target frameworks: net48;netcoreapp3.1;net5.0-windows;net6.0-windows When I build it, a pdb file is generated for each target…
Kjara
  • 2,504
  • 15
  • 42
1
vote
0 answers

Select single item from wildcard ItemGroup in msbuild

I am trying to create a property in a MsBuild file, using ItemGroup. The property needs to be the path to an executable which is "restored" by a nuget update command. The problem is that I don't know beforehand where the file will end up (as the…
Tallmaris
  • 7,605
  • 3
  • 28
  • 58
1
vote
0 answers

Merge Property and ItemGroup that are unrelated into a single Property

I have a Property and an ItemGroup and I need to merge them into a single Property with a 1 to 1 relationship: SvrA,SvrB,SvrC <--Get full folder paths-->
0
votes
1 answer

MSBuild get assembly names of tests

I'm working on generating coverage. One of the tests was taking a long time if the OpenCover filter was just +[*] so I've decided to add the assembly names. But this isn't an efficient approach as the assemblies may increase. I want to do something…
0
votes
1 answer

Import element does not expand ItemGroup correctly

I'm trying to populate an ItemGroup with directory basenames, pass it through a transform to create absolute paths from them and import the files residing there. It works flawlessly in a Message element, but fails to do anything in an Import. What…
Quentin
  • 62,093
  • 7
  • 131
  • 191
0
votes
1 answer

How do I use the exact msbuild item "unexpanded wildcard expression" value

I have the following MSBuild .proj file content:
0
votes
0 answers

Msbuild - Output is moved intermittently because of Aestrik (*)

I am trying to build csproj using msbuild which stores output on the fly and then move it to configured output directory, Simple :). But values passed with aestrik (*) works intermittently however other value get moved always. Snap of Required…
0
votes
1 answer

msbuild itemgroup items

I have msbuild file which is executing batch file. Msbuild file: Green;Red;Blue Uno;Due;Tre
Klik Kliković
  • 364
  • 1
  • 5
  • 13
0
votes
0 answers

What's the Point of Splitting Files into ItemGroups?

Elements included into C# projects (defined in MSBuild format), such as folders, files to compile, or resource files, can be grouped into elements. When I look at various of the project files generated by SharpDevelop, normally, several…
O. R. Mapper
  • 20,083
  • 9
  • 69
  • 114
0
votes
0 answers

Exclude a configurable list of files from copy in msbuild

Extending following post Trying to exclude certain extensions doing a recursive copy (MSBuild) . I want to exclude a list of file which is defined in property group so that I can configure it in teamcity/jenkins
vkg
  • 685
  • 1
  • 8
  • 21
-1
votes
2 answers

Batch copy the list of items using MSBuild Task RoboCopy

There are list of source and destinations directories defined in . I need a single task/target to perform the robocopy as per the defined item group properties.