Entity Framework Core 2.2 and beyond: what's cooking?

Want to create great .NET class libraries? Confused about .NET Standard, .NET Core, and .NET Framework? Watch this talk to learn how you can easily support multiple platforms with .NET Standard and no compromises, thanks to via multi-targeting. We'll also cover the other aspects, such as versioning, strong naming, and binding redirects.
What about slides?
1. Any alternative or best practice to using the preprocessor directives (eg. #if NET461, #if WINDOWS_UWP)? Looks like it can get smelly (open closed principle and web analogy would be "if IE version X")
2. What is the recommended approach to unit testing a .NET Standard library? (eg. separate test project per target framework or preprocessor directives)
What about slides?
I believe we'll add them here. Until then, you can grab them from here.
1. Any alternative or best practice to using the preprocessor directives (eg. #if NET461, #if WINDOWS_UWP)? Looks like it can get smelly (open closed principle and web analogy would be "if IE version X")
As few as possible would be my advice. You can also configure your MSBuild project to selectively include files on a naming convention. That's what Xamarin Essentials are doing.
2. What is the recommended approach to unit testing a .NET Standard library? (eg. separate test project per target framework or preprocessor directives)
Right now, I'd recommend separate projects and a Shared Project to centralize the source code for the tests.
For me personally, this was the best dotnetconf talk. Great stuff.
On the strong naming, your advice makes sense but seems to be a departure from historical recommendation? Given that strong naming isn't a security thing and the recommendation you're giving is to check-in both the public and private keys, what's the recommendation about using a password on the private key? Is there a reason to? If not, wouldn't it make sense for the project templates to just set this up as the default?
I've been personally using https://github.com/kzu/GitInfo to integrate git information
What's the recommendation about using a password on the private key? Is there a reason to?
I wouldn't bother. Just check it in as-is.
If not, wouldn't it make sense for the project templates to just set this up as the default?
We discussed this, but it seemed over the top for general libraries. It's the same as with NuGet packages. It makes sense for libraries you ship publicly, but not all libraries will be released to the general public, so it seems like overkill for the template.
Great video!, do you have any news on multi-target support for vs4mac?
do you have any news on multi-target support for vs4mac?
Visual Studio for Mac can load multi-targeting projects, but build and intellisense currently use only the first target framework. As a workaround, if you use `msbuild` in the terminal to build the solution, it will build all the frameworks.
To track progress you call follow the issues on this GitHub board: https://github.com/mono/monodevelop/projects/1
@Andrii: You can find the slides here:
https://github.com/dotnet-presentations/dotnetconf2018/tree/master/Technical/Decks
Hat tip : Beth Massi
Hi,
Is there a way to make resx files work in a multi-target library where one of the targets is UAP? The problem I'm having is the generated designer file works for every other platform, but does not compile for the UAP assembly.
If I manually create a library that only targets UAP and include a resx file, it generates a file that works as it contains a using for System.Reflection and a call to GetTypeInfo in addition to the code for other platforms. I need the multi-target library to generate that version just for the UAP target.
I've tried including the resx file separately in each platform inside the csproj file, and using a different file name for the generated file in the UAP version, then specifically excluding the file generated for the other platforms. This doesn't generate a compile error for the file generated for the other platforms, but it seems then the UAP version doesn't get a generated file at all so resources are not accessible the same way as for the other platforms.
Advice appreciated.
Thanks.
Hi,
We are in the situation where we have multiple PCL libraries that we would like to move to .NET Standard 2.0. These libraries are then used in net461 WPF application. We did a test migration and it seems that it works. Could you sum it up what challenges we may expect when using .NET Standard 2.0 + .NET Framework 4.6.1? As this is hot topic, maybe you could add it to the netstandard FAQ?