Could anyone provide any example of NAnt script for C++ project build automation?
Thanks!
If you're talking Microsoft Visual C++ then I think you get the most control by shelling out msbuild.exe from the nant script and passing it your solution file on the command line. This is supported in Visual Studio 2005/.Net Framework 2.0 and above. e.g.:
<property name="msbuild.dir" value="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727" />
...
<exec program="${msbuild.dir}\MSBuild.exe"
commandline="/p:Configuration=Release .\MySolution.sln"
/>
It will build everything in your solution regardless of language (c#, VB, C++, etc)
Mike
If the project is in Visual Studio then you can use the <Solution> task, I think. That's the simplest/ugliest way of doing it.
edit: Just realised that SO filtered out my little XML tag there.
I was recently looking for this kind of information, and found this blog entry about it:
http://seclib.blogspot.com/2005/05/building-native-c-projects-with-nant.html
Related
I'm sorry if this question has been asked before but I couldn't find an answer so far.
Let's say I have a asp.net mvc5 project, and I have included a external script file in my cshtml file using razor.
like so:
<script src="#Url.Content("~/Scripts/Path/File.js")"></script>
is there any way to easily open that file from the include statement? Or is there a different way to include the script that would allow such functionality?
plug-ins are also welcome.
Thanks everyone.
I don't think there's such extension nor feature in Visual Studio unfortunately. There'are extension for Visual Studio Code (e.g. Open file), but not for the "big" Visual Studio.
You can try to create your own extension to do that, it shouldn't be so complicated.
Or you can try to create a feature request on UserVoice and wait if it's accepted and implemented.
It's very important to have Web.config transformations when we want to avoid errors while publishing for staging or production. Can this be done using monodevelop? I've search for a solution without any success.
I'm answering after a long time in case someone finds this question.
I have developed a way to publish a ASP.NET project through xbuild (not directly through Monodevelop) with Web.config transformations.
You can find it here.
Not currently (as of 2.10.9). Mono does not yet have an implementation of MSDeploy, and specifically the Microsoft.Web.Publishing.Tasks.dll assembly and the Microsoft.Web.Publishing.targets file.
You can use the MSBuild.Microsoft.VisualStudio.Web.targets NuGet package , see TransformXml task fails via msbuild on linux using mono for full instructions.
In TFS 2010 build, I have a new build and I want to call an ant script that builds Flash.
How do I call the ant script?
Also
How can I compile the Flash directly?
I've seen the Power Tools and this question but it doesn't help me as we don't have TFS 2008. I can't find any documentation on how to use the power tools except the 1 sentence on the bottom of download page saying to create your build the old way and import it (which isn't very helpful).
I've installed the power tools on the agent computer but I don't see any new options in the Toolbox when I'm designing the build flow.
So yeah, i'm stumped :(
If you are working with Team Explorer 2010, you have checkin the TFSBuild.Proj and Ant Script files in source control. Then, you have edit UpgradeTemplate Build Prcoess Template to execute the TFSBuild.Proj file which you have checked-in which inturn will call your Ant script.
If you haven't worked on Building Java Projects using Team Build 2008, you may not like doing these steps.
I was able to call the Ant script by using InvokeProcess.
The ant script then builds the flash so everything is working good for me now.
I'm wondering if anyone out there has any ideas about how to run Ant inside Visual Studio 2008. I'm looking to perform some pretty common Ant tasks such as selecting a target to run inside a build file.
I have come across and am aware of NANT as well as MSBUILD as more preferred build tools for ASP.NET projects, but I am only interested in some ideas about running Ant within the IDE.
Thanks in advance!
As a quick and dirty solution you could add it using the External Tools... option in the Tools menu.
You can then see the Ant output in the Output window, and you can pass it various things like the current Project directory on the command line.
You can also assign keyboard shortcuts to the Tools.ExternalCommandXX commands which represent the external tools in the Tools menu.
Is there a way to pre-compile websites with VWD Express ?
Can I use ASP.NET Merge tool or similar utility ? and is there any limitation to options (can I choose whatever options like in VS Pro edition)
Not 100% about VWD but do you have post build options within IDE (under the Build Events of the web application properties)
Even without you could run following from the command line
C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler -v / -f -u -p
"$(ProjectDir)\" "$(SolutionDir)PrecompiledWeb\$(ConfigurationName)"
I haven't tried this with anything generated by VS Express, but you should be able to build and deploy the website using a custom MSBuild script no matter where it came from. Something like:
<MSBuild Projects="$(MSBuildProjectDirectory)\MyProject.csproj"
Targets="ResolveReferences;_CopyWebApplication"
Properties="WebProjectOutputDir=$(MyTargetDir);OutDir=$(WebProjectOutputDir)\;Configuration=Release" />
I decided to make it easier by creating a custom external tool, here is how I did it:
http://blog.larmib.com/2012/how-to-compile-visual-web-developer-2010-express/
To make things easier I created a Settings file precompile.vssetting. Enjoy, please +1 my blog if you find my post helpful.