Skip to content

Commit ea3a563

Browse files
committed
Move the NuGet package build files into a TFM specific directory. (dotnet#370)
When installing Microsoft.ML on an unsupported framework (like net452), it is currently getting installed successfully. However, users should be getting an error stating that net452 is not supported by this package. The cause is the build files exist for any TFM, which NuGet interprets as this package supports any TFM. Moving the build files to be consistent with the 'lib' folder support. Fix dotnet#357
1 parent 2e486c2 commit ea3a563

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

Microsoft.ML.sln

+10
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Maml", "src\Mi
106106
EndProject
107107
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Console", "src\Microsoft.ML.Console\Microsoft.ML.Console.csproj", "{362A98CF-FBF7-4EBB-A11B-990BBF845B15}"
108108
EndProject
109+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{487213C9-E8A9-4F94-85D7-28A05DBBFE3A}"
110+
EndProject
111+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "netstandard2.0", "netstandard2.0", "{9252A8EB-ABFB-440C-AB4D-1D562753CE0F}"
112+
ProjectSection(SolutionItems) = preProject
113+
pkg\Microsoft.ML\build\netstandard2.0\Microsoft.ML.props = pkg\Microsoft.ML\build\netstandard2.0\Microsoft.ML.props
114+
pkg\Microsoft.ML\build\netstandard2.0\Microsoft.ML.targets = pkg\Microsoft.ML\build\netstandard2.0\Microsoft.ML.targets
115+
EndProjectSection
116+
EndProject
109117
Global
110118
GlobalSection(SolutionConfigurationPlatforms) = preSolution
111119
Debug|Any CPU = Debug|Any CPU
@@ -243,6 +251,8 @@ Global
243251
{7A9DB75F-2CA5-4184-9EF5-1F17EB39483F} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
244252
{64F40A0D-D4C2-4AA7-8470-E9CC437827E4} = {09EADF06-BE25-4228-AB53-95AE3E15B530}
245253
{362A98CF-FBF7-4EBB-A11B-990BBF845B15} = {09EADF06-BE25-4228-AB53-95AE3E15B530}
254+
{487213C9-E8A9-4F94-85D7-28A05DBBFE3A} = {DEC8F776-49F7-4D87-836C-FE4DC057D08C}
255+
{9252A8EB-ABFB-440C-AB4D-1D562753CE0F} = {487213C9-E8A9-4F94-85D7-28A05DBBFE3A}
246256
EndGlobalSection
247257
GlobalSection(ExtensibilityGlobals) = postSolution
248258
SolutionGuid = {41165AF1-35BB-4832-A189-73060F82B01D}

pkg/Microsoft.ML/build/Microsoft.ML.props renamed to pkg/Microsoft.ML/build/netstandard2.0/Microsoft.ML.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<ItemGroup Condition="Exists('packages.config') OR
88
Exists('$(MSBuildProjectName).packages.config') OR
99
Exists('packages.$(MSBuildProjectName).config')">
10-
<Content Include="$(MSBuildThisFileDirectory)\..\runtimes\win-x64\native\*.dll"
10+
<Content Include="$(MSBuildThisFileDirectory)\..\..\runtimes\win-x64\native\*.dll"
1111
Condition="'$(PlatformTarget)' == 'x64'">
1212
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1313
<Visible>false</Visible>

0 commit comments

Comments
 (0)