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

Add TargetNetStandard switch #11

Closed
wants to merge 3 commits into from

Conversation

Foxtrek64
Copy link
Contributor

As discussed in the Discord. Adds a new switch, <TargetNetStandard /> which accepts a value of true or false (default true), to allow optionally targeting netstandard2.1.

Use:

<Project Sdk="Remora.Sdk/1.0.0">
    <PropertyGroup>
        <VersionPrefix>1.0.0</VersionPrefix>
        <TargetNetStandard>false</TargetNetStandard>
    </PropertyGroup>

    <PropertyGroup>
        <LegalAuthor>John Doe</LegalAuthor>
        <LegalEmail>john@doe.org</LegalEmail>
    </PropertyGroup>
</Project>

This should also be settable in the solution's Directory.Build.props if one desires to configure this at that level.

Remora.Sdk/README.md Outdated Show resolved Hide resolved
Remora.Sdk/Sdk/Sdk.targets Outdated Show resolved Hide resolved
Remora.Sdk/Sdk/Sdk.targets Outdated Show resolved Hide resolved
Remora.Sdk/README.md Outdated Show resolved Hide resolved
@Foxtrek64
Copy link
Contributor Author

I think I got these fixed.

@Foxtrek64 Foxtrek64 requested a review from Nihlus December 31, 2023 19:47
| ExecutableFrameworks* | net7.0 | Yes |
| TargetFramework | | Yes |
| TargetFrameworks | (varies) | Yes |
| TargetNetStandard | true | Yes |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're missing an asterisk here to mark the property as a Remora extension.

@Nihlus
Copy link
Member

Nihlus commented Dec 31, 2023

Looks like something broke with your latest changes. Can you take a closer look at what's going on?

@Foxtrek64
Copy link
Contributor Author

Looks like something broke with your latest changes. Can you take a closer look at what's going on?

For some reason on build, the Project.AssemblyInfo.cs files for the test libraries end up with a duplicate [assembly: System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] line. I'm not sure where this is coming from or why it's being added. The files say they're "Generated by the MSBuild WriteCodeFragment class." Do you know what may be going on here?

@Nihlus
Copy link
Member

Nihlus commented Jan 1, 2024

Afraid not - the SDK does add that attribute in certain cases, and your best bet would be to either use a git bisect or combinations of the involved properties (old and new) to identify the exact failure case.

@Nihlus Nihlus closed this Mar 8, 2024
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