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.

msbuild
4,422 questions with no upvoted or accepted answers
36 votes
1 answer
7k views

Microsoft.Windows.UI.Xaml.CSharp.targets missing on CI server

Problem I just committed the addition of a UWP application to source control. However, my CI server (Jenkins) didn't seem to like that: error MSB4019: The imported project "C:\Program Files (x86)...
Taylor Buchanan's user avatar
15 votes
2 answers
4k views

How can I extend my publish profile to deploy to multiple locations?

The following is the generated publish profile for my dev environment: <?xml version="1.0" encoding="utf-8"?> <!-- This file is used by the publish/package process of your Web project. You ...
Marcus's user avatar
  • 8,479
14 votes
2 answers
3k views

How do I get the name of the current Target in MSBuild?

Is there a way to get the Name of the currently running Target in MSBuild?
PenFold's user avatar
  • 726
13 votes
2 answers
9k views

Diagnosing why Visual Studio skips building a project

I have a large solution of dozens of projects. Since yesterday (and for no good reason that I can find) the projects are refusing to build, with Visual Studio's build output window simply stating (eg) ...
PaulG's user avatar
  • 14k
12 votes
0 answers
2k views

Prevent `dotnet pack --no-build` from triggering a build and causing NETSDK1085

I expect that when running the following two commands, the latter will not trigger a new build: dotnet build solution.sln --configuration Release dotnet pack solution.sln --configuration Release --no-...
Christoph Rüegg's user avatar
12 votes
1 answer
2k views

msbuild just deploy without build

I know I can do this to build and deploy: msbuild mysln.sln /p:DeployOnBuild=true /p:PublishProfile=<profile-name> But I want to build in one step, move those artifacts to another location, ...
red888's user avatar
  • 30.5k
12 votes
1 answer
2k views

How can I change the default behaviour of the Build Command in Visual Studio

Where I work, we've gone to great lengths to create a build script in Fake that does a whole host of things, so that developers can check what's going to happen on the TeamCity server before ...
pms1969's user avatar
  • 3,554
12 votes
0 answers
2k views

The imported project "C:\Program Files (x86)\MSBuild\Microsoft\Portable\Microsoft.Portable.CSharp.targets" was not found

When compiling, I get this error The imported project "C:\Program Files (x86)\MSBuild\Microsoft\Portable\Microsoft.Portable.CSharp.targets" was not found. If I comment it out, I get The <...
Bryan Cole's user avatar
11 votes
1 answer
1k views

Migration from packages.config to PackageReferences causes Could not load file or assembly "..." or one of its dependencies. Access is denied

After upgrading our projects to PackageReferences I am facing the following issue on the build server (on-premise AzureDevOps agents) "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Xaml....
Kostek's user avatar
  • 111
11 votes
1 answer
2k views

MsDeploy - Can't update Application Pool

I've been browsing dozens of sites to help me deploy a web service to an IIS using MsDeploy. I need to create the application, modify application pool and enable protocols, and update a appSetting (...
Jerome's user avatar
  • 131
10 votes
0 answers
873 views

"sgen.exe" could not be run in VSBuild on Azure Pipelines

Running the build locally is good, no problems whatsoever.. When I did run this on an Azure Pipeline it errors out. The detailed error message is The command-line for the "SGen" task is too ...
99823's user avatar
  • 2,437
10 votes
1 answer
953 views

ASP.NET Core & SPA - client files not published when the client is outside of the server folder

I have a project which has separate client and server folders and my goal is to include client files during the server's publish process. The folder structure looks like this |- server | |- src | ...
pikausp's user avatar
  • 1,192
10 votes
1 answer
918 views

What does the pipelinePreDeployCopyAllFilesToOneFolder target do?

I've seen msbuild commands pass /t:pipelinePreDeployCopyAllFilesToOneFolder as a target. On searching the Internet, I've found many forum and question/answers posts about this target. That said, I've ...
Shaun Luttin's user avatar
9 votes
0 answers
504 views

XAML MSBuild task XamlMarkupCompilePass1 fails in parallel MSBuild and throws error Access denied

We have several projects containing XAML UI and XAML workflow files. Since we enabled execution of MSBuild in parallel, with the flag /m the builds, from time to time we get an exception in the ...
fl0tschi's user avatar
  • 111
9 votes
0 answers
673 views

Have MSBuild only build targets that require building

So long story short, we've got a situation of having multiple solutions with assembly references between them. Used to be, we had to go and build these solutions in the correct order to have our ...
John's user avatar
  • 961

15 30 50 per page
1
2 3 4 5
295