Open-XML-SDK: Cannot open projects with VS 2015

Not sure whether everybody has already upgraded to VS 2017, given that it has only been released very recently. Anyhow, the recent commit entitled “Update projects to VS 2017” (dbaddb57) changed the .csproj files so that those projects can no longer be opened with VS 2015.

Using DocumentFormat.OpenXml.csproj as an example, here is the error message I get (with [...] meaning I omitted that part of the path):

[...]\Open-XML-SDK\DocumentFormat.OpenXml\DocumentFormat.OpenXml.csproj : error  : The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.  [...]\Open-XML-SDK\DocumentFormat.OpenXml\DocumentFormat.OpenXml.csproj

I get the same error message for the other two projects contained in the solution.

Did you mean to only support VS 2017 going forward (which could be fine)? Otherwise, we need another solution referencing VS 2015 compatible .csproj files.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 19 (8 by maintainers)

Commits related to this issue

Most upvoted comments

To run the project in Visual Studio 2015 please revert to a commit in which Visual Studio 2015 was used.

If you are not sure then run the following command on git command line.

Navigate to git master branch

git checkout master
  1. Please ensure that you backup current directory to another location before executing the following step.
  2. You have closed your visual studio completely so that there are no file access errors.

You can see history of commits by the following line

git log --oneline --graph --decorate

image

In this case are reverting to commit id 3f36da8

git reset --hard 3f36da8 && git clean -f -d

Now try opening the solution in Visual Studio 2015 and it should work!