msbuild

Visual Studio Publish - Include folder that is not added to Project

只愿长相守 提交于 2019-12-13 15:19:35
问题 Using - VS2013, VS2015, .Net 4.5 I have several Asp.Net projects each of which has an images/books folder that contains 1000's of images. I don't include these folders in the project ( the .csproj file) files so they are always left out when using using Publish. I want to include these folders when publishing to UAT and LIVE without having to add them to my project as having so many images in your project is problematic. What do I need to do to make this happen? 回答1: You can use this hook in

Assign parameter value taken from a property in MSBuild

我的未来我决定 提交于 2019-12-13 15:14:45
问题 I'm trying to combine batch script and C# code using MSBuild and inline tasks.Looks like the only one way to pass a command line argument is to use a properties ( /property command line switch in msbuild) and the only one way to access something external from the inline task is to use properties. How can I combine the properties and parameters in MSBuild in way to make them accessible in the inline task? Here's an example script (should be saves as .bat or .cmd ) : <!-- : @echo off echo -^-

Programmatically adding and editing the Targets in a Visual Studio Project File

瘦欲@ 提交于 2019-12-13 14:33:20
问题 I am trying to programmatically add the following Target to my Visual Studio Project File. <Target Name="PostBuildEvent" Condition="'$(PostBuildEvent)'!=''" DependsOnTargets="$(PostBuildEventDependsOn)"> <Exec WorkingDirectory="$(OutDir)" Command="$(PostBuildEvent)" IgnoreExitCode="true" /> </Target> I am pretty sure that IVsBuildPropertyStorage or IVsBuildPropertyStorage2 will not work because the require a ProjectItem aka a node from the <ItemGroup> element in the project file. What I would

External VS2013 build error “error MSB4019: The imported project <path> was not found”

被刻印的时光 ゝ 提交于 2019-12-13 14:31:08
问题 I building a project from a command proms using CMake file. The project can be found here. On the build I have the following error: "C:\Users\User\Desktop\XMP-Toolkit-SDK-CC201306\build\vc10\static\windows_x64\CMakeFiles\3.0.0\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) -> C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.Redirect.props(44,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Platform.Redirect.10.props" was not found. Confirm that the

Use VSTS to build a solution with VSTS Packages and old style csproj

佐手、 提交于 2019-12-13 14:24:56
问题 I've a solution that has the following: multiple libraries net461 with old style csproj multiple projects net461 with new csproj (Net core libraries and we applications but tatgets net461) and references the old style csproj projects. I use VSTS Packages to manage some private nuget packages I've VS 15.3 installed in my laptop and the build is working great but, on VSTS the build is failing. I tried the following scenarios When I use dotnet restore (the new tooling), the build fail on restore

Download MSBuild Build Tools for Visual Studio 2013

点点圈 提交于 2019-12-13 14:06:11
问题 I have an old C++ project which requires Visual Studio 2013 to build. I have 2017 installed. How do I just download the MSBuild component for Visual Studio 2013 so that I can compile C++ projects? 回答1: Microsoft Build Tools 2013 can be downloaded from this page: https://www.microsoft.com/en-us/download/details.aspx?id=40760 来源: https://stackoverflow.com/questions/45930026/download-msbuild-build-tools-for-visual-studio-2013

Overridden AfterBuild target in MSBuild script is not executed

为君一笑 提交于 2019-12-13 14:00:44
问题 I have a very simple MSBuild script that builds a bunch of .sln files: <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <!-- Builds all *.sln files under this repository. --> <ItemGroup> <SolutionFiles Include="**/*.sln" /> </ItemGroup> <Target Name="Build"> <MSBuild Projects="@(SolutionFiles)" Targets="Rebuild" /> </Target> <Target Name="AfterBuild"> <Message Text="After Build" /> </Target> <Target Name="AfterRebuild"> <Message Text="After Rebuild" /> </Target> </Project

How to use FxCop analysis with the new MsBuild Sonar runner?

拟墨画扇 提交于 2019-12-13 13:52:55
问题 I am trying to migrate from the old Sonar runner to the new MsBuild Sonar runner in a .NET project. The last problem I have is doing the FxCop analysis. If the quality profile in Sonar contains any FxCop rules, I get the following build error: ERROR: Caused by: The property "sonar.cs.fxcop.assembly" must be set and the project must have been built to execute FxCop rules. This property can be automatically set by the Analysis Bootstrapper for Visual Studio Projects plugin, see: http://docs

Visual Studio executes something when i try to build it. How do i find out the code that stays behind this?

三世轮回 提交于 2019-12-13 13:29:55
问题 As in title, I downloaded a program from github, but when i try to build it, it says: The command ""E:\LoLNotes\LoLNotes\Properties\GitExport.exe" "E:\LoLNotes\" "E:\LoLNotes\LoLNotes\"" exited with code 2. GitExport.exe doesn't work because i have no git installed. But i want to know, how do i find a place in program sources, where that code is being executed? Simple ctrl-f and searching through solution doesn't work, so i think it is hidden somewhere in the configuration files maybe? Does

How to prevent content files to be removed during incremental build?

送分小仙女□ 提交于 2019-12-13 13:17:31
问题 I have a Visual Studio 2015 Update 3 solution with 3 projects: My top-level application is MyApp which has a project reference on ClassLibrary2 which in turn has a project reference on ClassLibrary1 : MyApp -> ClassLibrary2 -> ClassLibrary1 The ClassLibrary1 has a data file, data.bin , that is required for its normal execution. It is expected that this data file will be found in a Resources/ sub-folder relative to where the ClassLibrary1 assembly is when the application is executed. The