I have attempted the following:
<!-- Specify the inputs by type and file name -->
<ItemGroup>
<CSFile Include = "$(MSBuildProjectDirectory)\..\Mine.cs"/>
</ItemGroup>
<Target Name = "Compile">
<!-- Run the Visual C# compilation using input files of type CSFile -->
<Csc Sources="@(CSFile)" />
<!-- Log the file name of the output file -->
<Message Text="The output file is done"/>
</Target>
This does not work as all the namespaces used in the project throw errors. Does anyone know how I can explicitly get the assemblies to pick up from the solution file, as the paths are ok and if loaded in Visual Studio all is fine. I need to script this and the above is not working. Is there an obvious mishap?
Appreciate the inpuT :-)
I have realised that this is not going to work as the file I have has several external dependancies. Hence I would need to use the devenv.exe. Problem is that I get the follwing:
What I get is that the command exits with Code 1? I want to get the project to build all the dependant dlls that it requires without having to open visual studio.
Any ideas?
Thnxes :-)