How to override vbproj DebugSymbols with msbuild? -


I want to generate .pdb files despite the debug sbimbs settings in my various vbproj files.

I have an MSBILD project named FX.proj which looks like this:

   & Lt; Include in the context of the project = "C: \ product \ core.vbproj" /> & Lt; Include in the context of the project = "C: \ product \ fx.vbproj" /> & Lt; / ItemGroup & gt; & Lt; Target name = "build" & gt; & Lt; MSBuild Projects = "@ (project reference)" target = "build" /> & Lt; / Target & gt; & Lt; / Project & gt;  

I tell it from the command line like this:

MSbild / T: Build / V: Minimal / Enologo "/ P: Output path =% ~ Dp0bin; Configuration = Release "/ fl /flp:LogFile=FX.log;Verbosity=Normal FX.proj

I want to override the DebugSymbols property in each vbproj

I have tried to add it to the command line like this:

MSBild / T: Build / V: Minimal / Nolo / P: Output path =% ~ DPTBin ; Configuration = Release; DebugSimples = true "/ fl /flp:LogFile=FX.log;Verbosity=Normal FX.proj

and thus for MSBuild target attributes:

  & lt; Target name = "build" & gt; & Lt; MSBuild Projects = "@ (Project Reference)" target = "build" property = "DebugSymbols = true" /> & Lt; / Target & gt;  

but neither does it work

Any thoughts?

I did this right thing, and have included the goal < / P>

  & lt; Target name = "afterbild" & gt; & Lt; Message text = "debug symbols: $ (debug symbols)" value = "high" /> & Lt; / Target & gt;  

In each .vbproj file ( after import statement ). Here is my entire FX.proj file.

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Project Tools Version = "3.5" xmlns = "http://schemas.microsoft.com/developer/msbuild/2003" & gt; & Lt; ItemGroup & gt; & Lt; Include in the context of the project = "WindowsApplication1 \ WindowsApplication1.vbproj" /> & Lt; Include in the context of the project = "Class Library 1 \ ClassLibrary1.vbproj" / & gt; & Lt; Include in the context of the project = "Class Library 2 \ ClassLibrary2.vbproj" / & gt; & Lt; / ItemGroup & gt; & Lt; Target name = "build" & gt; & Lt; Message text = "debug symbos = building for building" value = "high" /> & Lt; MSBuild Projects = "@ (Project Reference)" property = "DebugSymbols = false" /> & Lt; Message text = "building = true for debugsmills" value = "high" /> & Lt; MSBuild Projects = "@ (Project Reference)" property = "DebugSymbols = true" /> & Lt; / Target & gt; & Lt; / Project & gt;  

You can download your files here. BTW You may want to consider changing the name of the item from Project Reference to something else, perhaps Projects . Project Reference has a specific meaning, so it can be misleading.

Saeed Ibrahim Hashimi

My Book:


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -