c# - conditional references in visual studio - how to define the customized variable -


i have project should reference other projects done way:

 <reference include="referenceddll" condition=" '$(configuration)' == 'debug' ">   <hintpath>..\resources\external dlls\referenceddll.dll</hintpath> </reference> 

this works fine , copies dll in case in debug. want not depend on debug/ release other variable definition

something like:

<reference include="referenceddll" condition=" '$(releasetype)' == 'internal_release' ">   <hintpath>..\resources\external dlls\referenceddll.dll</hintpath> </reference> 

i did not find how define releasetype variable? + there way use same variable both #if in code , conditional referencing?

i saw option use use

 condition=" $(defineconstants.contains('internal_release'))" 

but did not work i'd expect

i'm not sure if there way in visual studio. if running build msbuild directly can use /p:releasetype=internal_release.

in project ended changing configuration property , instead of having debug , release have more values , dev,qa,stage, etc...


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -