我無法在安裝過程中排除一些裝配。在Windsor Castle登記之前如何排除裝配
我試試這個:
public class InternationnalisationInstaller : IWindsorInstaller
{
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store)
{
string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)
var filter = new AssemblyFilter(path)
.FilterByAssembly(a => !a.IsDynamic
&& !a.FullName.Contains("Microsoft"));
container.Register(Classes.FromAssemblyInDirectory(filter)
.BasedOn<ITraductionProvider>()
.WithService.AllInterfaces());
}
}
在開發中沒有問題,但在生產中:
不可能去充電器樂fichier OU L'集「Microsoft.VisualStudio.Shell.Immutable.10.0,版本= 10.0.0.0,文化=中立,PublicKeyToken = b03f5f7f11d50a3a'ou une de sesdépendances。 Le fichierspécifiéest introuvable。 àSystem.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly組件,ObjectHandleOnStack retTypes) àSystem.Reflection.RuntimeAssembly.GetExportedTypes() àCastle.Core.Internal.ReflectionUtil.GetAvailableTypes(大會組件,布爾includeNonExported) àCastle.Core .Internal.ReflectionUtil.GetAvailableTypesOrdered(Assembly assembly,Boolean includeNonExported) àCastle.MicroKernel.Registration.FromAssemblyDescriptor.b__0(Assembly a) àSystem.Linq.Enumerable.d__14 2.MoveNext() àCastle.MicroKernel.Registration。 FromDescriptor.Castle.MicroKernel.Registration.IRegistration.Register(IKernelInternal kernel) àCastle.MicroKernel.Registration.BasedOnDescriptor.Castle.MicroKernel.Registration.IRegistration.Register(IKerne lInternal內核) àCastle.MicroKernel.DefaultKernel.Register(IRegistration []註冊) àCastle.Windsor.WindsorContainer.Register(IRegistration []註冊) àInternationnalisation.InternationnalisationInstaller.Install(IWindsorContainer容器,IConfigurationStore存儲)
該程序集用於標記VSIX註冊的類。 你能幫我嗎? 謝謝
如果需要,也許只是不排除它? – Jester
你能把錯誤信息翻譯成英文嗎? –
Sriram:FileNotFoundException – Dekey