This may be a version conflict. Consider the following
Your installation of PostSharp may be "dirty", with several
Assembly PostSharp.Pipe may be in GAC (it should not).
There may be several projects in your solution, each bound to a
different version of the NuGet package.
The NuGet package could be of a different version than the one
installed with the installer.
There may be just a caching issue with MSBuild. Try killing all
MSBuild background processes.
We are working to prevent these versioning issues. The latest
version, for instance, includes the version number directly in the
file name. However, there may still be a problem with the assembly
Yes, i belive it was "dirty".
Do each developer need to have Postsharp installed or could it be easier to manage it by using NuGet packages for the solution instead.
Now I used the Postsharp 2.1 HQ and converted all the projects.
That lead to the problem with one of the developers not having a 64 bit machinge hence the folder to posthsarp.targets wasn't "C:\Program Files (x86)\PostSharp 2.1" but instead just "C:\Program\PostSharp 2.1 " We created a folder on his machine with the same path.
But that will lead to truouble with updates.
So should we instead use NuGet which we can easier maintain at a higher leveler without much installations issues on each dev machine.
The latest version, for instance, includes the version number
directly in the file name.
Technically version specific Names will allow "side by side"
support of multiple PostSharp versions. However having multiple
folders and versions, that differ only in revisions or build
number, is a mess. It would be good to have a process to update
references of all projects in the solution to the latest version
and possibly delete old ones.
I have 3 folders in my solution:
Thre is no easy way to determine, is any project still refer to old
version, or all are using the latest and previous folders can be
Has anything else been found out about this? I've spent 3 hours
on a Saturday trying to get our flipping solution compiling again,
and I can't get it to work. This is extremely frustrating. There is
not another NuGet package that causes this problem, and its the
only one we've actually had to pay for that we use. Completely
unacceptable in my opinion.
Please help out. I've removed all references to PostSharp, which
of course then breaks the compile because we have code actually
using PostSharp. But this does nothing anyway, once we put the
It only works if I add a PostSharp referenc to EVERY project in
our solution (we probably have 15 projects in the solution, but
only 4 that actually use PostSharp). This is an unacceptable hack.
There is no reason I should have to reference PostSharp in every
project obviously. But its the only thing I've found that will
allow the solution to compile so far.
There MUST be a cache somewhere we can delete. PostSharp is
remembering something it shouldn't. I've deleted all bin folders,
project "obj" folders, the postsharp references, entries from
packages.config, etc. etc... and it still throws this flipping
error. And it used to only mention the latest version (*.29), but
now I'm getting references in the errors to (*.28) and I don't even
have this on by computer anymore!
After 6 hours, I got past it. For me anyway, apparently I had a
*.28 version of PostSharp in my Program Files folder, but *.29 from
Extremely frustrating. I thought it was using the version that
nuget puts on my box, and in some cases it does. So i have no idea
why it would use nuget's version sometimes, and the program files
version in others (PostSharp server).
But I finally saw in my task manager that sometimes it was .28
server, and other times it was .29 server.
Wow. Anyway, got past it. When you uninstall the program files
version, it will ask if you want to install some VS integration
tool the first time you run, but i'm assuming its best to just say
"no" to that because it won't get updated when nuget gets a new
version down the road.
I also had an "PostSharp21" task failed unexpectedly.
error MSB4018: System.TimeoutException: Timeout when waiting for
) and to work-around I've added postsharp to all (50+)
projects in the solution. The cause was the same - different
versions of postSharp compete with each other.
Gael expected that error "was solved in a later build" (
his post 14 Jan 2013), but it looks like it is still the issue.
I am looking forward to v.3., that hopefully will not have the
It is quite embarrassing to me that you had to spend so much
time troubleshooting. I know the issue is due to mixed versions of
PostSharp in the same solution. I added some logging to MSBuild
output to help me diagnosing the issue. However, I was not able to
reproduce the issue on our environment, so I cannot confirm the
issue has been solved. I cannot confirm that PostSharp 3 does not
have this issue.
If you are getting this issue, please produce a build log using
the command msbuild /v:diag > msbuild.log and send
it to me. I could also help you through desktop sharing if
Sorry again. I hope we'll be able to understand the problem wit
I appreciate the help. And I didn't mean to come across too
harsh, but it was an extremely frustrating Saturday and after
spending a lot of money on this plugin, it sort of added to the
But we absolutely love PostSharp, don't get me wrong!
Anyway, if you're trying to recreate, I think I can help you.
What I ended up doing to break this problem down was to tear it
apart to bare essentials. And I believe this will recreate it on
your end. Let me know if not.
Install PostSharp (install from your website) for version
Create two class library projects in a new solution.
Now use NuGet, to add PostSharp version *.29 to one of your
class library projects.
Now, in the class library project that DOES NOT HAVE PostSharp
added to it, reference the project that DOES have
I think error should happen here on compile.
I was not able to validate these steps, because I do not have
the PostSharp *.28 install anymore. But I can tell you that this
was the state of my server when the problem was happening.
Removing/uninstalling PostSharp *.28 from Program Files (x86)
solved my problem.
From what I could see, for some reason, PostSharp *.28 was being
used for the project that did NOT have a PostSharp reference (maybe
because it was referencing a project that DID use PostSharp??), and
PostSharp *.29 was being used for the project that had the NuGet
Thank you. I could reproduce the issue and identify the cause.
The timeout will occur only if the compiler service of another
version is running. This can happen if you compile, in a time span
of a few minutes, projects with different versions of PostSharp. I
am testing a fix and will publish it soon.
It seems I introduced but while solving the original defect, and
this new bug became observable only in the version number following
the version in which I fixed the original defect. I hope PostSharp
2.1 is now fully side-by-side compatible with any version.