<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<!-- Assembly and Namespace Configuration -->
<AssemblyName>Sbroenne.ExcelMcp.Core</AssemblyName>
<RootNamespace>Sbroenne.ExcelMcp.Core</RootNamespace>
<!-- Version Information -->
<Version>1.0.0</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<!-- Package Information -->
<PackageId>Sbroenne.ExcelMcp.Core</PackageId>
<Title>Sbroenne ExcelMcp Core Library</Title>
<Description>Core library for Excel automation operations via COM interop by Sbroenne. Provides high-level commands for Power Query, VBA, Data Model (Power Pivot), worksheets, ranges, tables, parameters, and connections. Shared by ExcelMcp.McpServer and ExcelMcp.CLI.</Description>
<PackageTags>excel;automation;com;powerquery;vba;datamodel;dax;pivot;core;mcp;sbroenne</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReleaseNotes>See https://github.com/sbroenne/mcp-server-excel/releases for release notes</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<!-- Package Validation -->
<EnablePackageValidation>true</EnablePackageValidation>
<!-- Documentation -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<!-- Release Build Optimizations -->
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<!-- Disable debug symbols in Release builds -->
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
<!-- Additional optimization flags -->
<Optimize>true</Optimize>
<TieredCompilation>true</TieredCompilation>
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
</PropertyGroup>
<!-- Remove XML docs and PDB files from Release output -->
<Target Name="RemoveDebugFilesFromRelease" AfterTargets="Build" Condition="'$(Configuration)' == 'Release'">
<ItemGroup>
<XmlDocsToDelete Include="$(OutputPath)**\*.xml" />
<PdbFilesToDelete Include="$(OutputPath)**\*.pdb" />
</ItemGroup>
<Delete Files="@(XmlDocsToDelete)" />
<Delete Files="@(PdbFilesToDelete)" />
</Target>
<ItemGroup>
<!-- Include README and LICENSE in package -->
<None Include="README.md" Pack="true" PackagePath="\" />
<None Include="..\..\LICENSE" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ExcelMcp.ComInterop\ExcelMcp.ComInterop.csproj" />
<!-- Source generator for ServiceRegistry -->
<ProjectReference Include="..\ExcelMcp.Generators\ExcelMcp.Generators.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false" />
</ItemGroup>
<!-- Emit generated source files for inspection -->
<PropertyGroup>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>$(BaseIntermediateOutputPath)\GeneratedFiles</CompilerGeneratedFilesOutputPath>
</PropertyGroup>
<ItemGroup>
<!-- Excel COM Interop PIA - EmbedInteropTypes=true embeds only used types at compile time,
eliminating the runtime dependency on office.dll (Microsoft.Office.Core) which is not
available to .NET Core's runtime loader even though it exists in the .NET Framework GAC.
COM type equivalence (GUID-based) ensures type identity works across assembly boundaries. -->
<PackageReference Include="Microsoft.Office.Interop.Excel">
<EmbedInteropTypes>true</EmbedInteropTypes>
<NoWarn>NU1701</NoWarn>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.ObjectPool" />
<!-- Required for generated CliSettings class (Spectre.Console.Cli.CommandSettings) -->
<PackageReference Include="Spectre.Console.Cli" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>