I have a Web Application Project that separates my "Host" into a Sub DLL for re-use purposes.
Web Application Project -> Host (Configure, IdenityServer3, Controllers etc).
The Host Project is using IdentityServer3.EntityFramework, which relies on AutoMapper. I recently upgraded to IdentityServer3.EntityFramework.2.4.2 and of course AutoMapper 4.2.1.
My Web Application Project does not include the nuget packages from the above 2.
When I compile with Visual Studio, the AutoMapper.dll gets put into the bin directory. However, when we check-in to TFS and use msbuild to target the WebApplication, then AutoMapper does not get included in the bin directory.
I have 2 choices.
1) Add a reference in my WebApplication to AutoMapper.
2) In my Host Project, add a line of code like this.
AutoMapper.IMapper _doNotRemoveHack; // MSBuild is not pulling Automapper.dll
I do not want to add a reference, cause that makes no sense when that Project doesn't need it. I also hate the hack as well, but I took option 2 and that resolved my issue.
This is an issue / difference with VS and MSBuild; however I wanted to let you know about this.
I have a Web Application Project that separates my "Host" into a Sub DLL for re-use purposes.
Web Application Project -> Host (Configure, IdenityServer3, Controllers etc).
The Host Project is using IdentityServer3.EntityFramework, which relies on AutoMapper. I recently upgraded to IdentityServer3.EntityFramework.2.4.2 and of course AutoMapper 4.2.1.
My Web Application Project does not include the nuget packages from the above 2.
When I compile with Visual Studio, the AutoMapper.dll gets put into the bin directory. However, when we check-in to TFS and use msbuild to target the WebApplication, then AutoMapper does not get included in the bin directory.
I have 2 choices.
1) Add a reference in my WebApplication to AutoMapper. 2) In my Host Project, add a line of code like this.
AutoMapper.IMapper _doNotRemoveHack; // MSBuild is not pulling Automapper.dll
I do not want to add a reference, cause that makes no sense when that Project doesn't need it. I also hate the hack as well, but I took option 2 and that resolved my issue.
This is an issue / difference with VS and MSBuild; however I wanted to let you know about this.
I didn't have this issue until I upgraded.