0

My Mac has a virtual machine where Windows and Visual Studio is installed. However, running the virtual machine + Visual Studio is sometimes slow, so I am trying to use Visual Studio Code in Mac OS.

One thing I don't get is how to reference Open XML SDK in VS Code.

This video shows how to add Open XML SDK in Visual Studio. This idea is to download the code, and then compile them to generate 2 .dll, and browse to these 2 .dll to add:

enter image description here

Whereas, I don't see where to add references in VS Code.

Does anyone know this?

Additionally, is it possible to compile the downloaded folder (which contains .sln) directly in VS Code rather than Visual Studio?

PS: this thread modifies dependencies in project.json, and uses dnu restore to download the dependencies. But the problem is that dnu restore would not find my local Open XML SDK...

Community
  • 1
  • 1
SoftTimur
  • 5,630
  • 38
  • 140
  • 292

1 Answers1

0

You would add a dependency in your project.json file to DocumentFormat.OpenXml, then do a restore.

Mark Burgress
  • 169
  • 1
  • 4
  • Is it possible to specify local path in `project.json`? Because `DocumentFormat.OpenXml.dll` is local... – SoftTimur Sep 18 '16 at 22:02
  • I you really need to use your own version of the DLL then you will have to compile it and then generate your own NuGet package. You can then create a NuGet.config file that specifies a location on your local machine. – Mark Burgress Sep 19 '16 at 13:19
  • Thanks for that... Additionally, is it possible to compile the downloaded folder (which contains `.sln`) directly in VS Code rather than Visual Studio? – SoftTimur Sep 19 '16 at 14:43
  • Yes, but you will need to create a project.json file – Mark Burgress Sep 20 '16 at 11:28