Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
28 changes: 14 additions & 14 deletions eng/Version.Details.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ This file should be imported by eng/Versions.props
-->
<Project>
<PropertyGroup>
<!-- dotnet/runtime dependencies -->
<!-- dotnet-arcade dependencies -->
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26153.3</MicrosoftDotNetArcadeSdkPackageVersion>
<MicrosoftDotNetXUnitExtensionsPackageVersion>10.0.0-beta.26153.3</MicrosoftDotNetXUnitExtensionsPackageVersion>
<!-- dotnet-roslyn dependencies -->
<MicrosoftNetCompilersToolsetPackageVersion>5.6.0-2.26151.2</MicrosoftNetCompilersToolsetPackageVersion>
<!-- dotnet-runtime dependencies -->
<SystemCodeDomPackageVersion>10.0.2</SystemCodeDomPackageVersion>
<SystemCollectionsImmutablePackageVersion>10.0.2</SystemCollectionsImmutablePackageVersion>
<SystemConfigurationConfigurationManagerPackageVersion>10.0.2</SystemConfigurationConfigurationManagerPackageVersion>
Expand All @@ -23,17 +28,17 @@ This file should be imported by eng/Versions.props
<SystemTextJsonPackageVersion>10.0.2</SystemTextJsonPackageVersion>
<SystemThreadingChannelsPackageVersion>10.0.2</SystemThreadingChannelsPackageVersion>
<SystemThreadingTasksDataflowPackageVersion>10.0.2</SystemThreadingTasksDataflowPackageVersion>
<!-- dotnet/arcade dependencies -->
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26153.3</MicrosoftDotNetArcadeSdkPackageVersion>
<MicrosoftDotNetXUnitExtensionsPackageVersion>10.0.0-beta.26153.3</MicrosoftDotNetXUnitExtensionsPackageVersion>
<!-- nuget/nuget.client dependencies -->
<!-- nuget-nuget.client dependencies -->
<NuGetBuildTasksPackageVersion>7.5.0-rc.36</NuGetBuildTasksPackageVersion>
<!-- dotnet/roslyn dependencies -->
<MicrosoftNetCompilersToolsetPackageVersion>5.6.0-2.26151.2</MicrosoftNetCompilersToolsetPackageVersion>
</PropertyGroup>
<!--Property group for alternate package version names-->
<PropertyGroup>
<!-- dotnet/runtime dependencies -->
<!-- dotnet-arcade dependencies -->
<MicrosoftDotNetArcadeSdkVersion>$(MicrosoftDotNetArcadeSdkPackageVersion)</MicrosoftDotNetArcadeSdkVersion>
<MicrosoftDotNetXUnitExtensionsVersion>$(MicrosoftDotNetXUnitExtensionsPackageVersion)</MicrosoftDotNetXUnitExtensionsVersion>
<!-- dotnet-roslyn dependencies -->
<MicrosoftNetCompilersToolsetVersion>$(MicrosoftNetCompilersToolsetPackageVersion)</MicrosoftNetCompilersToolsetVersion>
<!-- dotnet-runtime dependencies -->
<SystemCodeDomVersion>$(SystemCodeDomPackageVersion)</SystemCodeDomVersion>
<SystemCollectionsImmutableVersion>$(SystemCollectionsImmutablePackageVersion)</SystemCollectionsImmutableVersion>
<SystemConfigurationConfigurationManagerVersion>$(SystemConfigurationConfigurationManagerPackageVersion)</SystemConfigurationConfigurationManagerVersion>
Expand All @@ -51,12 +56,7 @@ This file should be imported by eng/Versions.props
<SystemTextJsonVersion>$(SystemTextJsonPackageVersion)</SystemTextJsonVersion>
<SystemThreadingChannelsVersion>$(SystemThreadingChannelsPackageVersion)</SystemThreadingChannelsVersion>
<SystemThreadingTasksDataflowVersion>$(SystemThreadingTasksDataflowPackageVersion)</SystemThreadingTasksDataflowVersion>
<!-- dotnet/arcade dependencies -->
<MicrosoftDotNetArcadeSdkVersion>$(MicrosoftDotNetArcadeSdkPackageVersion)</MicrosoftDotNetArcadeSdkVersion>
<MicrosoftDotNetXUnitExtensionsVersion>$(MicrosoftDotNetXUnitExtensionsPackageVersion)</MicrosoftDotNetXUnitExtensionsVersion>
<!-- nuget/nuget.client dependencies -->
<!-- nuget-nuget.client dependencies -->
<NuGetBuildTasksVersion>$(NuGetBuildTasksPackageVersion)</NuGetBuildTasksVersion>
<!-- dotnet/roslyn dependencies -->
<MicrosoftNetCompilersToolsetVersion>$(MicrosoftNetCompilersToolsetPackageVersion)</MicrosoftNetCompilersToolsetVersion>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<Source Uri="https://github.com/dotnet/dotnet" Mapping="msbuild" Sha="4c0aa722933ea491006247bbc0a484fa3c28cd14" BarId="302348" />
<Source Uri="https://github.com/dotnet/dotnet" Mapping="msbuild" Sha="5121846aac455d48f990a10e569c90e3ab1e359a" BarId="305296" />
<ProductDependencies>
<!-- Necessary for source-build. This allows the live version of the package to be used by source-build. -->
<Dependency Name="System.CodeDom" Version="10.0.2">
Expand Down
22 changes: 15 additions & 7 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -118,29 +118,37 @@
</ItemGroup>
</Target>

