Skip to content

Commit

Permalink
Wire up source generator to build setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio0694 committed Nov 5, 2023
1 parent 7abe0e9 commit 99b885c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/dnne-pkg/dnne-pkg.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
Expand Down Expand Up @@ -37,6 +37,9 @@

<!-- Reference the project to trigger build -->
<ItemGroup>
<ProjectReference Include="../dnne-analyzers/dnne-analyzers.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="../dnne-gen/dnne-gen.csproj">
<Properties>TargetFramework=$(TargetFramework)</Properties>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
Expand Down Expand Up @@ -66,6 +69,7 @@
<ItemGroup>
<BuildFiles Include="../msbuild/DNNE.props" />
<BuildFiles Include="../msbuild/DNNE.targets" />
<BuildFiles Include="../dnne-analyzers/DNNE.Analyzers.targets" />
<NetStandard21Task Include="../msbuild/DNNE.BuildTasks/bin/$(Configuration)/netstandard2.1/*" />
<Net472Task Include="../msbuild/DNNE.BuildTasks/bin/$(Configuration)/net472/*" />
<DnneGenFiles Include="../dnne-gen/bin/$(Configuration)/$(TargetFramework)/dnne-gen.dll;../dnne-gen/bin/$(Configuration)/$(TargetFramework)/dnne-gen.runtimeconfig.json" />
Expand All @@ -76,6 +80,13 @@
<Copy SourceFiles="@(Net472Task)" DestinationFolder="$(Net472Dest)" />
<Copy SourceFiles="@(DnneGenFiles)" DestinationFolder="$(ToolsDest)" />
<Copy SourceFiles="@(PlatformFiles)" DestinationFolder="$(PlatformDest)" />

<!-- Pack the source generator from its output directory (source generators always use .NET Standard 2.0) -->
<None
Include="../dnne-analyzers/bin/$(Configuration)/netstandard2.0/dnne-analyzers.dll"
PackagePath="analyzers/dotnet/cs"
Pack="true"
Visible="false" />

<!-- Define the NuPkg content -->
<ItemGroup>
Expand Down

0 comments on commit 99b885c

Please sign in to comment.