Coder Social home page Coder Social logo

postsharp-user-plugins's People

Contributors

gfraiteur avatar patrickjahnke avatar kpnovoselov avatar

Stargazers

Shashi Kumar Nagulakonda avatar

postsharp-user-plugins's Issues

Log4PostSharp built against a non-public version

What steps will reproduce the problem?
1. Download PostSharp 1.0 from postsharp.org
2. Download Log4PostSharp 1.0.1 Demo
3. Add reference to PostSharp.Public.dll in the project
4. Try to build

What is the expected output? What do you see instead?

The program should build instead of giving the following error

Error   1   Assembly 'Log4PostSharp, Version=1.0.1.0, Culture=neutral,
PublicKeyToken=null' uses 'PostSharp.Public, Version=1.0.11.424,
Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7' which has a higher
version than referenced assembly 'PostSharp.Public, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7'
c:\Users\Dmitri\Projects\Globals\Log4PostSharp-1.0.1.0-Release-2.0\Log4PostSharp
Demo-1.0.1.0\Libraries\Log4PostSharp.dll
Log4PostSharpDemo


What version of the product are you using? On what operating system?

Vista, VS2008SP1, Log4PostSharp1.0.1, PostSharp 1.0 (latest version from
website)

Please provide any additional information below.


Original issue reported on code.google.com by dmitrinesteruk on 6 Mar 2009 at 12:13

Build failure injectiong code into generic types

What steps will reproduce the problem?
1. I've recompiled log4postsharp to target PostSharp 1.5 RC1
2. Build a really simple C# project, with just one generic class:

class GenericClass<T>
{
    public GenericClass( IEnumerable<T> list )
    {

    }
}

3. Added the attribute:

[assembly: Log( AttributeTargetMembers = "*",
    AttributeTargetAssemblies = "Assembly name...",
    EntryLevel = LogLevel.Debug,
    ExitLevel = LogLevel.Debug )]

What is the expected output? What do you see instead?

At compile time Log4PostSharp waever fails:
TemplateParser line 226

private static bool IsStringParameter( ParameterDeclaration parameter )
{
    if( !parameter.ParameterType.IsGenericDefinition )

... using the above sample class IsGenericDefinition is alaways false, 
instead IsGenericInstance is the expected value, I've changed the above 
code recompiled and everything now seems to work fine.

What version of the product are you using? On what operating system?
Windows 7 RC1 x64, PostSharp RC1, latest (trunk) log4PostSharp

.m

Original issue reported on code.google.com by [email protected] on 15 Jun 2009 at 1:39

DBC - Failing on multiple NonNull attributes

I'm trying to use Torch.dbc and running into something odd.

if you have a method signature like
public void TwoParam([NonNull]string arg1, [NonNull]string arg2)

the NonNull check only gets applied to the first parameter. poking around 
in the code, i saw this: 

if (!methods.ContainsKey(paramDef.Parent))
{
   codeWeaver.AddMethodLevelAdvice(new NonNullParameterAdvice(paramDef),
                                                            new 
Singleton<MethodDefDeclaration>(paramDef.Parent),

JoinPointKinds.BeforeMethodBody,
                                                            null);
  methods.Add(paramDef.Parent, paramDef.Parent);
}

so, when the second attribute comes in, the method is already in the 
collection so the advice doesn't get applied.

Is there a reason this is here or should it be removed?

Original issue reported on code.google.com by [email protected] on 21 Nov 2008 at 2:44

Web.config settings for relative path

Hi,

I'm using "PostSharpAspNet" for my asp.net application. I should deploy my 
application on a shared web host and I can't run the PostSharp Installer 
on this host.

I have a folder named "PostSharp" in my solution folder and applied the 
required settings to all ".csproj" files of the solution. I have added 
required settings to the Web.config file too. 

I have a problem with the following ASP.NET Web.config file settings:

  <postsharp directory="~\..\PostSharp" trace="true">

When I use a physical path for the directory attribute, everything works 
fine but when I use a relative path I get an exception:

   "Cannot find the file: '~\..\PostSharp\postsharp.e xe'."

Is there any solution for this problem?

Regards,

   Farzad Badili

Original issue reported on code.google.com by [email protected] on 3 Jan 2009 at 4:43

PostSharp fails when injecting logging if code optimization on and there is only a CR/LF after a conditional compilation directive

Take for example the following, which is legal C# and compiles (assuming it
is in a class and PRECONDITIONS is defined:

        public static void ParameterNonZero(double parameter, string
parameterName) {
#if PRECONDITIONS
Require(!string.IsNullOrEmpty(parameterName),

MessageHelper.GetMessage(MessageHelper.ResourceKey.ExceptionParameterRequired,
"parameterName"));

            Require(parameter != 0,

MessageHelper.GetMessage(MessageHelper.ResourceKey.ExceptionParameterNonZero,
parameterName));
#endif
        }

Note there is a CR/LF (EOL) after the text "PRECONDITIONS" and before the
"Require".  There are no additional space characters in between the two
words.  

I put the following in assemblyinfo.cs:
[assembly: Log(AttributeTargetTypes = "*", EntryLevel = LogLevel.Debug,
ExitLevel = LogLevel.Debug, ExceptionLevel = LogLevel.Error)]

Build for debug works fine.  The logging works fine.  

Now I switch to release.  Build fails with:

Target PostSharp15:
    PostSharp 1.5 [1.5.6.686] - Copyright (c) Gael Fraiteur, 2005-2009.
    info PS0035: PostSharp:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\ilasm.exe
"C:\development\OnpointConnect\Current\OnpointConnect\app\OnpointConnect.Utility
\obj\Release\PostSharp\OnpointConnect.Utility.il"
/QUIET /DLL /PDB
"/RESOURCE=C:\development\OnpointConnect\Current\OnpointConnect\app\OnpointConne
ct.Utility\obj\Release\PostSharp\OnpointConnect.Utility.res"
"/OUTPUT=C:\development\OnpointConnect\Current\OnpointConnect\app\OnpointConnect
.Utility\obj\Release\OnpointConnect.Utility.dll"
/SUBSYSTEM=3 /FLAGS=1 /BASE=1700200448 /STACK=1048576 /ALIGNMENT=512
/MDV=v2.0.50727 
    unknown_location : postsharp error PS0034: PostSharp: ILASM exited with
return code 1. Tool output: 
    unknown_location : postsharp error PS0034:
C:\development\OnpointConnect\Current\OnpointConnect\app\OnpointConnect.Utility\
ParameterCheck.cs(16707566)
: error : syntax error at token ''C:\\development\\OnpointConnec' in: 
.line 43 , 43
'C:\\development\\OnpointConnect\\Current\\OnpointConnect\\app\\OnpointConnect.U
tility\\ParameterCheck.cs'
    unknown_location : postsharp error PS0034: 
    unknown_location : postsharp error PS0034: ***** FAILURE ***** 
    unknown_location : postsharp error PS0034: 
    unknown_location : postsharp error PS0034: 
    unknown_location : postsharp error PS0034: 
Done building target "PostSharp15" in project
"OnpointConnect.Utility.csproj" -- FAILED.

Now go into the project options and turn off "Optimize Code".  It builds
fine again.

After further trial and error I discovered that putting at least one space
character between "PRECONDITIONS(EOL)" and "Require" solved the problem.  I
could turn back on "Optimize Code" and the compile worked fine as did the
logging. 


Original issue reported on code.google.com by [email protected] on 18 Sep 2009 at 5:33

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.