<!-- This target creates a type library for the assemblies in a package. It requires desktop msbuild to locate the tooling
Type libraries are still needed by Visual Studio in some cases, like the legacy C# project system.
It calls into msbuild via COM, and needs the type library to do so. -->
<Target Name="CreateTypeLib" BeforeTargets="AfterBuild" Inputs="$(TargetPath)" Outputs="$(TargetDir)$(TargetName).tlb;$(TargetDir)x64\$(TargetName).tlb" Condition="'$(BuildingInsideVisualStudio)' != 'true' and '$(CreateTlb)' == 'true' and $([MSBuild]::IsOSPlatform('windows')) and '$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(MSBuildRuntimeType)' != 'Core'">
<!-- This target creates type libraries (.tlb) for COM interop scenarios.
The .tlb is shipped in both Visual Studio and the .NET SDK (Windows only).
Runs against the net472 build output using tlbexp.exe from the .NET Framework SDK. -->
<Target Name="CreateTypeLib" BeforeTargets="AfterBuild" Inputs="$(TargetPath)" Outputs="$(TargetDir)$(TargetName).tlb"
Condition="'$(BuildingInsideVisualStudio)' != 'true' and '$(CreateTlb)' == 'true' and $([MSBuild]::IsOSPlatform('windows')) and '$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PropertyGroup>
<!-- Resolve tlbexp.exe from the .NET Framework SDK via registry, with a hardcoded fallback -->
<_NetFxToolsDir>$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\NETFXSDK\4.8\WinSDK-NetFx40Tools', 'InstallationFolder', null, RegistryView.Registry32))</_NetFxToolsDir>
<_NetFxToolsDir Condition="'$(_NetFxToolsDir)' == ''">$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\</_NetFxToolsDir>
<TlbExpPath>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToDotNetFrameworkSdkFile('tlbexp.exe'))</TlbExpPath>
<!-- Provide a mechanism for turning on verbose TlbExp output for diagnosing issues -->
<TlbExpPath Condition="'$(TlbExpPath)' == ''">$(_NetFxToolsDir)TlbExp.exe</TlbExpPath>
<TlbExpVerbosity Condition="'$(VerboseTlbExp)' == 'true'">/verbose</TlbExpVerbosity>
<TlbExpVerbosity Condition="'$(VerboseTlbExp)' != 'true'">/silent</TlbExpVerbosity>
</PropertyGroup>

<ItemGroup>
<!-- Assembly probe paths for tlbexp dependency resolution.
TargetDir has the built assembly; TargetFrameworkDirectory has .NET Framework BCL (System.dll etc.) -->
<_TlbExpAssemblyPaths Include="$(TargetDir);$(TargetFrameworkDirectory)" />
<_TlbExpAssemblyPaths>
<SlashlessPath>$([System.String]::Copy('%(Identity)').TrimEnd('\'))</SlashlessPath>
</_TlbExpAssemblyPaths>
<TlbExpAssemblyPaths Include="@(_TlbExpAssemblyPaths->'%(SlashlessPath)')" />
</ItemGroup>

<Error Condition=" '$(TlbExpPath)' == '' "
Text="TlbExp was not found. Ensure that you have installed everything from .vsconfig. If you have, please report a bug to MSBuild." />
<Error Condition="!Exists('$(TlbExpPath)')"
Text="TlbExp was not found at '$(TlbExpPath)'. Ensure the .NET Framework SDK tools are installed." />

<!-- Generate x86 type library -->
<Exec Command="&quot;$(TlbExpPath)&quot; $(TlbExpVerbosity) /NOLOGO @(TlbExpAssemblyPaths->'/asmpath:&quot;%(Identity)&quot;', ' ') &quot;$(TargetPath)&quot; /out:&quot;$(TargetDir)$(TargetName).tlb&quot;" />
<!-- Generate x64 type library -->
<Exec Command="&quot;$(TlbExpPath)&quot; $(TlbExpVerbosity) /NOLOGO @(TlbExpAssemblyPaths->'/asmpath:&quot;%(Identity)&quot;', ' ') &quot;$(TargetPath)&quot; /out:&quot;$(TargetDir)x64\$(TargetName).tlb&quot; /win64" />
</Target>

Expand Down
15 changes: 12 additions & 3 deletions src/Framework/Microsoft.Build.Framework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<TargetFrameworks>$(LibraryTargetFrameworks)</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateReferenceAssemblySource>true</GenerateReferenceAssemblySource>
<!-- Do not create Tlbs when building in .NET product mode. The packages are not shipped to VS,
only their contents redisted within the SDK. -->
<CreateTlb Condition="'$(DotNetBuild)' != 'true'">true</CreateTlb>
<!-- Do not create Tlbs when building in source-build mode (no net472 TFM available).
In VMR Windows builds and VS builds, generate the .tlb from the net472 output. -->
<CreateTlb Condition="'$(DotNetBuildSourceOnly)' != 'true' and $([MSBuild]::IsOSPlatform('windows'))">true</CreateTlb>
<IsPackable>true</IsPackable>
<PackageDescription>This package contains the $(MSBuildProjectName) assembly which is a common assembly used by other MSBuild assemblies.</PackageDescription>
<IncludeSatelliteOutputInPack>false</IncludeSatelliteOutputInPack>
Expand All @@ -16,6 +16,15 @@
<GenerateResxSourceEmitFormatMethods>true</GenerateResxSourceEmitFormatMethods>
</PropertyGroup>

<!-- The .tlb is generated by CreateTypeLib target during the net472 build.
Place it under tools/ in the NuGet package so it doesn't appear as a library reference. -->
<Target Name="IncludeTlbInPackage" BeforeTargets="_GetPackageFiles" Condition="'$(CreateTlb)' == 'true'">
<ItemGroup>
<_PackageFiles Include="$(ArtifactsBinDir)Microsoft.Build.Framework\$(Configuration)\net472\Microsoft.Build.Framework.tlb"
PackagePath="tools/net472" />
</ItemGroup>
</Target>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Contracts" PrivateAssets="all" />

Expand Down
Loading