小编lex*_*x87的帖子

如何创建和使用符号服务器?

我创建了一个powershell脚本,在构建设置为release后,从drop位置获取所有pdb文件,并将它们复制到网络上共享的文件夹中.

我还创建了一个示例应用程序,并添加了包含我需要的程序集的nuget包(没有pdb文件).

我在网上找到了一些引用,但我无法使用pdb文件调试程序集.我正在使用VPN连接来连接到包含pdb文件和Visual Studio 2010的共享文件夹.

为了使用网络上共享的pdb文件能够调试我使用nuget包管理器获得的程序集,我需要做出哪些确切的步骤?

谢谢 !

c# tfs debug-symbols symbol-server

15
推荐指数
1
解决办法
5362
查看次数

在谈论每个规则时,StyleCop和Code Analysis之间的区别是什么?

你能否告诉我StyleCop和Code Analysis规则之间的区别是什么?它应该一起使用吗?

谢谢.

.net c# stylecop

9
推荐指数
3
解决办法
4318
查看次数

Autofac错误-从请求实例的范围中看不到标记匹配“ AutofacWebRequest”的范围

在我的一个Web应用程序中,我有一个使用Autofac的Web服务,其svc文件如下:

<%@ ServiceHost Language="C#" Debug="true" 
Service="MyApp.WebServices.Contracts.Interfaces.IMyWebService, MyApp.WebServices.Contracts" 
Factory="Autofac.Integration.Wcf.AutofacServiceHostFactory, Autofac.Integration.Wcf" %>
Run Code Online (Sandbox Code Playgroud)

我为我的Web服务应用程序注册依赖项,如下所示:

public class IocConfig
{        
    public static void RegisterDependencies()
    {
        var builder = new ContainerBuilder();            

        //web services
        builder.RegisterType<MyWebService>().As<IMyWebService>().InstancePerLifetimeScope();

        var container = builder.Build();

        AutofacHostFactory.Container = container;            
    }
}
Run Code Online (Sandbox Code Playgroud)

从另一个Web应用程序,我也想使用Autofac连接到那些服务,所以我注册了类似的依赖项:

public class IocConfig
{
    //Ioc dependencies for frontend application
    public static void RegisterDependencies()
    {
        var builder = new ContainerBuilder();

        builder.RegisterControllers(typeof(MvcApplication).Assembly);

        builder.RegisterModule<AutofacWebTypesModule>();

        builder
            .Register(c => new ChannelFactory<ISomeWebService>(
                new BasicHttpBinding(),
                new EndpointAddress("http://localhost/MyApp.WebServices/MyWebService.svc")))
            .InstancePerLifetimeScope();

        //register service proxies
        builder.Register(c => c.Resolve<ChannelFactory<IMyWebService>>().CreateChannel())
            .As<IMyWebService>()
            .UseWcfSafeRelease();

        var container = …
Run Code Online (Sandbox Code Playgroud)

asp.net-mvc wcf dependency-injection autofac autofactory

3
推荐指数
1
解决办法
1万
查看次数