hello, I have a project for all my javascripts in side (that i made common for three projects), I want upon build to move these scripts to the three projects, how can i do this by editing .csproject and how? Thanks
A:
If you can use Visual Studio to build then use post build events in visual studio. Failing that if you have access to the command line just issue a copy command
Adam Naylor
2009-01-29 12:53:13
+1
A:
There is two ways to do that:
_ Edit the .csproject, at the end of the file you should find a Target named AfterBuild (uncomment the target).
<ItemGroup>
<JavascriptFiles Include="*.js"/>
</ItemGroup>
<Target Name="AfterBuild">
<Copy
SourceFiles="@(JavascriptFiles)"
DestinationFolder="PathWhereYouWantToCopyYourJavascriptFiles"
/>
</Target>
_ Post build events in visual studio (in project properties)
madgnome
2009-01-29 13:07:10
A:
I have in the same solution webapplication1 and webapplication2 and im editing .csproject for webapplication1, and i want to copy all files in test folder
<Target Name="AfterBuild">
<Copy SourceFiles="$(WDTargetDir)test\"
DestinationFolder="$(SolutionRoot)WebApplication2">
</Copy>
</Target>
nothing is happening????
Targets BeforeBuild and AfterBuild are commented by default. It could be that.
madgnome
2009-01-29 13:45:39
man ofcourse i removed the comment :$
2009-01-29 13:48:30
You must pass a Items to SourceFiles, here you just pass a directory. See http://msdn.microsoft.com/fr-fr/library/3e54c37h.aspx for more informations.
madgnome
2009-01-29 14:08:54
thx for ur reply, but how can i move these files to the second project which is in the same solutionDestinationFolder="$(SolutionRoot)WebApplication2" is creating a folder name webapplication2 in my source application
2009-01-29 19:37:27