Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback changes on #80 #84

Merged
merged 18 commits into from
Jun 24, 2018
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ root = true

# Don't use tabs for indentation.
[*]
charset = utf-8
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be utf-8-bom

Copy link
Contributor Author

@Nirmal4G Nirmal4G Jun 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It caused some problems on my machine, so I made sure all the files would be utf-8 using these tools.

indent_style = space
# (Please don't specify an indent_size here; that has too many unintended consequences.)

Expand All @@ -17,7 +18,10 @@ indent_size = 4
# Code files
[*.{cs,csx,vb,vbx}]
indent_size = 4
charset = utf-8-bom

# Script files
[*.{cmd,bat,ps1}]
indent_size = 4

# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.rsp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/MaxCPUCount
/BinaryLogger
/DetailedSummary
/Verbosity:minimal
/Verbosity:normal
/NodeReuse:false
/Restore
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<DefaultItemExcludes>$(DefaultItemExcludes)$(_ProjectItemExcludes)</DefaultItemExcludes>
</PropertyGroup>

<Import Project="$(BuildToolsPath)MSBuild.OutputPathChecks.targets"/>
<Import Project="$(BuildToolsPath)MSBuild.OutputPathChecks.targets" Label="OutputPaths"/>

</Project>
11 changes: 3 additions & 8 deletions Source/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,17 @@

<Import Project="$(MSBuildThisFileDirectory)..\$(MSBuildThisFile)"/>

<Import Project="$(BuildToolsPath)MSBuild.OutputPaths.props"/>
<Import Project="$(BuildToolsPath)MSBuild.OutputPaths.props" Label="OutputPaths"/>

<PropertyGroup>
<PropertyGroup Label="Output">
<PublishFolder>~Packages</PublishFolder>
</PropertyGroup>

<PropertyGroup Label="OutputPaths">
<CustomBeforeSdkTargets>$(BuildToolsPath)MSBuild.OutputPaths.targets</CustomBeforeSdkTargets>
</PropertyGroup>

<PropertyGroup Label="Build">
<NoPackageAnalysis>true</NoPackageAnalysis>
<IncludeBuildOutput>false</IncludeBuildOutput>
<PackOnBuild>true</PackOnBuild>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
<Import Project="$(BuildToolsPath)MSBuild.Packaging.props"/>

<PropertyGroup Label="PackageInfo">
<Authors>Oren Novotny</Authors>
Expand Down
10 changes: 2 additions & 8 deletions Source/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Import Project="$(BuildToolsPath)MSBuild.Packaging.targets" Condition="'$(IncludeBuildOutput)' == 'false'"/>
<Import Project="$(BuildToolsPath)MSBuild.Packaging.targets"/>

<Import Project="$(MSBuildThisFileDirectory)..\$(MSBuildThisFile)"/>

Expand All @@ -12,14 +12,8 @@
<Import Project="$(BuildToolsPath)MSBuild.DevLocal.targets" Condition="'$(IsCloudBuild)' != 'true'"/>

<ItemGroup Condition="'$(IsCloudBuild)' == 'true'">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-*" PrivateAssets="All"/>
<PackageReference Include="Nerdbank.GitVersioning" Version="2.1.23" PrivateAssets="All"/>
</ItemGroup>

<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>

</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-62925-02" PrivateAssets="All"/>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
</PropertyGroup>

<PropertyGroup>
<_SdkFallbackLanguageTargets Condition="'$(IsMultiTargetingBuild)' != 'true'">$(MSBuildToolsPath)\Microsoft.Common.CurrentVersion.targets</_SdkFallbackLanguageTargets>
<_SdkFallbackLanguageTargets Condition="'$(IsMultiTargetingBuild)' == 'true'">$(MSBuildToolsPath)\Microsoft.Common.CrossTargeting.targets</_SdkFallbackLanguageTargets>
<_SdkFallbackLanguageTargets>$(MSBuildToolsPath)\Microsoft.Common.targets</_SdkFallbackLanguageTargets>
</PropertyGroup>

<!-- Import the fallback targets so the NuGet restore succeeds -->
<Import Project="$(_SdkFallbackLanguageTargets)" Condition="Exists('$(_SdkFallbackLanguageTargets)')"/>

