msbuild

What is the purpose of msbuild's GenerateRuntimeConfigurationFiles?

五迷三道 提交于 2019-12-22 08:42:22
问题 I upgraded a netcore1.1 project to the new VS2017/csproj. In my test projects only, it added: <PropertyGroup> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> </PropertyGroup> I did some digging to discover that it generates these files in the bin directory: ProjectName.Tests.runtimeconfig.json ProjectName.Tests.runtimeconfig.dev.json What is this setting and these files, and why do I need them? Why were they only generated for my test projects? 回答1: These are

How to include source code in dll?

纵然是瞬间 提交于 2019-12-22 08:21:11
问题 Short version: I want my program to be able to (read-only-)access its own source code during runtime. Is there a way to automatically package the source code into the dll during compilation? Long version: The background is that when an exception occurs, I want to automatically create a file containing some details of what happened. This file should, among other things, include the source code of the function that caused the problem. I want to send this file to other people by email, and the

TFS MSBuild: $(ProjectDir) blank or random

南楼画角 提交于 2019-12-22 08:11:57
问题 I have a vcproj file that includes a simple pre-build event along the lines of: Helpertask.exe $(ProjectDir) This works fine on developer PCs, but when the solution is built on our TFS 2008 build server under MSBuild, $(ProjectDir) is either blank or points to an unrelated folder on the server! So far the best workaround I have managed is to hard code the developer and server paths instead: if exist C:\DeveloperCode\MyProject HelperTask.exe C:\DeveloperCode\MyProject if exist D:

TFS 2017 - Build Server does not build Visual Studio 2017

﹥>﹥吖頭↗ 提交于 2019-12-22 08:08:33
问题 After upgrade of Visual Studio 2017 last week on my build server, the MS Build 15.0 is not in use anymore. So whenever I try to compile visual studio 2017 projects which use new feature they will fail. The Warning in build log is: Visual Studio version '15.0' not found. Looking for the latest version. And the error is: something.cs(542,41): Error CS1525: Invalid expression term 'int' Which is because build server is using MS build 14.0 I guess. So far I have 1- Uninstall and Reinstalled the

Automatically updating a file with Revision from TFS?

天大地大妈咪最大 提交于 2019-12-22 07:59:34
问题 I'm quite new to TFS (actually I only use it because I have some projects on CodePlex and did not want to go through svnbridge), and I'm looking for something equivalent to the $Revision$ parameter in SVN. Essentially on checkout, I want to update a file to contain the newest Revision number, to be displayed as Version number (just like at the bottom of SO). Is there anything already built-in in msbuild of .net 3.5 SP1, or any official/standard msbuild task, or even something equivalent of

Use XSD Build task in c# project

删除回忆录丶 提交于 2019-12-22 07:54:08
问题 How can I use the c++ XSD Task in a c# project? I have already created the task in the csproj file like this: <Target Name="BeforeBuild"> <XSD Namespace="$(RootNamespace).Xml" Language="CS" GenerateFromSchema="classes" Sources="Xml/schema.xsd" /> </Target> but the build output says, although intellisense offers me the XSD task while editing the project file: Error 1 The "XSD" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the

Using FsLex/Yacc in Vs2013

时间秒杀一切 提交于 2019-12-22 07:48:31
问题 I'm trying to resurrect an old f# parser project I had working in vs 2008 to work with vs 2013. It uses FsLexYacc. I got it building ok by using a prebuild step as thus: fslex --unicode "$(ProjectDir)XpathLexer.fsl" fsyacc --module XpathParser "$(ProjectDir)XpathParser.fsy" But this is less than ideal, as it always executes whether or not the inputs have changed. I then tried just using the old MsBuild actions: <FsYacc Include="XpathParser.fsy"> <FsLex Include="XpathLexer.fsl"> but these

How to specify additional include directories for msbuild.exe

爱⌒轻易说出口 提交于 2019-12-22 07:02:55
问题 I am attempting to install the nodejs module ibm_db. The issue I am having is that in order to install this module node-gyp needs to build it using msbuild, but it won't detect some header files I have installed. How do I add the directory of my additional header files to some path so hatt msbuild.exe will find them when trying to compile any project? On linux I simply set cpath= and everything build just fine. Thanks! 回答1: MSBuild exposes special properties for resolving references in build

Build merge module without Devenv from .vdproj

血红的双手。 提交于 2019-12-22 06:59:28
问题 I read quit a few Stackoverflow Questions about building mergemodules via commandline but all of them were accepted when either somebody suggested to use devenv for compilation or use Dark to create wix-files from existing msi files. Considering the following: VisualStudio isn't installed on the buildserver I have to use. I am using nant + msbuild to compile the solutions I would like to compile mergemodules from .vdproj (because Visual Studio detects dependencies automatically) and create a

MSBuild with Azure - PublishProfileSet evaluates to a “”

梦想与她 提交于 2019-12-22 06:36:12
问题 I'm trying to deploy my project to Azure. I've been wrestling with EF code first on Azure for a few hours, but I got it to go once and it created a user. I went to publish an update, and now I'm getting the following error: Invoke build failed due to exception 'Expected "$(_PublishProfileSet)" to evaluate to a boolean instead of "", in condition "$(_PublishProfileSet) And '$(PublishProfileName)' =='' And '$(WebPublishProfileFile)'==''". I've removed the publish profile and readded it, I've