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

Compatibility with v6 #35

Merged
merged 8 commits into from
Sep 9, 2020
Merged

Compatibility with v6 #35

merged 8 commits into from
Sep 9, 2020

Conversation

alistairjevans
Copy link
Member

Library is no longer CLS Compliant.

@alistairjevans
Copy link
Member Author

Ugh; the drop of explicit net461 support meant I had to convert these projects to SDK-style to make the netstandard stuff work.

Copy link
Member

@tillig tillig left a comment

Choose a reason for hiding this comment

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

Sucks that you had to switch the projects around but in the long run it's easier to maintain, so... yay? ;)

<Description>Autofac MVC Integration</Description>
<!-- VersionPrefix patched by AppVeyor -->
<VersionPrefix>0.0.1</VersionPrefix>
<TargetFramework>net461</TargetFramework>
Copy link
Member

Choose a reason for hiding this comment

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

Should we stick with net461 or take the opportunity to go, like, net472?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure we need to? We don't really gain anything from it, because we'll need to support netstandard20 on Autofac as long as we want to support any of the .NET Framework versions, so all we'd be doing is punishing those people who sadly are stuck on net461.

Copy link
Member

Choose a reason for hiding this comment

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

Only reason I raised it was that weird thing where net461 is mostly but not totally netstandard2 compliant. Docs here.

While NuGet considers .NET Framework 4.6.1 as supporting .NET Standard 1.5 through 2.0, there are several issues with consuming .NET Standard libraries that were built for those versions from .NET Framework 4.6.1 projects. For .NET Framework projects that need to use such libraries, we recommend that you upgrade the project to target .NET Framework 4.7.2 or higher.

That is, this library is consuming a netstandard2 library and I'm afraid by leaving it net461 there's a potential for some weird transient failure to occur.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah; apparently I already had this discussion with myself in the Autofac PR, so let's make it net472.

src/Autofac.Integration.Mvc/Autofac.Integration.Mvc.csproj Outdated Show resolved Hide resolved
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/autofac/Autofac.Mvc</RepositoryUrl>
<GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
Copy link
Member

Choose a reason for hiding this comment

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

We don't have these in the AssemblyInfo.cs but we're also not generating them. Should we... generate them? I've always been a little confused over the mix of "put it in .csproj" and "put it in AssemblyInfo" we've had in some of these projects, and I think a lot of it stems from the old DNX pre-actual-.NET-Core days where not all of it actually worked.

Copy link
Member Author

@alistairjevans alistairjevans Sep 8, 2020

Choose a reason for hiding this comment

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

🤷‍♂️ - Not sure. Mostly lifted this from one of the other integration projects.

Copy link
Member Author

Choose a reason for hiding this comment

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

We don't generate those attributes in the Autofac project itself, so I guess we're ok to leave it?

Copy link
Member Author

Choose a reason for hiding this comment

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

The analyzers are giving we a warning about the neutral resource language one, so I guess that can go in.

Copy link
Member

Choose a reason for hiding this comment

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

We don't generate them in the Autofac project, but that's because they're in AssemblyInfo.cs. I think we should put the stuff in the .csproj and stop doing it in AssemblyInfo.cs. It's too confusing with the mix-and-match, as evidenced here.

@tillig tillig linked an issue Sep 8, 2020 that may be closed by this pull request
@alistairjevans
Copy link
Member Author

I think this is ready for the final review now. I'm going to raise something in Autofac to use csproj instead of AssemblyInfo.

Copy link
Member

@tillig tillig left a comment

Choose a reason for hiding this comment

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

🦅

@tillig tillig merged commit 70c77d1 into autofac:develop Sep 9, 2020
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.

Compatibility with Autofac v6
2 participants