deployment - MSBuild: OutputPath directory is empty -


i want deploy asp.net mvc site. have next script.

<import project="..\myprojname\myprojname.csproj"/>  <propertygroup>     <newinstalldir>c:\deployfolder\</newinstalldir>     <bindir>$(newinstalldir)bin\</bindir> </propertygroup>  <target name="build">     <msbuild projects="..\myslnname.sln"              properties="configuration=release;platform=any cpu;outputpath=$(bindir)" />     <copy sourcefiles="@(content->'..\myprojname\%(relativedir)%(filename)%(extension)')"            destinationfiles="@(content->'$(newinstalldir)%(relativedir)%(filename)%(extension)')" />     <copy sourcefiles="@(none->'..\myprojname\%(relativedir)%(filename)%(extension)')"           destinationfiles="@(none->'$(newinstalldir)%(relativedir)%(filename)%(extension)')" />     <makedir directories="@(folder->'$(newinstalldir)%(relativedir)')" /> </target> 

main idea.
i copy binary c:\deployfolder (take structure of folder sources)
i build dll c:\deployfolder\bin (i don't have folder in sources folder need separately copy this).
run script - works instead of copy dll's outputpath.
same scripts works other asp.net mvc project.
no idea wrong in case.
complete issue workaround want know wrong script.

the first thing i'd try replace use of deprecated $(outputpath) $(outdir). when i've seen error, 9 times out of 10 due mismatch between platform/configuration requested , how particular project defined. take care keep track of discrepency between "any cpu" (with space) preferred solution files , "anycpu" used inside project files $(platform). project wizards set "x86" platform or otherwise omit "anycpu" can cause outputpath empty.

beyond that, approach of importing project file , building solution (presumbably includes same project" bit off center. consider making deployment changes desire within project file itself, through import. can either wire existing build targets @ right place, or perhaps add additional target.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -