ivivona / postsharp-user-plugins Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/postsharp-user-plugins
Automatically exported from code.google.com/p/postsharp-user-plugins
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
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
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
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.