Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DocumentFormat.OpenXml.Linq project #1000

Merged
merged 4 commits into from
Aug 27, 2021
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
14 changes: 14 additions & 0 deletions Open-XML-SDK.sln
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IsolatedStorageExceptionWor
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SunburstChartExample", "samples\SunburstChartExample\SunburstChartExample.csproj", "{5034C012-FED8-4DE5-B422-C1E4DF9EDBF2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DocumentFormat.OpenXml.Linq", "src\DocumentFormat.OpenXml.Linq\DocumentFormat.OpenXml.Linq.csproj", "{8DB6A050-4584-4210-8DE1-CB299A08EA4F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DocumentFormat.OpenXml.CodeGeneration.Linq", "src\DocumentFormat.OpenXml.CodeGeneration.Linq\DocumentFormat.OpenXml.CodeGeneration.Linq.csproj", "{4E3D124A-B027-46C3-B962-6F01B9B03AB8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -81,6 +85,14 @@ Global
{5034C012-FED8-4DE5-B422-C1E4DF9EDBF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5034C012-FED8-4DE5-B422-C1E4DF9EDBF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5034C012-FED8-4DE5-B422-C1E4DF9EDBF2}.Release|Any CPU.Build.0 = Release|Any CPU
{8DB6A050-4584-4210-8DE1-CB299A08EA4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8DB6A050-4584-4210-8DE1-CB299A08EA4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8DB6A050-4584-4210-8DE1-CB299A08EA4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8DB6A050-4584-4210-8DE1-CB299A08EA4F}.Release|Any CPU.Build.0 = Release|Any CPU
{4E3D124A-B027-46C3-B962-6F01B9B03AB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E3D124A-B027-46C3-B962-6F01B9B03AB8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E3D124A-B027-46C3-B962-6F01B9B03AB8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E3D124A-B027-46C3-B962-6F01B9B03AB8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -94,6 +106,8 @@ Global
{65D509D0-46DC-4883-AEB3-FF7E521B1E9F} = {0782A132-968D-4BDD-911A-2C3074EAF886}
{F38D119D-A5B7-4027-83B1-804432922E55} = {7DAF7304-40CC-4180-88A5-9A89DD13C565}
{5034C012-FED8-4DE5-B422-C1E4DF9EDBF2} = {7DAF7304-40CC-4180-88A5-9A89DD13C565}
{8DB6A050-4584-4210-8DE1-CB299A08EA4F} = {A4DF60EB-3AA5-48F0-B4D2-3F94B8E62F03}
{4E3D124A-B027-46C3-B962-6F01B9B03AB8} = {A4DF60EB-3AA5-48F0-B4D2-3F94B8E62F03}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6F476383-E917-43D1-A1E5-9A61A47DA3F5}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<!--
This is a code generator and would not need multiple targets. However, due to the build matrix on
the CI system, there are times when this project will need to be built supporting a .NET 3.5 target.

To simplify this, only builds targeting .NET 5.0 will actually have any code and on other targets
will be a no-op.
-->
<TargetFrameworks>$(SamplesFrameworks)</TargetFrameworks>
<OutputType>Exe</OutputType>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);3003</NoWarn>
</PropertyGroup>

<Choose>
<When Condition=" '$(TargetFramework)' == 'net5.0'">
<ItemGroup>
<ProjectReference Include="..\DocumentFormat.OpenXml\DocumentFormat.OpenXml.csproj" />
<PackageReference Include="System.CodeDom" Version="5.0.0" />
<Compile Remove="Program.Empty.cs" />
</ItemGroup>
</When>

<Otherwise>
<ItemGroup>
<Compile Remove="Program.cs" />
</ItemGroup>
</Otherwise>
</Choose>

<!-- Elements required for Analyzer / C# Source Generator -->
<!--<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>8.0</LangVersion>
</PropertyGroup>-->

<!--<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.10.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.2" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
--><!-- Generator dependencies --><!--
<PackageReference Include="System.CodeDom" Version="5.0.0" GeneratePathProperty="true" PrivateAssets="all" />
</ItemGroup>

<PropertyGroup>
<GetTargetPathDependsOn>$(GetTargetPathDependsOn);GetDependencyTargets</GetTargetPathDependsOn>
</PropertyGroup>

<Target Name="GetDependencyTargets">
<ItemGroup>
<TargetPathWithTargetPlatformMoniker Include="$(ProjectDir)..\..\bin\$(Configuration)\DocumentFormat.OpenXml.Analyzer\netstandard2.0\DocumentFormat.OpenXml.Analyzer.dll" IncludeRuntimeDependency="false" />
<TargetPathWithTargetPlatformMoniker Include="$(PKGSystem_CodeDom)\lib\netstandard2.0\System.CodeDom.dll" IncludeRuntimeDependency="false" />
</ItemGroup>
</Target>-->
</Project>
15 changes: 15 additions & 0 deletions src/DocumentFormat.OpenXml.CodeGeneration.Linq/Program.Empty.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;

namespace DocumentFormat.OpenXml.CodeGeneration.Linq
{
internal class Program
{
private static void Main()
{
Console.WriteLine("Tool only available on .NET 5.0 builds");
}
}
}
Loading