-
Notifications
You must be signed in to change notification settings - Fork 555
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
Open-XML-SDK.sln fails to build with dotnet after adding .NET 3.5 support #205
Comments
Good catch! I had to switch it to use msbuild in order to get .NET 3.5 support (see PR #185). I would expect limiting the TargetFramework would work. Another option is we could change it so locally it continues to only build for .NET 4.5 and .NET Standard, but we build for the other targets on the build server. I'll investigate |
I just tried with this command:
and it builds fine. Another option is to just build it with This probably isn't the best long term approach, so I'll keep the issue open until we close on what we should do so the widest developers can still build. |
also, the OpenXML power tools can just reference the pre-built version of it from NuGet (pretty sure it has been updated to do that). Is there a need to build it yourself? |
Nope, no need to build it, just no clear instruction (read: just want to use the darned thing) for me to follow to get the build to work. I tried running the PowerTools module and it crapped out with all sorts of failed dependencies on this project. So I am trying to get this project to build. I know git and VS, but don't have VS2017 (or the desire to install it). Figured the lightweight approach was better, then ran into all these issues starting with the Power Tools and now the Open XML Libraries. Within the VSCode/.NetCore toolchain, how does NuGet fit? Tried
Still fails as in my OP. I am trying to build on Windows 10. (In case that matters.) but I have 4.6...I think:
|
If all you need is to have a pre-built assembly, just grab it from NuGet: https://www.nuget.org/api/v2/package/DocumentFormat.OpenXml/2.7.1
NuGet is the package management solution the .NET ecosystem uses. As of VS2017 and the .NET CLI tooling, it is built into the tooling much more tightly. The |
Taylor, I really appreciate the assistance. But still fail to see how to connect the dots. I just reviewed the video on Open XML Tools for "Gitting, Building, and Installing Open-Xml-PowerTools" and found my comment from 3 months ago asking why it does not build in VS2013+Update 4 as he said it would. "If all you want to do is run in PowerShell you need to do the following." None of this is intuitive and assumes that Git, Slurp, Burp and dotnet, msbuild are all part of the readers every day life. So much of the "documentation" has comments like:
followed by three paragraphs of installation instructions that do not work. I am just offering to document it so it will actually build for a technical ITPro. After all, I use PowerShell and this is a PowerShell extension that appears to offer features to save me time...so far it is neither. I don't meant to sound at all ungrateful! I really appreciate this type of community project. I'd just like to help the next person who stumbles in here with zero project history expecting to get the bits working. |
OK,
There is a .Net35.sln, but since I don't have 3.5 installed I am not trying that. It seems that .Net Core has no idea how to find my .Net assemblies. Like there is a missing step in the "Getting Started with .Net Core". |
I'm not that familiar with the Open XML Power Tools and sorry that they're out of date. We've finally got the Open-XML-SDK up and running and have plans to update the Power Tools, but no one is working on this full time. I've updated things to work with the NuGet package better. Use this fork and branch of the power tools: https://github.com/twsouthwick/Open-Xml-PowerTools/tree/cleanup-sln Notice that the build steps are greatly simplified.
It looks like you don't have the targeting pack for .NET 4.6 installed. This will be required atm to build the power tools as well. |
Thanks again, I just installed the Developer Pack for 4.6.2 from here: https://www.microsoft.com/net/targeting. No Joy, screens full of read error messages telling me I am missing the real issue. I appreciate your help, but for now I have COM code that works, even though I want to shower after I am done with it. I'd be happy to be the guinea pig on any new steps to get a project up and running from bare metal. |
hmmm... the developer pack for 4.6.2 won't contain the .NET 4.6 targeting pack. You can change the target framework of the library to 4.6.2 and compile with that or compile with .NET 4.6 after installing the targeting pack. Can you share a screenshot of your errors? |
I will, but I am out of time for the next few days and have to find another solution. I'll get back on this thread when I am not under the gun. Thanks again for the help! |
Back at it...built a clean environment. Nothing is working, but it does build. |
Warning: Newbie Observation
I just want to use the PowerShell part of Open-XML-PowerTools. I am 5 hours into trying to get this code to build on a fresh install of VS Code and .Net Core. The brief build instructions are not enough to do the job. I'd be happy to write them up, but that would require success. If someone can assist me in getting the code to compile I'll repay the favor by writing it all into an updated "how to" for this project.
Right now I am stuck with:
I get the error: (I have tried to use TargetFramework=net46 but that fails with the same error.)
The text was updated successfully, but these errors were encountered: