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
Mapper.Initialize with null or NOOP throws odd exception #476
Comments
Get this issue in unit test project no matter how many profiles I pass in. Loading the profiles via Assembly.FromFile... |
What's the exception? On Mon, Mar 10, 2014 at 1:06 PM, subtlekiller notifications@github.comwrote:
|
Exception: 'System.TypeInitializationException' This type is not supported on this platform IDictionaryFactory using .NET 4.5.1 Both automapper and .Net4 assemblies are included in the test project as well as the dlls that contain profiles. |
There were a few bugs around this fixed in 3.1, and some in the 3.2 On Mon, Mar 10, 2014 at 4:19 PM, subtlekiller notifications@github.comwrote:
|
I will try, but I will only be allowed to use an official release. |
It appears that Net4 is not getting copied to my unit test output folder even though AutoMapper is... |
Those are to be expected. Try only "uncaught exceptions". This is the only I understand you can only use approved, released versions, but is it On Tue, Mar 11, 2014 at 11:28 AM, subtlekiller notifications@github.comwrote:
|
I resolved this by adding [DeploymentItem("AutoMapper.Net4.dll")] to my unit test. Sorry for the trouble. |
So 3.2 is supposed to fix this, by marking the .Net4.dll as a content item On Tue, Mar 11, 2014 at 11:37 AM, subtlekiller notifications@github.comwrote:
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Using version 3.0.0.
Following code blows a gasket:
When passing an empty profiles list OR passing null to Mapper.Initialize, AutoMapper gives:
at AutoMapper.TypeMapFactory..ctor()
at AutoMapper.Mapper.<.cctor>b__0() in c:\tfs\Raton\Dev\2014\ThirdParty\AutoMapper-3.0.0\src\AutoMapper\Mapper.cs:line 14
at AutoMapper.Internal.LazyFactory.LazyImpl
1.get_Value() in c:\tfs\Raton\Dev\2014\ThirdParty\AutoMapper-3.0.0\src\AutoMapper\Internal\IDictionary.cs:line 124 at AutoMapper.Mapper.get_ConfigurationProvider() in c:\tfs\Raton\Dev\2014\ThirdParty\AutoMapper-3.0.0\src\AutoMapper\Mapper.cs:line 453 at AutoMapper.Mapper.get_Configuration() in c:\tfs\Raton\Dev\2014\ThirdParty\AutoMapper-3.0.0\src\AutoMapper\Mapper.cs:line 446 at AutoMapper.Mapper.Initialize(Action
1 action) in c:\tfs\Raton\Dev\2014\ThirdParty\AutoMapper-3.0.0\src\AutoMapper\Mapper.cs:line 232at Baxter.Raton.BITS.Presentation.WindowsService.AutoMapperInitializer.Initialize(String assemblySearchString) in c:\tfs\Raton\Dev\2014\Raton\BITS\Source\Presentation\WindowsService\AutoMapperInitializer.cs:line 53
at Baxter.Raton.BITS.Presentation.WindowsService.Test.WindowsServiceTests.AutoMapperInitNoProfilesSuccessful() in c:\tfs\Raton\Dev\2014\Raton\BITS\Test\WindowsService\WindowsServiceTests.cs:line 347
The text was updated successfully, but these errors were encountered: