c# - How can I make sure only *.exe or *.dll file goes to output folder and any other build files goes to intermediate folder VS2012? -


i created c# project on vs2012 , want output folder contain .exe/.dll file , other files created when building project go intermediate folder.

i have property sheet defines intermediate location.

<?xml version="1.0" encoding="utf-8"?> <project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">    <propertygroup>     <build_root>f:\test</build_root>     <build_intermediate>f:\test</build_intermediate>   </propertygroup>    <propertygroup condition=" '$(configuration)|$(platform)' == 'debug|anycpu' ">     <intermediateoutputpath>$(build_intermediate)\inter\debug\</intermediateoutputpath>     <baseintermediateoutputpath >$(intermediateoutputpath)</baseintermediateoutputpath >   </propertygroup>    <propertygroup condition=" '$(configuration)|$(platform)' == 'release|anycpu' ">     <intermediateoutputpath>$(build_intermediate)\inter\release\</intermediateoutputpath>     <baseintermediateoutputpath >$(intermediateoutputpath)</baseintermediateoutputpath >   </propertygroup>  </project> 

i imported property sheet project file manuallly

<?xml version="1.0" encoding="utf-8"?> <project toolsversion="4.0" defaulttargets="build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">   <import project="$(msbuildextensionspath)\$(msbuildtoolsversion)\microsoft.common.props" condition="exists('$(msbuildextensionspath)\$(msbuildtoolsversion)\microsoft.common.props')" />   <import project="$(msbuildprojectdirectory)\propertysheet.props" /> 

when build project, creates separate folders output , intermediate. intermediate folder contains intermediate files along pdb file. contains exe file.

but problem facing is, output folder contains of file in intermediate folder too. such pdb, exe, config etc.

can please me explaining should .exe file in output folder , other build time files stay in intermediate folder?

you should instead create additional "dist" folder (or similar) , copy exe , dll files folder after build. there many msbuild properties , targets can place files in output folder, , attempting change behavior break functionality.

also, if specify baseintermediateoutputpath should not specify intermediateoutputpath. in case of properties above, appear trying use this:

<baseintermediateoutputpath>$(build_intermediate)\inter\</baseintermediateoutputpath> 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -