我无法在安装过程中排除某些程序集。
我试试这个:
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());
}
}
在开发中没有问题,但在生产中:
不可能充电器le fichier ou l'assembly'Microsoft.VisualStudio.Shell.Immutable.10.0,Version = 10.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a'ou une desesdépendances。 Lefichierspécifiéestintrouvable。 àSystem.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly程序集,ObjectHandleOnStack retTypes) àSystem.Reflection.RuntimeAssembly.GetExportedTypes() àCastleCore.Internal.ReflectionUtil.GetAvailableTypes(Assembly assembly,Boolean includeNonExported) àCastleCore.Internal.ReflectionUtil.GetAvailableTypesOrdered(Assembly assembly,Boolean includeNonExported) àCastle.MicroKernel.Registration.FromAssemblyDescriptor.b__0(汇编a) àSystem.Linq.Enumerable.d__142.MoveNext() àCastle.MicroKernel.Registration.FromDescriptor.Castle.MicroKernel.Registration.IRegistration.Register(IKernelInternal kernel) àCastle.MicroKernel.Registration.BasedOnDescriptor.Castle.MicroKernel.Registration.IRegistration.Register(IKernelInternal kernel) àCastle.MicroKernel.DefaultKernel.Register(IRegistration [] registrations) àCastle.Windsor.WindsorContainer.Register(IRegistration [] registrations) àInternationnalisation.InternationnalisationInstaller.Install(IWindsorContainer容器,IConfigurationStore商店)
此程序集用于标记VSIX注册的类。 你能帮助我吗 ? 感谢