Msbuild: when is 'msbuild?' Imported in Microsoft.VisualBasic.Targets build project?

Here's my situation, I'm trying to understand how msbuild works by looking at the build files located in the .NET Framework install path:

C:\Windows\Microsoft.NET\Framework\v3.5>dir /s/b microsoft*
Microsoft.Build.Tasks.v3.5.xml
Microsoft.Build.xsd
Microsoft.Common.targets
Microsoft.Common.Tasks
Microsoft.CSharp.targets
Microsoft.Data.Entity.targets
Microsoft.VisualBasic.targets
Microsoft.WinFx.targets
MSBuild\Microsoft.Build.Commontypes.xsd
MSBuild\Microsoft.Build.Core.xsd

      

I am assuming that msbuild starts with Microsoft.Common.Targets and then at some point in the future msbuild "looks" at my vb project file extension (.vbproj) and downloads "Microsoft.VisualBasic.targets".

two questions:

1) Is my interpretation correct?

2) can you explain to me where is the code that detects that it is a .vbproj file and loads "Microsoft.VisualBasic.targets" accordingly? Is the code locked in an assembly somewhere or is it visible in the assembly files listed above?

+1


source to share


2 answers


It runs with your .vbproj file. Look at this file, it will be <Import> Microsoft.VisualBasic.targets, which in turn will <Import> Microsoft.Common.targets.



+1


source


In 4.0, which is currently in beta, there is a / preprocess switch that will make it all clear.



0


source







All Articles