DocumentFormat.OpenXml 2.5 in .NET 3.5.1 gives warnings

I decided to use .NET 3.5.1 , but when I add DocumentFormat.OpenXml 2.5 through the NuGet package console with Install-Package DocumentFormat.OpenXml, I get a lot of warnings:

1> C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Microsoft.Common.targets (1605.5): warning MSB3258: Main link "DocumentFormat.OpenXml, Version = 2.5.5631.0, Culture = Neutral, PublicKeyToken = 123, processorArchitecture = MSIL "cannot be resolved because it has an indirect dependency on the .NET Framework assembly" System.Data.SqlXml, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 123 ", which has a higher version of" 4.0 .0.0 "than the version" 2.0.0.0 "in the current target structure.

1> C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Microsoft.Common.targets (1605.5): warning MSB3258: Main link "DocumentFormat.OpenXml, Version = 2.5.5631.0, Culture = Neutral, PublicKeyToken = 123, processorArchitecture = MSIL "cannot be resolved because it has an indirect dependency on the .NET Framework assembly" System.Security, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 123 ", which has a higher version" 4.0.0.0 "than version" 2.0.0.0 "in the current target structure.

1> C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Microsoft.Common.targets (1605.5): warning MSB3268: Main link "DocumentFormat.OpenXml, Version = 2.5.5631.0, Culture = neutral, PublicKeyToken = 123, processorArchitecture = MSIL "cannot be resolved because it has an indirect dependency on the assembly structure" System.Xaml, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 123 ", which could not be resolved within the target framework. ".NETFramework, Version = v3.5." To fix this problem, delete the link "DocumentFormat.OpenXml, Version = 2.5.5631.0, Culture = Neutral, PublicKeyToken = 123, processorArchitecture = MSIL" or migrate the application to the version of the framework that contains "System.Xaml, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089 ".

1> C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Microsoft.Common.targets (1605.5): warning MSB3258: Main link "DocumentFormat.OpenXml, Version = 2.5.5631.0, Culture = Neutral, PublicKeyToken = 123, processorArchitecture = MSIL "cannot be resolved because it has an indirect dependency on the .NET Framework assembly" Availability, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 123 ", which has a higher version of" 4.0.0.0 ", than version "2.0.0.0" in the current target structure.

1> C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Microsoft.Common.targets (1605.5): warning MSB3268: Main link "DocumentFormat.OpenXml, Version = 2.5.5631.0, Culture = neutral, PublicKeyToken = 123, processorArchitecture = MSIL "cannot be resolved because it has an indirect dependence on the assembly structure" System.Numerics, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 123 ", which could not be resolved within the target framework. ".NETFramework, Version = v3.5." To fix this problem, delete the link "DocumentFormat.OpenXml, Version = 2.5.5631.0, Culture = Neutral, PublicKeyToken = 123, processorArchitecture = MSIL" or migrate the application to the framework version that contains "System.Numerics, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 123 ".

DocumentFormat.OpenXml 2.5 seems to need or use .Net 4 .

Should I worry about these warnings [and stick to .net 4.5 where I don't get these warnings?)

I want to avoid .net 4.5 as they need administrator rights to install.

+4
source share
2 answers

The Microsoft XML .NET Framework version 4.0 SDK is required on the Open XML SDK 2.5 download page for Microsoft Office . >.

If you want to use the Microsoft .NET Framework version 3.5 SP1, you can use the Open XML SDK 2.0 .

+7
source

Add the following DLL to the bin project folder - DocumentFormat.OpenXml.dll (version 2)

+1
source

Source: https://habr.com/ru/post/1497941/


All Articles