OfficeDev / Open-Xml-PowerTools

MIT License
691 stars 26 forks source link

Unable to run / find / build Powershell Module #252

Closed DaveyRance closed 5 years ago

DaveyRance commented 6 years ago

Good morning i have been struggling with trying to get the powershell module working for the last day or so.

If i follow the instructions from https://www.youtube.com/watch?v=60w-yPDSQD0 i am able to clone the open-xml-sdk and open-xml-powertools no issues to my powershell\modules folder. Compile the sdk no issues but on checking the powertools folder there is no powershell module. Checking the branch i noticed that the branch is vNext and it seems that the powershell modules are not in that branch.

So then change the open-xml-powertools to master and now i have the module. (Execution policy is set to remote signed)

Import-module open-xml-powertools gives a whole screen of red where the basics are that the paths are incorrect. Example below

Add-Type : Cannot bind parameter 'Path' to the target. Exception setting "Path": "Cannot find path 'C:\Users\Davey\Documents\Open-Xml-Sdk\DocumentFormat.OpenXml\bin\debug\DocumentFormat.OpenXml.dll' because it does not exist." At C:\Users\Davey\Documents\WindowsPowerShell\Modules\open-xml-powertools\AddTypes.ps1:68 char:16

Next i tried to compile the master branch of open-xml-powertools thinking that if i ignored the documentation that said just import the module and instead try to build it i got a whole bunch of errors like this. Severity Code Description Project File Line Suppression State Error CS0246 The type or namespace name 'DocumentFormat' could not be found (are you missing a using directive or an assembly reference?) OpenXmlPowerTools C:\Users\Davey\Documents\WindowsPowerShell\Modules\Open-Xml-PowerTools\OpenXmlPowerTools\ChartUpdater.cs 7 Active

So is it that the master branch needs to have something updated or am i missing a step for the vNext.

Thanks

yasmus commented 5 years ago

i have the same problem.

tomjebo commented 5 years ago

Closing all issues as this repo is being archived and will no longer be maintained by Microsoft. The project is licensed for continued use and development by forking to your own repo.