.net - How to get specific version of SDK from GetFrameworkSdkPath in MSBuild -
i able pull out mage.exe , add deployment package during build process. need able pull specific version of mage.exe tool depending on framework version of current target. so, example, when building .net 4.0 project, want package mage.exe (microsoft sdks\windows\v8.0a\bin\netfx 4.0 tools) , not (microsoft sdks\windows\v10.0a\bin\netfx 4.6 tools).
i'm using getframeworksdkpath task in build process doesn't seem pull correct sdk version path..
here's current approach:
<choose> <when condition="'$(targetframeworkversion)'=='v2.0'"> <propertygroup> <sdkversionpath>frameworksdkversion20path</sdkversionpath> </propertygroup> </when> <when condition="'$(targetframeworkversion)'=='v3.5'"> <propertygroup> <sdkversionpath>frameworksdkversion35path</sdkversionpath> </propertygroup> </when> <when condition="'$(targetframeworkversion)'=='v4.0'"> <propertygroup> <sdkversionpath>frameworksdkversion40path</sdkversionpath> </propertygroup> </when> </choose> <target name="getsdkversionpath"> <propertygroup> <sdkversionpath condition="$(sdkversionpath)==''">path</sdkversionpath> </propertygroup> <message text="sdk version path: $(sdkversionpath)"/> <getframeworksdkpath> <output taskparameter="$(sdkversionpath)" propertyname="sdkpath" /> </getframeworksdkpath> </target>
with approach, when framework version 'v4.0', gives me path sdk v10.0a instead of v8.0a expected.
any ideas on how path correct version of mage.exe in sdk?
Comments
Post a Comment