Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Support using the Microsoft.NET.Sdk with dotnet/buildtools #2068

Merged
merged 1 commit into from
Jun 15, 2018

Conversation

eerhardt
Copy link
Member

  • Don't import Microsoft.$(Language).targets in buildtools - the SDK will do that.
  • Use the Sdk's GenerateAssemblyInfo target when possible

Still support non-SDK projects for backwards compatiblity.

Note: I removed support for @(AssemblyInfoSource) during GenerateAssemblyInfo because it is no longer used as of dotnet/corefx/pull/30400.

- Don't import Microsoft.$(Language).targets in buildtools - the SDK will do that.
- Use the Sdk's GenerateAssemblyInfo target when possible

Still support non-SDK projects for backwards compatiblity.

Note: I removed support for @(AssemblyInfoSource) during GenerateAssemblyInfo because it is no longer used as of dotnet/corefx/pull/30400.
@@ -123,7 +123,7 @@


<Import Project="$(CSharpTargetsFile)"
Condition="'$(TargetFrameworkIdentifier)' != '.NETPortable' and '$(MSBuildProjectExtension)' == '.csproj'" />
Condition="'$(TargetFrameworkIdentifier)' != '.NETPortable' and '$(MSBuildProjectExtension)' == '.csproj' and '$(UsingMicrosoftNETSdk)' != 'true'" />

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@@ -41,8 +41,7 @@
</PropertyGroup>

<Target Name="DecideIfWeNeedToIncludeDllSafeSearchPathAttribute"
Condition="'$(IsDotNetFrameworkProductAssembly)' == 'true' AND '$(IsTestProject)' != 'true'"
BeforeTargets="GenerateAssemblyInfo">
Condition="'$(IsDotNetFrameworkProductAssembly)' == 'true' AND '$(IsTestProject)' != 'true'">

This comment was marked as spam.

This comment was marked as spam.

Copy link
Member

@safern safern left a comment

Choose a reason for hiding this comment

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

LGTM.

@@ -104,14 +104,14 @@
Condition="'$(MSBuildProjectExtension)' == '.depproj'" />

<Import Project="IL.targets"
Condition="'$(MSBuildProjectExtension)' == '.ilproj' AND '$(SkipImportILTargets)'!='true'" />

This comment was marked as spam.

This comment was marked as spam.

in order to get all the version properties set correctly.
So overwrite these two properties here, so they are set correctly.
-->
<Company>Microsoft Corporation</Company>

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

DependsOnTargets="CreateVersionFileDuringBuild;DecideIfWeNeedToIncludeDllSafeSearchPathAttribute"
BeforeTargets="GetAssemblyAttributes">
<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyDefaultAliasAttribute">

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Copy link
Member

@weshaggard weshaggard left a comment

Choose a reason for hiding this comment

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

Just a few questions but overall looks reasonable.

@eerhardt eerhardt merged commit 5254ae0 into dotnet:master Jun 15, 2018
@eerhardt eerhardt deleted the SdkSupport branch June 15, 2018 21:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants