SharpCrafters Forum – Revisit - InvalidCastException in Build

SharpCrafters Support Forum

        


Revisit - InvalidCastException in Build Expand / Collapse
Author
Message
Posted 2/11/2010 2:39:50 PM


Community Member
I have one development system that this occurs on when building via the IDE. I tried the suggested re-installation of PostSharp and that didn't help.

http://www.postsharp.org/forum/integration/invalidcastexception-build-t891.html

C:\Program Files (x86)\PostSharp 1.5\PostSharp-1.5.targets(261,5): error MSB4018: System.InvalidCastException: Unable to cast transparent proxy to type 'PostSharp.MSBuild.PostSharpRemoteTask'.

Adding
<PropertyGroup>
 <PostSharpUseCommandLine>True</PostSharpUseCommandLine>
</PropertyGroup>
works fine.

I would have to add this to a lot of .csproj files which isn't a very good solution since out of 100 systems this only occurs on one so far.

Also building the same projects via the msbuild command line the build works just fine.

Does anyone have any other suggestions?

-Michael Clark
Post #3244
Posted 2/18/2010 7:14:21 AM


Gael Fraiteur

SharpCrafters
Probably the easiest way is to set the environment variable:


set PostSharpUseCommandLine=True


All environment variables are considered plain MSBuild properties.

-gael
Post #3245
« Prev Topic | Next Topic »


All times are GMT +1:00, Time now is 11:32am

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0.112. 8 queries. Compression Disabled.