MSBuild VS SLN File and Project Files

I'm just starting to look at MSBuild and hug the whole idea. I installed a CI server with Hudson and want to know how I should "work with build scripts and sln / proj files.

For example, I have an existing solution that has 10 projects (one of which is a website, and the other is a web deployment project and an MSI project to install). What is a good way to handle the construction of this?

  • Should I just specify msbuild in the sln file?
  • Should I take what is in the SLN file and create another, so it points to different proj files?
  • Should I take the code from all the sln and proj files and create one custom script construct?

If I deal with one of the last two, I need to worry about saving two sets of scripts, i.e. make sure my script matches the date as well as the sln / proj files?

Also, how can I deal with its construction when developing in my local field? Am I just CTRL SHIFT B to build it and then use only the script construct to build the CI server / deployment?

+3
source share
3 answers

I like the approach, each project has its own assembly file (whether it is msbuild or NAnt, etc.), and then there is an assembly that builds all the projects. This way you focus on the project (for example, when fixing a bug), and you start the main assembly before checking, and master.build is what runs on the build machine.

VS, . .

. CI ...

!

+1

script, MSBuild. MSbuild . . script, .

CI script. , .bat. MSBuild script , . bat , . :

%WINDIR%\Microsoft.NET\Framework\v3.5\MSBuild.exe build.xml /fileLogger /fileLoggerParameters:LogFile=MSBuildLog.txt
+3

Google "F5":

http://blog.codinghorror.com/the-f5-key-is-not-a-build-process/

, MSBuild script, SLN .

SCOTT HANSELMAN ( ) VS script.

I assume that you still need to press F5 for debugging and can no longer escape this scenario (asp.net can join the process, so you don't need to do this).

I'm going to start by looking at the project files and creating a script from them, and then tweaking after that.

Hope this helps someone else get along in the future.

+1
source

Source: https://habr.com/ru/post/1730603/


All Articles