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
0answers
10 views
Anded multiple tags do not work as expected in specflow
I have the following hook in my test project:
[AfterScenario]
[Scope(Tag = "Tag1"), Scope(Tag = "Tag2")]
public static void AfterScenarioMethod()
{
}
Based on the SpecFlow ...
0
votes
0answers
4 views
Jenkins multibranch: error MC1000: Unknown build error
Currently, I have a Jenkins multibranch pipeline. It clones my git repo and builds the solution via a Jenkinsfile. The Jenkinsfile has 5 stages:
checkout scm
restore nugets (using nuget.exe)
Build ...
0
votes
1answer
11 views
How to have different Teamcity VSBuild Configurations (Debug/Release) for each specific branch?
I have a build configuration that does my building and unit testing for all of my branches of my project. I have another configuration that does my deploying. I need the first configuration to do the ...
0
votes
0answers
27 views
specflow behind code has syntax error or duplicate code
I have a solution that consists of a couple of projects. I have 3 categories of projects in my solution. First category only includes the .feature files. The second category only includes the bindings....
0
votes
0answers
6 views
Customizing Publish Profiles to Azure
I have a custom msbuild script/publish profile I use for publishing ASP.Net applications to IIS. It publishes the site, but also copies over some files, using this method:
https://www.dotnetcatch....
0
votes
0answers
12 views
appsettings.json not getting copied to build package
I am using TFS 2018 on-prem to build by ASP.Net Core application. I use the Visual Studio Build task (Version 1.*) with no additional MSBuild arguments. That is I just build my project by pointing to ...
1
vote
0answers
50 views
How to migrate a .NET4 solution to .NET Core 3?
I did the following fork: https://github.com/MaherJendoubi/ClearCanvas and
I cloned the following project https://github.com/ClearCanvas/ReferencedAssemblies in order to create a hard link using the ...
0
votes
0answers
25 views
ILMerge throws System.OutOfMemoryException
I am using SignalR, to display the data in real time from Dynamics 365 to a external web page.
I have create a plugin, which gets triggered in Post Create of my dummy entity.
I have reference to ...
0
votes
1answer
25 views
TreatWarningsAsErrors vs /warnaserror
class Program
{
static void Main(string[] args)
{
int unused = 3;
}
}
If I add:
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
To the *.csproj file, then ...
0
votes
0answers
15 views
How to read an embedded resource using the ManifestEmbeddedFileProvider
As explained in the docs I have:
<PropertyGroup>
...
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
</PropertyGroup>
...
<ItemGroup>
<...
0
votes
0answers
14 views
cordova Windows 10 manifest
I have a project in apache cordova. I added Windows 10 as a platform, but when I'm trying to build the project I always get the same thing:
App manifest validation error: The app manifest must be ...
0
votes
1answer
23 views
xcopy command to move app.manifest from obj to bin folder failed on build server
I have added app.manifest file to my WPF client project to make it to Run as Admin. I was getting app.manifest file not found in bin folder error. I resolved this issue by adding XCopy command in post ...
0
votes
1answer
23 views
Using MSBuild.exe to deploy MVC Project fails
I am using MSBuild.exe in Powershell to build and deploy MVC5 application in VS Pro 2017. The command is
&"$env:windir\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" $solutionFilePath `
...
-1
votes
1answer
25 views
We are unable to restore the nuget packages used in the solution when trying to build with MsBuild
We are unable to restore the Nuget packages used in the solution file with Ms Build
Enviroment
Asp.Net solution
Visual Studio 2015
2
votes
1answer
31 views
How to trigger a design-time build on file change in Rider?
I made a NuGet package which generates C# code from DSL files at design and build time. It works fine in Visual Studio but has some issues in Rider (which I'll describe below).
In Visual Studio
The ...
0
votes
1answer
37 views
error CS0234: The type or namespace name 'OAuth' does not exist in the namespace 'Microsoft.Owin.Security' (are you missing an assembly reference?)
I am trying to build a project with cli:
msbuild.exe project.sln
I get errors of this type:
App_Start\NinjectConfig.cs(3,31): error CS0234: The type or namespace name 'OAuth' does not exist in the ...
-1
votes
1answer
11 views
How to install msbuild on CentOs
I want to install msbuild on CentOS to run project.sln files. What are the commands for installing the same. I tried to install using "didstopia/msbuild" docker image but could not succeed.
0
votes
1answer
8 views
msbuild ignores ValidateCasingOnIdentifiers generating sql with SSDT sqlproj
I set my sqlproj to not validate casing on identifiers, but when I generate a sql script with msbuild, it seems to ignore that and shows warnings like warning SQL71558: The object reference [dbo].[...
0
votes
2answers
38 views
Hosted VS2017 doesn't include .NET 4.6.0?
I had a CI job in AzureDevops passing (green) the build, targetting .NET 4.6.1. It uses an agent configured as "Hosted VS2017".
If I try to downgrade the build to .NET4.6.0 I get this compilation ...
0
votes
2answers
12 views
MacOS change build configuration using bash and msbuild
I would like to build the Release configuration with a bash script.
My problem is that it builds the Debug configuration by default.
How can I pass the configuration to a bash command line ?
For the ...
1
vote
1answer
20 views
How do I fix a data migration error in EntityFrameworkCore?
Background
I have an existing dbset with a FooCol1 field that originally was a string data type.
public class Foo
{
[Key]
public Guid Id { get; set; }
public string FooCol1 { get; set; }
...
0
votes
1answer
47 views
How to specify compiler options in c# file?
I have a code.cs file that I compile with the following command line:
"%ProgramFiles(x86)%\MICROS~3\2017\ENTERP~1\MSBuild\15.0\Bin\Roslyn\csc.exe" ^
/target:library /out:fx1.dll fx1.cs ^
/reference:"...
0
votes
1answer
18 views
Trouble overriding BuildDependsOn in C# project
I'm trying to follow the docs here -- https://docs.microsoft.com/en-us/visualstudio/msbuild/how-to-extend-the-visual-studio-build-process?view=vs-2017 -- to get a simple Target added to the build ...
0
votes
2answers
30 views
Copy to Publish Directory output of PreBuild Event
Inside my csproj I have a pre-build event where I run the build of Vue js project. It outputs to a "dist" folder, and that is loaded by an cshtml file.
In the csproj file I have a reference to the ...
0
votes
1answer
26 views
How can I run unit tests and deploy my code without building the solution twice?
I am setting up a TeamCity deployment for an ASP.NET site that has unit tests using NUnit. How can I set up my build in a way that only requires me to build once but allows me to run my tests before ...
0
votes
0answers
11 views
Flattening runtimeTargets paths to the Root Directory in deps.json
I am presently modifying an existing .NET Core application so that I can execute it in a Linux environment. Currently, all is going well except for manual modification that needs to be made post-build....
0
votes
0answers
19 views
Could not AOT assembly - When building Xamarin Android project using MSBUILD on Windows
I am building a Xamarin.Android in release mode using an automated build using Azure DevOps
I have AOT turned on with LLVM turned on (I know previously AOT was "Experimental" but I think its not ...
0
votes
1answer
33 views
MSBuild Exclude Project when DeployOnBuild flag is set to true
I have the following msbuild arguments:
/m /p:DeployOnBuild=true;PublishProfile="$(PublishProfile).pubxml"
I've added a project that is a shared .NET Web Application that should not be deployed, and ...
0
votes
1answer
10 views
msbuild: How to extract items without metadata?
From a msbuild "Item", I want to to extract all those members that have no metadata (please forgive me if I am using wrong terminology).
This is my background: I am preparing files for creation of an ...
0
votes
0answers
21 views
Utilize .NET Core tool chain for customer projects
Task:
I need to manage customer projects. We have a private NuGET repository which is hosting the bootstrapper (Company.Core.Cmd which targets netcoreapp2.0) and some modules (i.e. Company.Component.A ...
0
votes
1answer
41 views
Why is .Net Core 2.2 now publishing a ton of other dlls
I just upgraded my .net core 2.0 project to 2.2. To my knowledge, I didn't change any other settings, but now when I publish to my file system, it publishes a ton of folders and dlls that it didn't ...
0
votes
1answer
12 views
Save msbuild condition in variable/property
I have a rather long condition that's used in several subsequent build tasks, all of which run when the condition is true and don't when it's false, like this:
<!-- In the middle of a Target -->...
0
votes
1answer
38 views
Configure Jenkins to run MSBuild on Linux Platform
Is there a way to configure jenkins to be able to run msbuild on linux platform. I do see msbuild plugin but its configuration under "Global Tool Configuration"is mostly related to windows. Also ...
0
votes
1answer
17 views
Include file to VS2017 c++ project by condition
I am trying to build the c/c++ project in VS2017
[https://git.postgresql.org/gitweb/?p=psqlodbc.git;a=blob;f=winbuild/psqlodbc.vcxproj;h=c54c93007c07c2b13bbea4ede14a6ee0e11fdf5a;hb=...
0
votes
1answer
54 views
MSBuild fails when updating solution to .NET 4.7.2
I'm updating a solution to use .NET 4.7.2 and hit a problem.
I can build and run the project on dev machine just fine, but TeamCity won't.
In TeamCity build step I added /p:TargetFrameworkVersion:v4....
0
votes
2answers
39 views
Visual studio 2017 Excludefoldersfromdeployment but include some subfolder
I was wondering if it's possible to include some sub-folder on publication, of an excluded folder.
Let's assume i have this structure:
/Folder1/
/Folder1/FileX
/Folder1/FileY
/Folder1/SubFolder1/
/...
0
votes
1answer
40 views
Only build if project or dependencies has changes in Azure devop
I have multiple projects in the same folder, each of them creates a microservice. Each has a separate build and release pipeline. Currently each project is configured so to trigger when code is ...
0
votes
1answer
29 views
Gitlab msbuild issue in Build server - Could not resolve this reference. Could not locate the assembly
I have solution which is absolutely working fine in my local system. But same code is throwing following error when the build triggers in the Build server. Could you kindly help with this?
C:\Program ...
1
vote
1answer
57 views
*.wpp.targets is ignored when publishing a clean solution
When I publish my solution that contains an ASP.NET Web Application for the first time the .wpp.targets file is ignored.
The publish folder contains also the files that shouldn't be published.
After ...
0
votes
0answers
31 views
VSTS Build Console application
Trying to build a solution that contains multiple projects - each producing an executable console app. Using TFS Online (VSTS).
I have a few issues:
When I enter the Project value: $/Applications/...
0
votes
1answer
30 views
Do .NET Core projects have MSBuild bug where DLL references from project dependencies are not copied into bin?
For .NET Framework projects, MSBuild has (IMO a bug) an issue where, sometimes, DLL references in project dependencies are not copied to the bin folder. Here's a pretty full discussion of the issue:
...
0
votes
0answers
10 views
Unreachable code warning coming as error only when building from project file but not from commandline
I have a csproj file that I want to compile using msbuild. Compiling it from the command prompt works as expected with no errors. But when I add the same csproj file into a separate proj file and ...
0
votes
1answer
22 views
MsBuild Very Slow in iOS
I have a script to launch the build of a xamarin ios app. Compilation is very slow, and it stops for a long time in the next part.
......
_ParseExtraMtouchArgs:
NoSymbolStrip Output: False
...
1
vote
1answer
49 views
net472 project no longer builds using MSBuild after migrating packages.config to PackageReference
I have a net472 project containing unit tests using xUnit, which I develop in VS 2017. The project contains tests for an ASP.NET Core project.
I have migrated its packages.config to the ...
0
votes
1answer
40 views
Building and Publishing on Azure Devops Failed
I wanted to publish my project in Azure Devops pipeline but I encountered several errors.
I tried to publish one of the .csproj file of my solution (.sln) from VisualStudio2017 it worked perfectly ...
0
votes
0answers
26 views
Msbuild warning does not break the build
After execute MSbuild task (under TFS2017) with the following parameters:
/m /property:StyleCopTreatErrorsAsWarnings=false /property:StyleCopEnabled=true /p:SkipInvalidConfigurations=true
the ...
0
votes
0answers
67 views
Build Failed after adding Kapsel Plugins to Cordova Project - Could not find SDK “Microsoft.VCLibs, Version=12.0”
I'm trying to make a Windows Cordova build using cmd but I'm getting below errors. Can any of you please guide me on how to fix this issue.
C:\Program Files (x86)\Microsoft Visual Studio\2017\...
0
votes
1answer
25 views
Condition on “PropertyGroup” in Directory.build.props not working
I've created a Directory.build.props file so I can set the C# language version in there.
But I also have Visual Basic Projects, so i wanted to limit the setting to C# projects.
<Project>
&...
0
votes
1answer
20 views
PropertyGroup fails for a property which contains a path
I've tried to refactor a build script and specify a path at one place, instead of copypasting it everywhere - however for some reason i can't seem to make my property work.
myprops.props
<Project ...
0
votes
0answers
16 views
Adding Registry Keys on Remote Windows Server Machine not working
I have two domain joined machines (ServerA & ServerB) running Windows Server 2012 R2.
I want to add new registry key in ServerB from ServerA.
I am running below command in ServerA:
reg add \\...