AutoMapper.Attributes icon indicating copy to clipboard operation
AutoMapper.Attributes copied to clipboard

.NET Core 2 Compatibility

Open csharperperson opened this issue 7 years ago • 4 comments

Trying to use this with a .NET Core 2 project, however, the examples do not work. I'm currently working on a solution, but figured i'd put this on here to see if you have any insight while I work on it.

csharperperson avatar Oct 31 '17 17:10 csharperperson

From working, it seems it's a case of updating the .NET Standard version from 1.3 to 2.0 to allow compatibility with .NET Core 2.0 applications

csharperperson avatar Oct 31 '17 20:10 csharperperson

I got everything working on .NET Standard 2.0. Going to close this out.

csharperperson avatar Nov 01 '17 12:11 csharperperson

This along with your pull request are a bit curious to me. .NET Standard 2.0 is backward-compatible with 1.3 (the version I publish), so you should be able to use AutoMapper.Attributes "out of the box" in your .NET Core 2.0 project.

Further proof: Jimmy Bogard publishes AutoMapper with .NET Standard 1.3, .NET Standard 1.1, and .NET Framework 4.5 versions - not any with .NET Standard 2.0.

I'd like to understand more of your pain points around attempting to use this with .NET Core 2.0. Can you send a sample project that attempts to use the AutoMapper.Attributes Nuget package?

schneidenbach avatar Nov 02 '17 20:11 schneidenbach

So the issues I had was that I made a basic .NET Core 2 console application and I used the sample code, but only the first example would work. When you would try to map specific properties or stop the mapping from happening, it wouldn't have the intended effect. Essentially if you just create a .NET Core 2 console app, then try and run the examples, only the first one will work.

csharperperson avatar Nov 02 '17 21:11 csharperperson