-
Notifications
You must be signed in to change notification settings - Fork 547
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
can't compile DocumentFormat.OpenXml after cloning :/ #1514
Comments
Can you describe what you did? Did you use the dotnet command or did you use VS/VS Code/Rider? What is your The build generally requires a fairly new version of VS and the .NET toolchain, but for how far you got, it looks like you have a sufficient version. |
I used VS2022. 5.0.203 [C:\Program Files\dotnet\sdk] I had to add *_g.cs files manually. and then i could be able to compile it. but now the problem is that i cannot publish my software. when i copy DocumentFormat.OpenXml.dll and DocumentFormat.OpenXml.Framework.dll files with the executable it is not generating the documents. I also copied Newtonsoft.Json.dll and System.IO.Packaging.dll and still didnt work. I haven even converted these 4 projects to net6.0-windows x64 and now i can compile but generated excel and word files does not show anything. What dlls should i deliver to that it works with .net6 x64? I cant event find these Newtonsoft.Json.dll and System.IO.Packaging.dll as 64 bit assembly. |
I'm not sure I understand the scenario here. Are you trying to publish your own build of it? We generally recommend the nuget packages as the way to use the SDK. I'll try to answer some of your points below, but it would be helpful to understand why you are building the SDK locally.
We only support building the OpenXML SDK with the .NET SDK that we define in global.json, which we generally keep to the latest released tool chain. You will not be able to build with a .NET 6 toolchain
Need more details for this
Which projects are referring to here? The SDK supports windows targets without any special effort; i.e. there is no need to change the TFMs.
That's because they are not native binaries - they are IL, not any specific architecture |
@hannes7g I haven't heard a response, so I'll consider it solved. If you hit additional issues when trying to clone the project, please reopen the issue. |
Describe the bug
After cloning from github on a clean system, i cannot compile DocumentFormat.OpenXml project.
To Reproduce
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Schema\InkML\Ink.cs(28,26,28,39): error CS0246: The type or namespace name 'CustomXmlPart' could not be found (are you missing a using directive or an assembly reference?)
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Schema\AdditionalCharacteristics\AdditionalCharacteristicsInfo.cs(35,26,35,39): error CS0246: The type or namespace name 'CustomXmlPart' could not be found (are you missing a using directive or an assembly reference?)
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Schema\Bibliography\Sources.cs(37,26,37,39): error CS0246: The type or namespace name 'CustomXmlPart' could not be found (are you missing a using directive or an assembly reference?)
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Schema\InkML\Ink.cs(37,26,37,39): error CS0246: The type or namespace name 'CustomXmlPart' could not be found (are you missing a using directive or an assembly reference?)
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Schema\AdditionalCharacteristics\AdditionalCharacteristicsInfo.cs(17,48,17,61): error CS0246: The type or namespace name 'CustomXmlPart' could not be found (are you missing a using directive or an assembly reference?)
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Schema\Bibliography\Sources.cs(19,26,19,39): error CS0246: The type or namespace name 'CustomXmlPart' could not be found (are you missing a using directive or an assembly reference?)
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Schema\InkML\Ink.cs(19,22,19,35): error CS0246: The type or namespace name 'CustomXmlPart' could not be found (are you missing a using directive or an assembly reference?)
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Packaging\Model3DReferenceRelationshipPart.cs(12,41,12,59): error CS0115: 'Model3DReferenceRelationshipPart.IsValidContentType(IPackagePart)': no suitable method found to override
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Packaging\MailMergeRecipientDataPart.cs(17,60,17,79): error CS0115: 'MailMergeRecipientDataPart.InternalRootElement': no suitable method found to override
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Packaging\MailMergeRecipientDataPart.cs(24,51,24,66): error CS0115: 'MailMergeRecipientDataPart.PartRootElement': no suitable method found to override
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Schema\Wordprocessing\ConditionalFormatStyle.cs(31,41,31,65): error CS0115: 'ConditionalFormatStyle.StrictTranslateAttribute(in OpenXmlQualifiedName, string?)': no suitable method found to override
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Schema\Wordprocessing\Document.cs(11,41,11,65): error CS0115: 'Document.StrictTranslateAttribute(in OpenXmlQualifiedName, string?)': no suitable method found to override
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Packaging\OpenXmlSupportedRelationshipExtensions.cs(56,19,56,46): error CS0246: The type or namespace name 'AlternativeFormatImportPart' could not be found (are you missing a using directive or an assembly reference?)
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Schema\Wordprocessing\Indentation.cs(23,41,23,65): error CS0115: 'Indentation.StrictTranslateAttribute(in OpenXmlQualifiedName, string?)': no suitable method found to override
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Packaging\OpenXmlSupportedRelationshipExtensions.cs(67,19,67,46): error CS0246: The type or namespace name 'AlternativeFormatImportPart' could not be found (are you missing a using directive or an assembly reference?)
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Schema\Wordprocessing\Justification.cs(21,41,21,65): error CS0115: 'Justification.StrictTranslateAttribute(in OpenXmlQualifiedName, string?)': no suitable method found to override
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Packaging\OpenXmlSupportedRelationshipExtensions.cs(78,19,78,37): error CS0246: The type or namespace name 'CustomPropertyPart' could not be found (are you missing a using directive or an assembly reference?)
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Packaging\OpenXmlSupportedRelationshipExtensions.cs(89,19,89,37): error CS0246: The type or namespace name 'CustomPropertyPart' could not be found (are you missing a using directive or an assembly reference?)
..\Open-XML-SDK\src\DocumentFormat.OpenXml\Schema\Wordprocessing\StylePaneSortMethods.cs(30,41,30,65): error CS0115: 'StylePaneSortMethods.StrictTranslateAttribute(in OpenXmlQualifiedName, string?)': no suitable method found to ove
....
...
..
Expected behavior
Repositories should be buildable by default without having to check google, stackoverflow etc.. I dont see anywhere any info related to this in README files.
I would appreciate if someone can tell me how i should generate these files. There are some file under "Open-XML-SDK\generated" but they are not references fromthe project. Do i have to copy paste these folder to "Open-XML-SDK\src\DocumentFormat.OpenXml" folder somehow?
Thanks
The text was updated successfully, but these errors were encountered: