msbuild-4.0

'dotnet build' error after migrating dotnetcore project to 1.0.4

旧时模样 提交于 2019-12-06 03:52:43
I've been trying to run the dotnet build command on a migrated .net core project (from 1.0.0-preview2-003131 to 1.0.4). I followed the steps for migrating the project mentioned here , and the solution builds using Visual Studio 2017. However, using the dotnet CLI command 'dotnet build' gives me the following error: C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(2867,5): error MSB4216: Could not run the "GenerateResource" task because MSBuild could not create or connect to a task host with runtime "CLR4" and architecture "x86". Please ensure that (1) the requested

MsBuild: Changing References from ProjectReference to Reference

删除回忆录丶 提交于 2019-12-06 03:19:44
问题 In our environment, we have two in-house frameworks and a separate website. During development, the references to the in-house frameworks tend to be set tp project references. However, once we move to release, the in-house frameworks are installed into the GAC as they are used for multiple instances of the website on each server. All of the ProjectReferences are changed, by hand, to References and the website assemblies and website are re-compiled and deployed. I am attempting to automate

cl.exe hangs indefinitely while being invoked via MSBuild

早过忘川 提交于 2019-12-05 16:54:07
I am trying to run MSBuild on my (mostly C++) projects (imagine a really humongous code base). Visual Studio 2015 is the toolset in question ( Windows 7 SP1 and VS 2015 Update 2 ). Even with /m:1 (and thereby forcing it to use only one processor) I am finding some completely random project constantly hanging at the compile phase. For example, when this issue happens, if I look at the offending project and the files it comprises of, I can see that the .obj files have been created successfully for every translation unit. However the system just never moves on to the link phase. I see two

MSBUILD : error MSB1008: Only one project can be specified in teamcity

微笑、不失礼 提交于 2019-12-05 02:25:32
I am trying to run msbuild with teamcity. I have a batch file and I pass into it parameters and the build works. When I try to run through teamcity I get error below [13:24:46][MSBuild output] Start MSBuild... [13:24:46][MSBuild output] 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe' '"@C:\TeamCity\buildAgent\work\999585556854a516\Build\Default.msbuild.teamcity.msbuild.tcargs" C:\TeamCity\buildAgent\work\999585556854a516\Build\Default.msbuild.teamcity' [13:24:46][MSBuild output] working dir = 'C:\TeamCity\buildAgent\work\999585556854a516' [13:24:46][MSBuild output] Microsoft (R)

When you import another msbuild file, what is the order of evaluation?

假装没事ソ 提交于 2019-12-05 00:31:25
I have a shared properties file shared.properties.proj <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <SharedAssemblySearch>$(MSBuildProjectDirectory)\..\Shared Assemblies</SharedAssemblySearch> <ParentDir>..</ParentDir> <SharedAssemblySearch Condition="!Exists('$(SharedAssemblySearch)')">$(ParentDir)\$(SharedAssemblySearch)</SharedAssemblySearch> <SharedAssemblySearch Condition="!Exists('$(SharedAssemblySearch)')">$(ParentDir)\$(SharedAssemblySearch)</SharedAssemblySearch> <SharedAssemblySearch Condition="!Exists('$(SharedAssemblySearch)')">$(ParentDir)\

Why is $([System.Text.RegularExpressions.Regex]::IsMatch()) evaluated once in ItemGroupDefinition?

久未见 提交于 2019-12-04 19:22:41
So fiddling with MSBuild tasks, and I am finding that a Regex metadata property is evaluated once rather than per item. For example <!-- actual items, we use standard project reference items and extend via ItemDefinitionGroup. add project references through IDE to extend coverage --> <ItemGroup> <ProjectReference Include="..\Example.UnitTests-x86\Example.UnitTests-x86.csproj"> <Project>{7e854803-007c-4800-80f9-be908655229d}</Project> <Name>Example.UnitTests-x86</Name> </ProjectReference> <ProjectReference Include="..\Example.UnitTests\Example.UnitTests.csproj"> <Project>{eaac5f22-bfb8-4df7

My project builds with MSBuild 4 but not with MSBuild 3.5 even though I'm targeting the same version of the .NET Framework (3.5)?

邮差的信 提交于 2019-12-04 12:44:07
When I build my solution using MSBuild 4 it compiles successfully: C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe MySolution.sln Build succeeded. 0 Warning(s) 0 Error(s) But when I try to do the same using MSBuild 3.5 I get the following error, even though the source is the same and I am using the same libraries and the same version of the .NET Framework. C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe MySolution.sln error CS1501: No overload for method 'InitializeClientContextFromStringSid' takes '2' arguments error CS1501: No overload for method 'GetRoles' takes '0' arguments

MsBuild: Changing References from ProjectReference to Reference

。_饼干妹妹 提交于 2019-12-04 07:21:01
In our environment, we have two in-house frameworks and a separate website. During development, the references to the in-house frameworks tend to be set tp project references. However, once we move to release, the in-house frameworks are installed into the GAC as they are used for multiple instances of the website on each server. All of the ProjectReferences are changed, by hand, to References and the website assemblies and website are re-compiled and deployed. I am attempting to automate this process. What is the best way to handle these issues? I have started to learn MsBuild in the attempt

Logging Build messages with MSBuild 4.0

笑着哭i 提交于 2019-12-04 05:17:40
I am using MsBuild 4.0 in code, like so: var globalProperties = new Dictionary<string, string>(); var buildRequest = new BuildRequestData(solutionPathAbsolute, globalProperties, null, new string[] { "Build" }, null); var pc = new ProjectCollection(); var result = BuildManager.DefaultBuildManager.Build(new BuildParameters(pc), buildRequest); Note how this API is completely different from MsBuild 3.5... How does one hook in a logger to recieve detailed build messages with the new API? heavyd The BeginBuild method on the BuildManager allows you to pass in a set of BuildParameters which includes a

How to access the msbuild command line parameters from within the project file being processed?

非 Y 不嫁゛ 提交于 2019-12-03 17:38:50
问题 I need to get access to the msbuild command line parameters (the specified targets and properties in particular) from within the project file being processed in order to pass them down to the Properties of an <MSBuild> task. My msbuild file uses a large number of properties, and I don't know ahead of time which ones will be overridden via the command line, so I'm looking for a way to pass these down without specifying each one manually to the Properties of the <MSBuild> task. Something like