Skip to main content

Questions tagged [msbuild-task]

MSBuild tasks give the MSBuild platform the ability to execute any number of actions during the build process. A task is a unit of executable code used by MSBuild to perform atomic build operations.

msbuild-task
0 votes
0 answers
69 views

Failed to Load d:\test\SNI.dll system componentmodel.win32Exception: The specified model could not be found

There are many solution in root folder and each solution has .Net Framework 4.7.1 MVC web Project and has API and library project target both .Net Framework 4.7.1 and .Net Core 6.0 . when I migrated ...
user3497702's user avatar
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
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
28 views

publishing web app with msbuild yields different output than doing it through visual studio

I am trying to make an installer for a web app that is using blazor. I have made a setup.build file which has different targets, but I want to focus on the target that is supposed to publish my web ...
Temeos's user avatar
  • 46
0 votes
1 answer
22 views

Path.GetFullPath in MSBuild not working. What am I doing wrong?

I have several different automations in my solution. Many of them uses [System.IO.Path]::GetFullPath to help avoid missing files and the like. However, Recently I added another project, but for some ...
Paulo Santos's user avatar
  • 11.5k
0 votes
0 answers
73 views

Cannot build solution with MsBuild task

Here's the target I defined in Directory.Build.props file: <Target Name="BuildAndDeployTools" BeforeTargets="Build" > <Message Text="Building Tools Solution ...&...
Pavel Voronin's user avatar
0 votes
0 answers
43 views

I am trying to Run Build Task in VSC (C code) and I get an error about missing a project or solution file

I am trying to compile my code (written in C), and I get the following error: MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or ...
Emma Chris's user avatar
0 votes
0 answers
38 views

MSBuild Custom Task Failing to Load Dependency in Target Project

The Objective I am writing a custom MSBuild task to handle Azure deployments locally (instead of Azure CLI, Azure Powershell, etc.). The task is using the Azure Resource Manager client library. Once ...
Ken Garrett's user avatar
0 votes
0 answers
9 views

MSBuild copy content files to publish directory when using dotnet publish

i would need the help of some MSBuild experts. I'am working on a Framework where i have several .NET Libraries (.NET 8) which may contain "Content" files. For example: - LibraryA - Content/...
Daniel P.'s user avatar
  • 830
0 votes
0 answers
36 views

In SDK style project, how to use InitialTargets if the task is imported by PackageReference

I am migrating a project to SDK style project. There is an InitialTargets defined as: <Project InitialTargets="TargetReadFiles" DefaultTargets="Build" xmlns="http://...
Akhil Agarwal's user avatar
0 votes
0 answers
19 views

Create custom file into the repository during dotnet build

I'd like to run custom commands during the build process of a project, to create a json output from a c# static class (.net 8). The class contains permission values and other attributes built into the ...
Perrier's user avatar
  • 2,817
1 vote
2 answers
68 views

How to block (ban, forbid) specific dependency in MSBuild SDK style project (C#)?

I have an application, consist of a few projects (e.g., projects A, B), each of them has several direct dependencies, added via <PackageReference Include=.... These dependencies has another ...
Denis's user avatar
  • 3,687
0 votes
1 answer
122 views

Invoke the Powershell Script during local testing with MSBuild

I am trying to call a powershell script for local testing <Target Name="RunPowerShellScript" BeforeTargets="Build" Condition="'$(LocalBuild)' == 'true'"> <Exec ...
Sweta's user avatar
  • 3
0 votes
0 answers
86 views

Programmatically triggering MSBuild is giving build error for Edit & Continue /ZI property

I'm simulating custom debugger with Edit and Continue through VSExtension, so during live debug session, I'm programmatically triggering MSBuild ,compile to generate .obj file which I can use. enter ...
Peeyush's user avatar
  • 39
1 vote
1 answer
545 views

File Locking Issue When Using Custom MSBuild Task in Development Mode

I am developing a custom MSBuild task following the guidance outlined in the Microsoft Example. The development workflow is not good because whenever I change my task and I want to test it, to do that ...
Anna Naumova's user avatar

15 30 50 per page
1
2 3 4 5
51