Click here to Skip to main content
15,887,349 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Projects can be built by different versions of msbuild e.g.

C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe
C:\Windows\Microsoft.Net\Framework\v2.0.50727\MSBuild.exe

Is there any way to determine (e.g. through reflection?) to determine which version of msbuild was used?

Tia, Liam

What I have tried:

Searched the forums
Checked Microsoft site
Asked locally
Posted
Updated 24-Mar-17 1:37am
Comments
Dave Kreskowiak 23-Mar-17 11:07am    
Are you asking how to find out which version of MSBuild was used to build an executable using nothing but the information/data in the executable?
LiamD 24-Mar-17 7:27am    
Yes.

I am more thinking that the particular MSBuild versions used, might include specific libraries that could help identify which was used.
Richard MacCutchan 24-Mar-17 10:00am    
MSBuild is a free standing program that creates scripts to compile and link your application. There is nothing in it that has any connection or relevance to the final application. It's like wanting to know the name of the mechanic who serviced your car by looking at the seats.
LiamD 24-Mar-17 10:35am    
:)
Richard MacCutchan 23-Mar-17 12:03pm    
No, because the information is not connected to the generated code. msbuild merely generates the script(s) which build the application.

1 solution

There is no way to determine which version of MSBuild was used. There is no days in the executable that says which version was used and nothing in them specific to MSBuild to use as a trail of breadcrumbs to determine it either.

You dont even need MSBuild to build an executable.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900