Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Avoid loading duplicate assemblies on template compilation #44

Merged
merged 1 commit into from May 23, 2012

Conversation

Projects
None yet
3 participants
Contributor

michaelnoonan commented Apr 10, 2012

Only load distinct assemblies based on FullName from the assemblies loaded into the current AppDomain to avoid loading multiple instances of same assemblies and causing the compiler to fail.

This occurs in our case after a report is generated with Crystal Reports and two instances of the crdb_adoplus.dll assembly are loaded into the AppDomain from two different folders, but they are essentially the same assembly (by FullName).

@michaelnoonan michaelnoonan Only load distinct assemblies based on FullName from the assemblies l…
…oaded into the current AppDomain to avoid loading multiple instances of same assemblies and causing the compiler to fail.
8054a92

I hit this problem with localized assemblies. It's strange as it's not a problem running in VS, but when I run it on my testserver it hits me. Maybe it's a problem with msbuild.

My error is: Unable to compile template. An assembly with the same simple name 'SBF.MailSender.resources, Version=1.0.0.0, Culture=sv-SE, PublicKeyToken=null has already been imported. Try removing one of the references or sign them to enable side-by-side.

Owner

Antaris commented May 23, 2012

I take it the root cause of your problem was that the same assembly was being included from multiple locations?

Yes, because of globalization. Have satellite assemblies in the
folders nb-NO and sv-SE under the bin folder.

Sent from my iPhone

On 23. mai 2012, at 08:52, Matthew Abbott
reply@reply.github.com
wrote:

I take it the root cause of your problem was that the same assembly was being included from multiple locations?


Reply to this email directly or view it on GitHub:
#44 (comment)

@Antaris Antaris closed this May 23, 2012

@Antaris Antaris reopened this May 23, 2012

@Antaris Antaris pushed a commit that referenced this pull request May 23, 2012

Matthew Abbott Merge pull request #44 from michaelnoonan/release-3.0
Avoid loading duplicate assemblies on template compilation
e4d763a

@Antaris Antaris merged commit e4d763a into Antaris:release-3.0 May 23, 2012

Contributor

michaelnoonan commented May 27, 2012

Yep, same for me, but with assemblies loaded dynamically by Crystal Reports.

On Wed, May 23, 2012 at 4:52 PM, Matthew Abbott <
reply@reply.github.com

wrote:

I take it the root cause of your problem was that the same assembly was
being included from multiple locations?


Reply to this email directly or view it on GitHub:
#44 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment