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

Multitargeting #317

Closed

Conversation

andrewheumann
Copy link
Member

@andrewheumann andrewheumann commented May 10, 2020

BACKGROUND:

  • Picking back up Multi targeting #276
  • In order to support the Grasshopper plug-in and other .NET Framework applications, Elements is expanded to target multiple frameworks

COMMENTS:

  • Though the intention is to target only netstandard2.0 and net472, the project targets involve a few additional frameworks / framework changes:
    Elements.csproj - netstandard2.0;net472;netcoreapp3.1;netcoreapp2.1
  • without netcoreapp3.1 targeted in elements.csproj, the test project would not build on mac
  • without netcoreapp2.1 targeted in elements.csproj, the test project would not build on windows.
    Elements.Tests.csproj - netcoreapp3.1
  • without this bump, I could not get the test project to build on mac.

Long story short, I tried every combination under the sun, and this is the only configuration that would build AND test on both mac and windows.

DESCRIPTION:

  • sets up Elements to target multiple frameworks
  • explicitly tells Elements.Tests which version of Elements to use
  • fixes one minor bug that was throwing a build error
  • updates travis configuration to use dotnet 3.1

TESTING:

  • Please do test this with your own build configuration to ensure it's compatible. If you have any errors at all, delete bin and obj from both the Elements and the Elements.Test project directories, and then rebuild.

FUTURE WORK:

  • Some functional changes are necessary to fold in the necessary changes to the .net framework build in order to get it to work with grasshopper
  • currently only the netstandard build is tested — getting tests that run for framework will require additional work.
  • travis builds are currently failing

This change is Reviewable

@andrewheumann andrewheumann marked this pull request as ready for review May 10, 2020 18:50
@andrewheumann andrewheumann requested a review from ikeough May 10, 2020 18:50
@ikeough
Copy link
Contributor

ikeough commented May 11, 2020

Here's one of the initial announcements about .net standard. dotnet/standard#481. Important to note is the section about test projects where they specify that you should enable automatic binding redirects on test projects to make .net standard work correctly.

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.

2 participants