c# - Adding Project as Reference results in Cannot load file or assembly or one of its dependencies -
i have solution in visual studio 2012 containing several projects. trying add project project reference able use them together, cannot figure out why adding project reference resulting in missing dll when deployed/ran (fusionlog below). have used method before without issue must missing here...
solution configuration:
main project: bootstrapper
sub project: bootstrappercustom
project trying add reference: licensecheck bootstrappercustom
missing dll when deployed: licensecheck.dll
[bootstrapper] --installer: configuration: n/a, platform: n/a --build: configuration: active (debug), platform: active (x86) --ref: ----[bootstrappercustom] [bootstrappercustom] --application: configuration: n/a, platform: n/a, target framework: .net 4.5, output type: class library --build: configuration: active (debug), platform: active (any cpu), platform target: cpu --ref: ----[bootstrappercore] (copy local: true) ----[licensecheck] (copy local: true) ----[microsoft.deployment.windowsinstaller] (copy local: true) ----[microsoft.practices.prism] (copy local: true) [licensecheck] --application: configuration: n/a, platform: n/a, target framework: .net 4.5, output type: class library --build: configuration: active (debug), platform: active (x86), platform target: cpu --ref: ----[microsoft.deployment.windowsinstaller] (copy local: true) ----[parse] (copy local: true) error message:
run bootstrapper.exe = `could not load file or assembly 'licensecheck, version=1.0.0.0, culture=neutral, publickeytoken=null' or 1 of dependencies. system cannot find file specified.` fusionlog (confirmed licensecheck.dll missing):
[%temp%\{x}\.ba1] --bootstrappercore.dll --bootstrappercustom.dll --microsoft.practices.prism.dll === pre-bind state information === log: user = notthor\dirt log: displayname = licensecheck, version=1.0.0.0, culture=neutral, publickeytoken=null (fully-specified) log: appbase = file:///c:/users/dirt/appdata/local/temp/{94ef2c32-a419-410e-a8a0-df404f022ff7}/.ba1/ log: initial privatepath = null calling assembly : bootstrappercustom, version=1.0.5028.16514, culture=neutral, publickeytoken=null. === log: bind starts in default load context. log: using application configuration file: c:\users\dirt\appdata\local\temp\{94ef2c32-a419-410e-a8a0-df404f022ff7}\.ba1\bootstrappercore.config log: using host configuration file: c:\users\dirt\appdata\local\temp\{94ef2c32-a419-410e-a8a0-df404f022ff7}\.ba1\bootstrappercore.config log: using machine configuration file c:\windows\microsoft.net\framework\v4.0.30319\config\machine.config. log: policy not being applied reference @ time (private, custom, partial, or location-based assembly bind). log: attempting download of new url file:///c:/users/dirt/appdata/local/temp/{94ef2c32-a419-410e-a8a0-df404f022ff7}/.ba1/licensecheck.dll. log: attempting download of new url file:///c:/users/dirt/appdata/local/temp/{94ef2c32-a419-410e-a8a0-df404f022ff7}/.ba1/licensecheck/licensecheck.dll. log: attempting download of new url file:///c:/users/dirt/appdata/local/temp/{94ef2c32-a419-410e-a8a0-df404f022ff7}/.ba1/licensecheck.exe. log: attempting download of new url file:///c:/users/dirt/appdata/local/temp/{94ef2c32-a419-410e-a8a0-df404f022ff7}/.ba1/licensecheck/licensecheck.exe. note: when rebuild bootstrappercustom project, do see licensecheck.dll being generated in bootstrapper\bin\debug.
did try see if project you're referencing uses licensecheck dll file, not reference it? (for example: referenced project might loading dll dynamically during initialization).
if case, can add build step copy dll output folder (see copying files application folder @ compile time example)
Comments
Post a Comment