Skip to content
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

Display error message to user if project is using NuGet PackageReference #264

Conversation

augustoproiete
Copy link
Member

@augustoproiete augustoproiete commented Oct 25, 2019

We've been receiving an increasing number of support requests from users that create projects that use the PackageReference style, which is not compatible with Excel-DNA as of this writing (#138).

This PR detects if the Excel-DNA add-in project is using the PackageReference style and displays an error message during build, with instructions on how to resolve the issue:

Excel-DNA is not compatible with projects that use NuGet PackageReference. Make sure you create a .NET Framework (Class Library) project and configure Visual Studio to use packages.config

image

The error message above is displayed just before compilation starts, when:

  • The user created a Class Library (.NET Standard) project (a.k.a. SDK-style project)
  • The user created a Class Library (.NET Framework) project, but uses the PackageReference style instead of packages.config

Related links:

@govert
Copy link
Member

govert commented Oct 25, 2019

This is great - thanks @augustoproiete

Would you like to have a discussion on how we can support .NET Standard projects?

@govert govert merged commit c5476e6 into Excel-DNA:master Oct 25, 2019
@augustoproiete augustoproiete deleted the display-error-when-using-nuget-packagereference branch October 25, 2019 15:53
@augustoproiete
Copy link
Member Author

@govert Sure, I've sent you an e-mail.

@augustoproiete augustoproiete added this to the 1.1 milestone Jun 18, 2020
@y2kbugger
Copy link

I've been using PackageReference successfully until this check was added. It worked without any tweaks to build scripts and I was able to build my solution directly from command line after cloning via git

@govert
Copy link
Member

govert commented Aug 12, 2020

@y2kbugger In the updated package version 1.1.1, @augustoproiete added an extra flag in the .targets file to support this scenario, so that you don't have to fiddle with any of the package scripts. See PR and discussion #327 . Let us know whether you get that to work right.

@y2kbugger
Copy link

y2kbugger commented Aug 13, 2020 via email

@y2kbugger
Copy link

y2kbugger commented Aug 13, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants