11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4+ <!--
5+ The build task itself only needs to load inside MSBuild, so it targets
6+ the two MSBuild runtimes:
7+ - net472 : full-framework MSBuild (Visual Studio, msbuild.exe)
8+ - net8.0 : .NET SDK / "dotnet build" (Roslyn build server)
9+ This is independent of which target framework the *consumer* of the
10+ package compiles against — Mathtone.MIST (the attribute library)
11+ supports netstandard2.0, net472, and net6.0 through net10.0.
12+ -->
413 <TargetFrameworks >net472;net6.0;net8.0</TargetFrameworks >
514 <AssemblyName >Mathtone.MIST.Builder</AssemblyName >
615 <RootNamespace >Mathtone.MIST</RootNamespace >
1322 <PackageId >Mathtone.MIST.Builder</PackageId >
1423 <PackageVersion >2.0.0</PackageVersion >
1524 <Title >MIST Builder - IL Weaving Build Task</Title >
16- <Description >Build task for MIST IL weaving that implements INotifyPropertyChanged.</Description >
25+ <Description >Build task for MIST IL weaving that implements INotifyPropertyChanged. Supports both legacy MSBuild (net472) and the .NET SDK (.NET 6+). </Description >
1726 <Authors >Mathtone Industries</Authors >
1827 <PackageLicenseExpression >MIT</PackageLicenseExpression >
1928 <PackageProjectUrl >https://github.com/mathtone/MIST</PackageProjectUrl >
2029 <RepositoryUrl >https://github.com/mathtone/MIST</RepositoryUrl >
2130 <PackageTags >INotifyPropertyChanged;IL;Weaving;MVVM;WPF;PropertyChanged;Build;MSBuild</PackageTags >
2231 <DevelopmentDependency >true</DevelopmentDependency >
2332 <IncludeBuildOutput >false</IncludeBuildOutput >
33+ <SuppressDependenciesWhenPacking >true</SuppressDependenciesWhenPacking >
34+ <!-- NU5100: build task assemblies live under tasks/<tfm>/, not lib/, by design. -->
35+ <NoWarn >$(NoWarn);NU5100</NoWarn >
36+ <TargetsForTfmSpecificContentInPackage >$(TargetsForTfmSpecificContentInPackage);PackBuildTaskAssemblies</TargetsForTfmSpecificContentInPackage >
2437 </PropertyGroup >
2538
2639 <ItemGroup >
27- <PackageReference Include =" Microsoft.Build.Framework" Version =" 17.0.0" PrivateAssets =" all" />
28- <PackageReference Include =" Microsoft.Build.Utilities.Core" Version =" 17.0.0" PrivateAssets =" all" />
40+ <PackageReference Include =" Microsoft.Build.Framework" Version =" 17.0.0" PrivateAssets =" all" ExcludeAssets = " runtime " />
41+ <PackageReference Include =" Microsoft.Build.Utilities.Core" Version =" 17.0.0" PrivateAssets =" all" ExcludeAssets = " runtime " />
2942 <PackageReference Include =" Mono.Cecil" Version =" 0.11.4" PrivateAssets =" all" />
3043 </ItemGroup >
3144
4053 </EmbeddedResource >
4154 </ItemGroup >
4255
43- <!-- Package the build integration files -->
56+ <!--
57+ Pack the NuGet build integration files. The props/targets under build\ are
58+ imported automatically when a project (PackageReference) consumes this
59+ package. The same files under buildTransitive\ flow through transitive
60+ package references. This is the modern replacement for the old
61+ Install.ps1 / Uninstall.ps1 NuGet 2.x scripts.
62+ -->
4463 <ItemGroup >
4564 <None Include =" build\**" Pack =" true" PackagePath =" build\" />
4665 <None Include =" buildTransitive\**" Pack =" true" PackagePath =" buildTransitive\" />
4766 </ItemGroup >
4867
49- <!-- Include the build task assemblies in the package -->
50- <Target Name =" PackTaskDependencies" BeforeTargets =" GenerateNuspec" >
68+ <!--
69+ Pack the per-TFM task assemblies (and Mono.Cecil) under tasks\<tfm>\.
70+ The build/Mathtone.MIST.Builder.props file selects the right folder at
71+ build time based on $(MSBuildRuntimeType). This target is invoked once
72+ per inner-build (per TargetFramework) by NuGet.Build.Tasks.Pack via the
73+ TargetsForTfmSpecificContentInPackage extension point.
74+ -->
75+ <Target Name =" PackBuildTaskAssemblies" DependsOnTargets =" Build" >
5176 <ItemGroup >
52- <_PackageFiles Include =" $(OutputPath)$(AssemblyName).dll" >
53- <PackagePath >build\$(AssemblyName).dll</PackagePath >
54- <Visible >false</Visible >
55- <BuildAction >None</BuildAction >
56- </_PackageFiles >
57- <_PackageFiles Include =" $(OutputPath)$(AssemblyName).pdb" Condition =" Exists('$(OutputPath)$(AssemblyName).pdb')" >
58- <PackagePath >build\$(AssemblyName).pdb</PackagePath >
59- <Visible >false</Visible >
60- <BuildAction >None</BuildAction >
61- </_PackageFiles >
62- <_PackageFiles Include =" $(OutputPath)Mathtone.MIST.dll" >
63- <PackagePath >build\Mathtone.MIST.dll</PackagePath >
64- <Visible >false</Visible >
65- <BuildAction >None</BuildAction >
66- </_PackageFiles >
67- <_PackageFiles Include =" $(OutputPath)Mono.Cecil.dll" >
68- <PackagePath >build\Mono.Cecil.dll</PackagePath >
69- <Visible >false</Visible >
70- <BuildAction >None</BuildAction >
71- </_PackageFiles >
77+ <TfmSpecificPackageFile Include =" $(OutputPath)$(AssemblyName).dll" >
78+ <PackagePath >tasks\$(TargetFramework)\$(AssemblyName).dll</PackagePath >
79+ </TfmSpecificPackageFile >
80+ <TfmSpecificPackageFile Include =" $(OutputPath)$(AssemblyName).pdb" Condition =" Exists('$(OutputPath)$(AssemblyName).pdb')" >
81+ <PackagePath >tasks\$(TargetFramework)\$(AssemblyName).pdb</PackagePath >
82+ </TfmSpecificPackageFile >
83+ <TfmSpecificPackageFile Include =" $(OutputPath)Mathtone.MIST.dll" >
84+ <PackagePath >tasks\$(TargetFramework)\Mathtone.MIST.dll</PackagePath >
85+ </TfmSpecificPackageFile >
86+ <TfmSpecificPackageFile Include =" $(OutputPath)Mono.Cecil.dll" >
87+ <PackagePath >tasks\$(TargetFramework)\Mono.Cecil.dll</PackagePath >
88+ </TfmSpecificPackageFile >
89+ <TfmSpecificPackageFile Include =" $(OutputPath)Mono.Cecil.Pdb.dll" Condition =" Exists('$(OutputPath)Mono.Cecil.Pdb.dll')" >
90+ <PackagePath >tasks\$(TargetFramework)\Mono.Cecil.Pdb.dll</PackagePath >
91+ </TfmSpecificPackageFile >
92+ <TfmSpecificPackageFile Include =" $(OutputPath)Mono.Cecil.Mdb.dll" Condition =" Exists('$(OutputPath)Mono.Cecil.Mdb.dll')" >
93+ <PackagePath >tasks\$(TargetFramework)\Mono.Cecil.Mdb.dll</PackagePath >
94+ </TfmSpecificPackageFile >
95+ <TfmSpecificPackageFile Include =" $(OutputPath)Mono.Cecil.Rocks.dll" Condition =" Exists('$(OutputPath)Mono.Cecil.Rocks.dll')" >
96+ <PackagePath >tasks\$(TargetFramework)\Mono.Cecil.Rocks.dll</PackagePath >
97+ </TfmSpecificPackageFile >
7298 </ItemGroup >
7399 </Target >
74100
75- </Project >
101+ </Project >
0 commit comments