<Target Name="ShowMissingLanguageTargetsError" BeforeTargets="_CheckForUnsupportedTargetFramework">
<Target Name="_ShowMissingLanguageTargetsError" BeforeTargets="_CheckForUnsupportedTargetFramework" Condition="'$(_IgnoreMissingLanguageTargetsError)' != 'true'">
<Error Condition="'$(_ShortFrameworkIdentifier)' != 'portable'" Text="The specified language targets for $(TargetFramework) is missing. Ensure correct tooling is installed for '$(_ShortFrameworkIdentifier)'"/>
<Error Condition="'$(_ShortFrameworkIdentifier)' == 'portable'" Text="The specified TFM '$(TargetFramework)' is not valid. Check that it's a valid combination: https://portablelibraryprofiles.stephencleary.com/"/>
</Target>
Expand Down
25 changes: 16 additions & 9 deletions Source/MSBuild.Sdk.Extras/Build/LanguageTargets/Desktop.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,27 @@
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>

<!--
Only MSBuild Framework build includes Microsoft.Xaml.targets which redirects to MSBuildFrameworkToolsPath.
So to have Xaml Support, we need to use those targets instead of .NETCoreSdk targets
-->
<PropertyGroup Condition="$(_SdkDesktopTargets) == ''">
<_SdkDesktopTargets Condition="'$(_LanguageSourceName)' != 'FSharp'">$(MSBuildExtensionsPath)\$(_SdkVisualStudioVersion)\Bin\Microsoft.$(_LanguageSourceName).targets</_SdkDesktopTargets>
<_SdkDesktopTargets Condition="'$(_LanguageSourceName)' == 'FSharp'">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(_SdkVisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</_SdkDesktopTargets>
<PropertyGroup Condition="'$(MicrosoftNETSdkTargetsPath)' == ''">
<MicrosoftNETSdkTargetsPath>$(ToolDepsJsonGeneratorProject.TrimEnd('GenerateDeps\GenerateDeps.proj'))</MicrosoftNETSdkTargetsPath>
<MicrosoftNETSdkTargetsPath Condition="!Exists('$(MicrosoftNETSdkTargetsPath)')">$(_NugetFallbackFolder.TrimEnd('..\..\..\..\NuGetFallbackFolder'))</MicrosoftNETSdkTargetsPath>
<MicrosoftNETSdkTargetsPath Condition="!Exists('$(MicrosoftNETSdkTargetsPath)')">$(NETCoreSdkBundledVersionsProps.TrimEnd('..\..\..\Microsoft.NETCoreSdk.BundledVersions.props'))</MicrosoftNETSdkTargetsPath>
</PropertyGroup>

<PropertyGroup Condition="'$(_FSharpTargetsPath)' == ''">
<_FSharpTargetsPath>$(MicrosoftNETSdkTargetsPath)Microsoft.NET.Sdk.FSharpTargetsShim.targets</_FSharpTargetsPath>
<_FSharpTargetsPath Condition="!Exists('$(_FSharpTargetsPath)')">$(MicrosoftNETSdkTargetsPath)Microsoft.NET.Sdk.FSharp.targets</_FSharpTargetsPath>
</PropertyGroup>

<PropertyGroup>
<_SdkLanguageTargets Condition="'$(_LanguageSourceName)' != 'FSharp'">$(MSBuildToolsPath)\Microsoft.$(_LanguageSourceName).targets</_SdkLanguageTargets>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we looking for the F# Targets this way instead of the VS directory?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these being set to a private variable and imported below instead of using LanguageTargets?

https://github.com/onovotny/MSBuildSdkExtras/blob/rel/1.5/MSBuild.Sdk.Extras/build/platforms/languageTargets/Wpf.targets#L9-L10

Copy link
Contributor Author

@Nirmal4G Nirmal4G Jun 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how to explain it (in writing) but I can show you.

Desktop.targets#L27-L41 on MSBuild.NET.Extras.Sdk

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not following... I can see that you may want to add a second import, but I don't think we should be overriding the base language targets if they're the same? At least use the LanguageTargets value that's provided by default?

I know there was one specific issue around WPF builds that needed to use the VS's version, but that was already handled? So I'm not really sure why stuff is being searched for via MicrosoftNETSdkTargetsPath?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You were talking about this?

Why are we looking for the F# Targets this way instead of the VS directory?

I wanted to make sure F# would have the same behaviour when under .NET SDK in this SDK too!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we're not doing that there! We're not importing from Microsoft.NET.Sdk

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what the issue is -- I thought we had to explicitly import the Visual Studio version for this scenario, not import from the SDK. If all we're doing is importing from the SDK, then we don't need anything and can fall back to the default LanguageTargets?

<_SdkLanguageTargets Condition="'$(_LanguageSourceName)' == 'FSharp'">$(_FSharpTargetsPath)</_SdkLanguageTargets>
</PropertyGroup>

<PropertyGroup>
<_SdkLanguageTargetsMissing Condition="!Exists('$(_SdkDesktopTargets)')">true</_SdkLanguageTargetsMissing>
<_SdkLanguageTargetsMissing Condition="!Exists('$(_SdkLanguageTargets)')">true</_SdkLanguageTargetsMissing>
</PropertyGroup>

<Import Project="$(_SdkDesktopTargets)" Condition="Exists('$(_SdkDesktopTargets)')"/>
<Import Project="$(_SdkLanguageTargets)" Condition="Exists('$(_SdkLanguageTargets)')"/>
<Import Project="$(MSBuildThisFileDirectory)CheckMissing.targets" Condition="'$(_SdkLanguageTargetsMissing)' == 'true'"/>

</Project>
10 changes: 5 additions & 5 deletions Source/MSBuild.Sdk.Extras/Build/LanguageTargets/Portable.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>

<PropertyGroup Condition="$(_SdkPortableTargets) == ''">
<_SdkPortableTargets Condition="'$(_LanguageSourceName)' != 'FSharp'">$(MSBuildExtensionsPath)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.$(_LanguageSourceName).targets</_SdkPortableTargets>
<_SdkPortableTargets Condition="'$(_LanguageSourceName)' == 'FSharp'">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(_SdkVisualStudioVersion)\FSharp\Microsoft.Portable.FSharp.Targets</_SdkPortableTargets>
<PropertyGroup>
<_SdkLanguageTargets Condition="'$(_LanguageSourceName)' != 'FSharp'">$(MSBuildExtensionsPath)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.$(_LanguageSourceName).targets</_SdkLanguageTargets>
<_SdkLanguageTargets Condition="'$(_LanguageSourceName)' == 'FSharp'">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.Portable.FSharp.Targets</_SdkLanguageTargets>
</PropertyGroup>

<PropertyGroup>
<_SdkLanguageTargetsMissing Condition="!Exists('$(_SdkPortableTargets)')">true</_SdkLanguageTargetsMissing>
<_SdkLanguageTargetsMissing Condition="!Exists('$(_SdkLanguageTargets)')">true</_SdkLanguageTargetsMissing>
</PropertyGroup>

<Import Project="$(_SdkPortableTargets)" Condition="Exists('$(_SdkPortableTargets)')"/>
<Import Project="$(_SdkLanguageTargets)" Condition="Exists('$(_SdkLanguageTargets)')"/>
<Import Project="$(MSBuildThisFileDirectory)CheckMissing.targets" Condition="'$(_SdkLanguageTargetsMissing)' == 'true'"/>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@
<PropertyGroup>
<!-- HACK: $(MSBuildExtensionsPath) for VS <= 14.0 -->
<_SdkMSBuildExtensionsPath>$(MSBuildProgramFiles32)\MSBuild</_SdkMSBuildExtensionsPath>
<_SdkSilverlightTargets Condition="'$(_SdkSilverlightTargets)' == ''">$(_SdkMSBuildExtensionsPath)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.$(_LanguageSourceName).targets</_SdkSilverlightTargets>
<_SdkLanguageTargetsMissing Condition="!Exists('$(_SdkSilverlightTargets)')">true</_SdkLanguageTargetsMissing>
</PropertyGroup>

<Import Project="$(_SdkSilverlightTargets)" Condition="Exists('$(_SdkSilverlightTargets)')"/>
<PropertyGroup>
<_SdkLanguageTargets>$(_SdkMSBuildExtensionsPath)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.$(_LanguageSourceName).targets</_SdkLanguageTargets>
</PropertyGroup>

<PropertyGroup>
<_SdkLanguageTargetsMissing Condition="!Exists('$(_SdkLanguageTargets)')">true</_SdkLanguageTargetsMissing>
</PropertyGroup>

<Import Project="$(_SdkLanguageTargets)" Condition="Exists('$(_SdkLanguageTargets)')"/>
<Import Project="$(MSBuildThisFileDirectory)CheckMissing.targets" Condition="'$(_SdkLanguageTargetsMissing)' == 'true'"/>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
</PropertyGroup>

<PropertyGroup>
<_SdkWindowsTargets Condition="'$(_SdkWindowsTargets)' == ''">$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(_SdkVisualStudioVersion)\Microsoft.Windows.UI.Xaml.$(_LanguageSourceName).targets</_SdkWindowsTargets>
<_SdkLanguageTargetsMissing Condition="!Exists('$(_SdkWindowsTargets)')">true</_SdkLanguageTargetsMissing>
<_SdkLanguageTargets>$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.$(_LanguageSourceName).targets</_SdkLanguageTargets>
</PropertyGroup>

<Import Project="$(_SdkWindowsTargets)" Condition="Exists('$(_SdkWindowsTargets)')"/>
<PropertyGroup>
<_SdkLanguageTargetsMissing Condition="!Exists('$(_SdkLanguageTargets)')">true</_SdkLanguageTargetsMissing>
</PropertyGroup>

<Import Project="$(_SdkLanguageTargets)" Condition="Exists('$(_SdkLanguageTargets)')"/>
<Import Project="$(MSBuildThisFileDirectory)CheckMissing.targets" Condition="'$(_SdkLanguageTargetsMissing)' == 'true'"/>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@
<PropertyGroup>
<!-- HACK: $(MSBuildExtensionsPath) for VS <= 14.0 -->
<_SdkMSBuildExtensionsPath>$(MSBuildProgramFiles32)\MSBuild</_SdkMSBuildExtensionsPath>
<_SdkWindowsPhoneOverridesTargets Condition="'$(_SdkWindowsPhoneOverridesTargets)' == ''">$(_SdkMSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets</_SdkWindowsPhoneOverridesTargets>
<_SdkWindowsPhoneTargets Condition="'$(_SdkWindowsPhoneTargets)' == ''">$(_SdkMSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(_LanguageSourceName).targets</_SdkWindowsPhoneTargets>
<_SdkLanguageTargetsMissing Condition="!Exists('$(_SdkWindowsPhoneTargets)')">true</_SdkLanguageTargetsMissing>
</PropertyGroup>

<ImportGroup>
<Import Project="$(_SdkWindowsPhoneOverridesTargets)" Condition="Exists('$(_SdkWindowsPhoneOverridesTargets)')"/>
<Import Project="$(_SdkWindowsPhoneTargets)" Condition="Exists('$(_SdkWindowsPhoneTargets)')"/>
<Import Project="$(MSBuildThisFileDirectory)CheckMissing.targets" Condition="'$(_SdkLanguageTargetsMissing)' == 'true'"/>
</ImportGroup>
<PropertyGroup>
<_SdkLanguageTargets>$(_SdkMSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(_LanguageSourceName).targets</_SdkLanguageTargets>
<_SdkLanguageOverridesTargets>$(_SdkMSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets</_SdkLanguageOverridesTargets>
</PropertyGroup>

<PropertyGroup>
<_SdkLanguageTargetsMissing Condition="!Exists('$(_SdkLanguageTargets)')">true</_SdkLanguageTargetsMissing>
</PropertyGroup>

<Import Project="$(_SdkLanguageOverridesTargets)" Condition="Exists('$(_SdkLanguageOverridesTargets)')"/>
<Import Project="$(_SdkLanguageTargets)" Condition="Exists('$(_SdkLanguageTargets)')"/>
<Import Project="$(MSBuildThisFileDirectory)CheckMissing.targets" Condition="'$(_SdkLanguageTargetsMissing)' == 'true'"/>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
<_SdkTargetsImportType Condition="'$(IsApplePlatform)' == 'true'">ObjCBinding.$(_LanguageSourceName)</_SdkTargetsImportType>
</PropertyGroup>

<PropertyGroup Condition="'$(_SdkXamarinPlatformTargets)' == ''">
<_SdkXamarinPlatformTargets>$(MSBuildExtensionsPath)\Xamarin\$(_SdkTargetPlatformName)\Xamarin.$(_SdkTargetPlatformName).$(_SdkTargetsImportType).targets</_SdkXamarinPlatformTargets>
<PropertyGroup>
<_SdkLanguageTargets>$(MSBuildExtensionsPath)\Xamarin\$(_SdkTargetPlatformName)\Xamarin.$(_SdkTargetPlatformName).$(_SdkTargetsImportType).targets</_SdkLanguageTargets>
</PropertyGroup>

<PropertyGroup>
<_SdkLanguageTargetsMissing Condition="!Exists('$(_SdkXamarinPlatformTargets)')">true</_SdkLanguageTargetsMissing>
<_SdkLanguageTargetsMissing Condition="!Exists('$(_SdkLanguageTargets)')">true</_SdkLanguageTargetsMissing>
</PropertyGroup>

<Import Project="$(_SdkXamarinPlatformTargets)" Condition="Exists('$(_SdkXamarinPlatformTargets)')"/>
<Import Project="$(_SdkLanguageTargets)" Condition="Exists('$(_SdkLanguageTargets)')"/>
<Import Project="$(MSBuildThisFileDirectory)CheckMissing.targets" Condition="'$(_SdkLanguageTargetsMissing)' == 'true'"/>

<!-- CSharp is the only language supported for Binding Projects for Now -->
Expand Down
6 changes: 5 additions & 1 deletion Source/MSBuild.Sdk.Extras/Build/MSBuild.NET.Extras.Sdk.props
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</When>

<Otherwise>
<PropertyGroup>
<PropertyGroup Condition="'$(_LanguageSourceName)' == ''">
<_LanguageSourceName>Common</_LanguageSourceName>
<!--<DefaultLanguageSourceExtension>.msil</DefaultLanguageSourceExtension>-->
</PropertyGroup>
Expand All @@ -40,6 +40,10 @@
<SupportedCultures Condition="'$(SupportedCultures)' == ''">$(DefaultLanguage)</SupportedCultures>
</PropertyGroup>

<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == '' OR '$(VisualStudioVersion)' &lt; '14.0'">15.0</VisualStudioVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(AppDesignerFolder)' == ''">
<AppDesignerFolder Condition="'$(_LanguageSourceName)' != 'VisualBasic'">Properties</AppDesignerFolder>
<AppDesignerFolder Condition="'$(_LanguageSourceName)' == 'VisualBasic'">My Project</AppDesignerFolder>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
<IsMultiTargetingBuild>true</IsMultiTargetingBuild>
</PropertyGroup>

<PropertyGroup>
<_SdkVisualStudioVersion>$(VisualStudioVersion)</_SdkVisualStudioVersion>
<_SdkVisualStudioVersion Condition="'$(_SdkVisualStudioVersion)' == '' OR '$(_SdkVisualStudioVersion)' &lt; '14.0'">15.0</_SdkVisualStudioVersion>
</PropertyGroup>

<ImportGroup Condition="'$(IsMultiTargetingBuild)' != 'true'">
<Import Project="$(MSBuildThisFileDirectory)MSBuild.NET.Inference.targets"
Condition="'$(TargetFramework)' != '' AND !($(TargetFramework.Contains(',')) OR $(TargetFramework.Contains(';')))"/>
Expand All @@ -25,5 +20,6 @@
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)..\DefaultItems\MSBuild.NET.DefaultItems.targets"/>
<Import Project="$(MSBuildThisFileDirectory)..\ProjectSystem\MSBuild.NET.ProjectSystem.targets"/>

</Project>
10 changes: 6 additions & 4 deletions Source/MSBuild.Sdk.Extras/Build/MSBuild.NET.Inference.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
</PropertyGroup>

<PropertyGroup>
<!-- Convert $(TargetFramework) to lower case -->
<!-- Convert 'TargetFramework' to lower case -->
<TargetFramework>$(TargetFramework.ToLowerInvariant())</TargetFramework>
<!-- if version-less framework-profile is specified then default to the highest supported version of that framework-profile -->
<TargetFramework Condition="'$(TargetFramework)' == 'net-client'">net40-client</TargetFramework>
<TargetFramework Condition="'$(TargetFramework)' == 'net-cf'">net35-cf</TargetFramework>
<TargetFramework Condition="'$(TargetFramework)' == 'netmf'">netmf44</TargetFramework>
<TargetFramework Condition="'$(TargetFramework)' == 'net'">net45</TargetFramework>
<TargetFramework Condition="'$(TargetFramework)' == 'wp'">wp8</TargetFramework>
<TargetFramework Condition="'$(TargetFramework)' == 'wpa'">wpa81</TargetFramework>
<TargetFramework Condition="'$(TargetFramework)' == 'win'">win8</TargetFramework>
<TargetFramework Condition="'$(TargetFramework)' == 'wp'">wp8</TargetFramework>
<TargetFramework Condition="'$(TargetFramework)' == 'sl'">sl5</TargetFramework>
</PropertyGroup>

<!--
Split $(TargetFramework) into short identifier, version and profile list
Split 'TargetFramework' into short identifier, version and profile list
For Example:
net45 into 'net', '45'
net40-client into 'net', '40', '+client+'
Expand Down Expand Up @@ -47,7 +49,7 @@
</Choose>

<!-- Map short name to long name. See earlier comment for example of how to work with identifiers that are not recognized here -->
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == ''">
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '' AND '$(_ShortFrameworkIdentifier)' != ''">
<TargetFrameworkIdentifier Condition="'$(_ShortFrameworkIdentifier)' == 'net'">.NETFramework</TargetFrameworkIdentifier>
<TargetFrameworkIdentifier Condition="'$(_ShortFrameworkIdentifier)' == 'netstandard'">.NETStandard</TargetFrameworkIdentifier>
<TargetFrameworkIdentifier Condition="'$(_ShortFrameworkIdentifier)' == 'netcoreapp'">.NETCoreApp</TargetFrameworkIdentifier>
Expand Down
Loading