After Adding Postsharp Diagnostics Logging to ASP.NET WebForms App it does not produce ANY output

info's Avatar

info

19 Sep, 2018 12:56 PM

Hi!

We have a rather big solution in ASP.NET WebForms v. 4.5.1 and we want to use Diagnostics Logging with it.
I followed the suggested way of doing things, but there are multiple suggestions with poststarp.config file or <projectname>.psproj.
Neither of those solutions did get our ASP.NET Project to do logging with Postsharp.

If I use Postsharp explorer it tells me there are not "Aspects" in the project.

I have created a blank ASP.NET Solution and tried it with that. This works fine.

Any suggestions how I can find out why it is not working?

Thanks
  Andreas Kroll

  1. Support Staff 1 Posted by PostSharp Techn... on 19 Sep, 2018 01:18 PM

    PostSharp Technologies's Avatar

    Hello,

    Let's first try to make the logging work in one of the projects of the solution. Please select one of your projects and provide us the following information:

    • Which PostSharp NuGet packages are installed in the project?
    • Which logging back-end do you intend to use (NLog, Log4Net, etc.)?
    • How did you apply the [Log] attribute in the project: in the source file, postsharp.config file or .psproj? Please provide an example.
    • Is PostSharp logging configured at the start-up using LoggingServices API?
    • Is logging back-end configured? Please validate the enabled log levels in the back-end and in the PostSharp configuration.

    Best regards,
    -alex

  2. 2 Posted by info on 19 Sep, 2018 09:28 PM

    info's Avatar

    I did get it to work after starting again from scratch.

    Now I have a new problem:

    Logging works fine without a postsharp.config.
    As soon as I include a postsharp.config to be able to configure what is included in the logging, I get those errors:

    ```
    Severity Code Description Project File Line Suppression State
    Warning Cannot resolve the source code location of Expedia.Mice.Core.Helper.AssetsHelper.get_MinifiedScripts:
    System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser..ctor(Lexer lexer, CSharpSyntaxNode oldTree, IEnumerable`1 changes, LexerMode lexerMode, CancellationToken cancellationToken)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseInterpolation(String text, Interpolation interpolation, Boolean isVerbatim)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseInterpolatedStringToken()
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseTerm(Precedence precedence)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseSubExpressionCore(Precedence precedence)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseSubExpression(Precedence precedence)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseVariableInitializer()
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseVariableDeclarator(TypeSyntax parentType, VariableFlags flags, Boolean isFirst, Boolean allowLocalFunctions, SyntaxList`1 mods, LocalFunctionStatementSyntax& localFunction, Boolean isExpressionContext)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseVariableDeclarators(TypeSyntax type, VariableFlags flags, SeparatedSyntaxListBuilder`1 variables, Boolean variableDeclarationsExpected, Boolean allowLocalFunctions, SyntaxList`1 mods, LocalFunctionStatementSyntax& localFunction)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseLocalDeclaration(SeparatedSyntaxListBuilder`1 variables, Boolean allowLocalFunctions, SyntaxList`1 mods, TypeSyntax& type, LocalFunctionStatementSyntax& localFunction)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseLocalDeclarationStatement()
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParsePossibleDeclarationOrBadAwaitStatement(ResetPoint& resetPointBeforeStatement)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParsePossibleDeclarationOrBadAwaitStatement()
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseStatementCore()
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseStatements(CSharpSyntaxNode& previousNode, SyntaxListBuilder`1 statements, Boolean stopOnSwitchSections)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseBlock(Boolean isMethodBody, Boolean isAccessorBody)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseStatementNoDeclaration(Boolean allowAnyExpression)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseStatementCore()
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseEmbeddedStatement()
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseIfStatement()
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseStatementNoDeclaration(Boolean allowAnyExpression)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseStatementCore()
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseStatements(CSharpSyntaxNode& previousNode, SyntaxListBuilder`1 statements, Boolean stopOnSwitchSections)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseBlock(Boolean isMethodBody, Boolean isAccessorBody)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseBlockAndExpressionBodiesWithSemicolon(BlockSyntax& blockBody, ArrowExpressionClauseSyntax& expressionBody, SyntaxToken& semicolon, Boolean parseSemicolonAfterBlock, MessageID requestedExpressionBodyFeature)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseMethodDeclaration(SyntaxListBuilder`1 attributes, SyntaxListBuilder modifiers, TypeSyntax type, ExplicitInterfaceSpecifierSyntax explicitInterfaceOpt, SyntaxToken identifier, TypeParameterListSyntax typeParameterList)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseMemberDeclarationOrStatement(SyntaxKind parentKind)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseClassOrStructOrInterfaceDeclaration(SyntaxListBuilder`1 attributes, SyntaxListBuilder modifiers)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseTypeDeclaration(SyntaxListBuilder`1 attributes, SyntaxListBuilder modifiers)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseMemberDeclarationOrStatement(SyntaxKind parentKind)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseNamespaceBody(SyntaxToken& openBrace, NamespaceBodyBuilder& body, SyntaxListBuilder& initialBadNodes, SyntaxKind parentKind)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseNamespaceDeclaration()
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseNamespaceBody(SyntaxToken& openBrace, NamespaceBodyBuilder& body, SyntaxListBuilder& initialBadNodes, SyntaxKind parentKind)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseCompilationUnitCore()
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseWithStackGuard[TNode](Func`1 parseFunc, Func`1 createEmptyNodeFunc)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser.ParseCompilationUnit()
       at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.ParseText(SourceText text, CSharpParseOptions options, String path, CancellationToken cancellationToken)
       at ^FIkyLEEJqx\.J.^Vc+rW5zZ(Project _0, String _1, String _2) in ^Av0ERcpSLfOw:line 28
       at ^6QAfwjAsttgE.^vOBk(ISourceDocument _0) in ^Bik0/ycPkZv6:line 70
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^9Hq0hBTZ.^X9J5UdRB() in ^J3cjooUPlMK1:line 219
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^Y/39OD/q(ITaggable _0, Func`1 _1) in ^J3cjooUPlMK1:line 401
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(^4DoSQWutVd\+3 _0, MethodDefDeclaration _1) in ^J3cjooUPlMK1:line 206
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(^4DoSQWutVd\+3 _0, MetadataDeclaration _1) in ^J3cjooUPlMK1:line 172
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(MetadataDeclaration _0) in ^J3cjooUPlMK1:line 160
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(Object _0) in ^J3cjooUPlMK1:line 83
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.GetMessageLocation(Object codeElement) in ^J3cjooUPlMK1:line 37. Expedia.Mice

    Error Error during exception reporting: Exception of type 'System.OutOfMemoryException' was thrown. Expedia.Mice
    Error System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
       at System.Diagnostics.NtProcessInfoHelper.GetProcessInfos(IntPtr dataPtr, Predicate`1 processIdFilter)
       at System.Diagnostics.NtProcessInfoHelper.GetProcessInfos(Predicate`1 processIdFilter)
       at System.Diagnostics.ProcessManager.GetProcessInfo(Int32 processId, String machineName)
       at System.Diagnostics.Process.EnsureState(State state)
       at System.Diagnostics.Process.get_ProcessName()
       at PostSharp.Sdk.User.ExceptionPackager.ReportException(Exception e, IExceptionAdapter exceptionAdapter) in D:\src\PostSharp-5\Core\PostSharp.Settings\User\ExceptionPackager.cs:line 188
       at PostSharp.Hosting.ExceptionPackagerHelper.ReportException(Exception e) in D:\src\PostSharp-5\Core\PostSharp.Hosting\ExceptionPackagerHelper.cs:line 54
       at PostSharp.Hosting.PostSharpObject.OnUnhandledException(Exception e) in D:\src\PostSharp-5\Core\PostSharp.Hosting\PostSharpObject.cs:line 324
       at PostSharp.Hosting.PostSharpObject.InvokeProject(ProjectInvocation projectInvocation) in D:\src\PostSharp-5\Core\PostSharp.Hosting\PostSharpObject.cs:line 303
       at PostSharp.Hosting.Program.ExecuteImpl() in D:\src\PostSharp-5\Core\PostSharp.Hosting\Program.cs:line 851 Expedia.Mice

    Error error: Unhandled exception (postsharp-x86-srv.exe 6.0.27 release | .NET Framework 4.7.2): Exception of type 'System.OutOfMemoryException' was thrown. See below for details. Expedia.Mice
    Warning Cannot resolve the source code location of Expedia.Mice.Core.Helper.AssetsHelper.MinifiedAsset(System.Boolean): System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
       at System.Collections.Immutable.ImmutableArray.Create[T](T item)
       at Microsoft.CodeAnalysis.CSharp.MergedTypeDeclaration.get_NameLocations()
       at Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol.get_Locations()
       at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredMember(NamespaceOrTypeSymbol container, TextSpan declarationSpan, String name)
       at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredNamedType(CSharpSyntaxNode declarationSyntax, String name)
       at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredType(BaseTypeDeclarationSyntax declarationSyntax)
       at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredNamespaceOrType(CSharpSyntaxNode declarationSyntax)
       at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredTypeMemberContainer(CSharpSyntaxNode memberDeclaration)
       at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredMemberSymbol(CSharpSyntaxNode declarationSyntax)
       at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredSymbol(MemberDeclarationSyntax declarationSyntax, CancellationToken cancellationToken)
       at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetMethodParameterSymbol(ParameterSyntax parameter, CancellationToken cancellationToken)
       at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredNonLambdaParameterSymbol(ParameterSyntax declarationSyntax, CancellationToken cancellationToken)
       at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredSymbol(ParameterSyntax declarationSyntax, CancellationToken cancellationToken)
       at Microsoft.CodeAnalysis.CSharp.CSharpExtensions.GetDeclaredSymbol(SemanticModel semanticModel, ParameterSyntax declarationSyntax, CancellationToken cancellationToken)
       at ^a1OjBfK0ROEv.Visit(SyntaxNode _0) in ^G4TPw4f/olnl:line 273
       at Microsoft.CodeAnalysis.SyntaxWalker.Visit(SyntaxNode node)
       at ^a1OjBfK0ROEv.Visit(SyntaxNode _0) in ^G4TPw4f/olnl:line 150
       at Microsoft.CodeAnalysis.SyntaxWalker.Visit(SyntaxNode node)
       at ^a1OjBfK0ROEv.Visit(SyntaxNode _0) in ^G4TPw4f/olnl:line 107
       at Microsoft.CodeAnalysis.SyntaxWalker.Visit(SyntaxNode node)
       at ^a1OjBfK0ROEv.Visit(SyntaxNode _0) in ^G4TPw4f/olnl:line 295
       at Microsoft.CodeAnalysis.SyntaxWalker.Visit(SyntaxNode node)
       at ^a1OjBfK0ROEv.Visit(SyntaxNode _0) in ^G4TPw4f/olnl:line 295
       at ^VsY9ljoTjPAX.^3yUb(^4DoSQWutVd\+3 _0, SemanticModel _1, SyntaxNode _2) in ^a/0Wciz2Jtzf:line 193
       at ^6QAfwjAsttgE.^vOBk(Compilation _0, SyntaxNode _1) in ^Bik0/ycPkZv6:line 82
       at ^6QAfwjAsttgE.^vOBk(ISourceDocument _0) in ^Bik0/ycPkZv6:line 70
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^9Hq0hBTZ.^X9J5UdRB() in ^J3cjooUPlMK1:line 219
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^Y/39OD/q(ITaggable _0, Func`1 _1) in ^J3cjooUPlMK1:line 401
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(^4DoSQWutVd\+3 _0, MethodDefDeclaration _1) in ^J3cjooUPlMK1:line 206
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(^4DoSQWutVd\+3 _0, MetadataDeclaration _1) in ^J3cjooUPlMK1:line 172
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(MetadataDeclaration _0) in ^J3cjooUPlMK1:line 160
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(Object _0) in ^J3cjooUPlMK1:line 83
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.GetMessageLocation(Object codeElement) in ^J3cjooUPlMK1:line 37. Expedia.Mice

    Warning Cannot resolve the source code location of Expedia.Mice.Core.Helper.WebConfig.RedirectMappingObject.#ctor: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
       at System.Collections.Generic.Dictionary`2.Initialize(Int32 capacity)
       at System.Collections.Generic.Dictionary`2..ctor(Int32 capacity, IEqualityComparer`1 comparer)
       at Microsoft.CodeAnalysis.ImmutableArrayExtensions.ToDictionary[K,T](ImmutableArray`1 items, Func`2 keySelector, IEqualityComparer`1 comparer)
       at Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol.GetEarlyAttributeDecodingMembersDictionary()
       at Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol.MakeAllMembers(DiagnosticBag diagnostics)
       at Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol.GetMembersByNameSlow()
       at Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol.GetMembersByName()
       at Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol.GetMembers(String name)
       at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredMember(NamespaceOrTypeSymbol container, TextSpan declarationSpan, String name)
       at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredMemberSymbol(CSharpSyntaxNode declarationSyntax)
       at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredSymbol(PropertyDeclarationSyntax declarationSyntax, CancellationToken cancellationToken)
       at Microsoft.CodeAnalysis.CSharp.CSharpExtensions.GetDeclaredSymbol(SemanticModel semanticModel, PropertyDeclarationSyntax declarationSyntax, CancellationToken cancellationToken)
       at ^a1OjBfK0ROEv.Visit(SyntaxNode _0) in ^G4TPw4f/olnl:line 192
       at Microsoft.CodeAnalysis.SyntaxWalker.Visit(SyntaxNode node)
       at ^a1OjBfK0ROEv.Visit(SyntaxNode _0) in ^G4TPw4f/olnl:line 107
       at Microsoft.CodeAnalysis.SyntaxWalker.Visit(SyntaxNode node)
       at ^a1OjBfK0ROEv.Visit(SyntaxNode _0) in ^G4TPw4f/olnl:line 295
       at Microsoft.CodeAnalysis.SyntaxWalker.Visit(SyntaxNode node)
       at ^a1OjBfK0ROEv.Visit(SyntaxNode _0) in ^G4TPw4f/olnl:line 295
       at ^VsY9ljoTjPAX.^3yUb(^4DoSQWutVd\+3 _0, SemanticModel _1, SyntaxNode _2) in ^a/0Wciz2Jtzf:line 193
       at ^6QAfwjAsttgE.^vOBk(Compilation _0, SyntaxNode _1) in ^Bik0/ycPkZv6:line 82
       at ^6QAfwjAsttgE.^vOBk(TypeDefDeclaration _0) in ^Bik0/ycPkZv6:line 56
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^9Hq0hBTZ.^X9J5UdRB() in ^J3cjooUPlMK1:line 254
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^Y/39OD/q(ITaggable _0, Func`1 _1) in ^J3cjooUPlMK1:line 401
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(^4DoSQWutVd\+3 _0, MethodDefDeclaration _1) in ^J3cjooUPlMK1:line 206
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(^4DoSQWutVd\+3 _0, MetadataDeclaration _1) in ^J3cjooUPlMK1:line 172
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(MetadataDeclaration _0) in ^J3cjooUPlMK1:line 160
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(Object _0) in ^J3cjooUPlMK1:line 83
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.GetMessageLocation(Object codeElement) in ^J3cjooUPlMK1:line 37. Expedia.Mice

    Warning There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Magick.NET-Q16-x64, Version=7.0.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. Expedia.Mice
    Warning Cannot resolve the source code location of Expedia.Mice.Core.Helper.AssetsHelper.HasMinifiedStyles(PageType): System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.SyntaxParser.PreLex()
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.SyntaxParser..ctor(Lexer lexer, LexerMode mode, CSharpSyntaxNode oldTree, IEnumerable`1 changes, Boolean allowModeReset, Boolean preLexIfNotIncremental, CancellationToken cancellationToken)
       at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser..ctor(Lexer lexer, CSharpSyntaxNode oldTree, IEnumerable`1 changes, LexerMode lexerMode, CancellationToken cancellationToken)
       at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.ParseText(SourceText text, CSharpParseOptions options, String path, CancellationToken cancellationToken)
       at ^FIkyLEEJqx\.J.^Vc+rW5zZ(Project _0, String _1, String _2) in ^Av0ERcpSLfOw:line 28
       at ^6QAfwjAsttgE.^vOBk(ISourceDocument _0) in ^Bik0/ycPkZv6:line 70
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^9Hq0hBTZ.^X9J5UdRB() in ^J3cjooUPlMK1:line 219
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^Y/39OD/q(ITaggable _0, Func`1 _1) in ^J3cjooUPlMK1:line 401
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(^4DoSQWutVd\+3 _0, MethodDefDeclaration _1) in ^J3cjooUPlMK1:line 206
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(^4DoSQWutVd\+3 _0, MetadataDeclaration _1) in ^J3cjooUPlMK1:line 172
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(MetadataDeclaration _0) in ^J3cjooUPlMK1:line 160
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(Object _0) in ^J3cjooUPlMK1:line 83
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.GetMessageLocation(Object codeElement) in ^J3cjooUPlMK1:line 37. Expedia.Mice
    Warning Cannot resolve the source code location of Expedia.Mice.Core.Helper.AssetsHelper.get_MinifiedStyles: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
       at System.Text.StringBuilder.ToString()
       at System.IO.StreamReader.ReadToEnd()
       at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
       at System.IO.File.ReadAllText(String path)
       at ^6QAfwjAsttgE.^vOBk(ISourceDocument _0) in ^Bik0/ycPkZv6:line 70
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^9Hq0hBTZ.^X9J5UdRB() in ^J3cjooUPlMK1:line 219
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^Y/39OD/q(ITaggable _0, Func`1 _1) in ^J3cjooUPlMK1:line 401
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(^4DoSQWutVd\+3 _0, MethodDefDeclaration _1) in ^J3cjooUPlMK1:line 206
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(^4DoSQWutVd\+3 _0, MetadataDeclaration _1) in ^J3cjooUPlMK1:line 172
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(MetadataDeclaration _0) in ^J3cjooUPlMK1:line 160
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.^qOUSkjdp(Object _0) in ^J3cjooUPlMK1:line 83
       at PostSharp.Sdk.Extensibility.SourceParser.RoslynLocationResolverTask.GetMessageLocation(Object codeElement) in ^J3cjooUPlMK1:line 37. Expedia.Mice
    ```

    Here is the postsharp.config file I am using:

    ```
    <?xml version="1.0" encoding="utf-8"?>
    <Project xmlns="http://schemas.postsharp.org/1.0/configuration">
        <Logging xmlns="clr-namespace:PostSharp.Patterns.Diagnostics;assembly:PostSharp.Patterns.Diagnostics">
            <Profiles>
                <LoggingProfile Name="default" IncludeSourceLineInfo="True">
                    <DefaultOptions>
                        <LoggingOptions IncludeParameterType="True"/>
                    </DefaultOptions>
                </LoggingProfile>
            </Profiles>
        </Logging>
    </Project>
    ```

  3. Support Staff 3 Posted by PostSharp Techn... on 21 Sep, 2018 09:18 AM

    PostSharp Technologies's Avatar

    Hello,

    We are investigating this issue and we would like to ask you for more information.

    If you build your projects one-by-one, do you get this error for each of the projects or only for some of them? If build does not fail for all of the projects, can you identify anything specific about the projects where it does fail (e.g. project size)?

    According to the stack trace, the issue must be related to the IncludeSourceLineInfo="True" setting in the logging profile. As a workaround, you can disable this setting until the issue is fixed.

    (filed as an internal bug #20683)

    -alex

  4. 4 Posted by info on 24 Sep, 2018 09:59 AM

    info's Avatar

    Hi Alex,

    the strange thing is, that as a DEFAULT configuration Diagnostics logs WITH SourceLineInfo.
    If I need to add Timing (which we do) I have to use a custom configuration and if I include SourceLineInfo it fails, but as long as I let SourceLineInfo=off it works.

  5. Support Staff 5 Posted by PostSharp Techn... on 24 Sep, 2018 12:45 PM

    PostSharp Technologies's Avatar

    Hello,

    thanks a lot for the additional information.

    Best regards,
    Daniel

  6. info closed this discussion on 27 Sep, 2018 05:57 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac