Sorry for the delayed reply, I've been on leave.

That is strange. Looking at the build logs for the last master build of the
4.0 and 4.5 build configurations it is picking the right mscorlib when
calling csc, so I'd have expected the 4.0 one to fail compilation, unless
that bit isn't actually "compiled".
C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll
C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll

IIRC our old build machine didn't have .NET 4.5 on it, and since 4.5
patches 4.0 that might have something to do with it.

OK, I've found this article which describes the problem, but I don't know
how to fix it yet because the reference assemblies are there and being
used. I thought the .NET team would have learnt their lesson with 3.5SP1
around patching previous versions.
http://marcgravell.blogspot.de/2012/09/iterator-blocks-missing-methods-and-net.html

I'll see if I can take another look later today.

On Sat, Sep 21, 2013 at 9:05 AM, Krzysztof Kozmic <
[email protected]> wrote:

> Hey Miles,
>
> very interesting. It would appear you're correct. The call to
> Environment.CurrentManagedThreadId is part of the compiler-generated state
> machine (notice yield return in the method).
>
> If you install Windsor 3.2 (instead of 3.2.1 that you're currently using)
> it works fine, so that may be a solution until we figure out what has gone
> wrong.
>
> It looks like our .NET 4.0 build does actually compile like .NET 4.5
>
>
> Jono - any idea what might be causing it? I'd suspect that it may have
> something to do with our migration to a new build server and some
> configuration difference between the two… Not that I really know what
> actually is the cause of that.
>
> --
> Krzysztof Kozmic
>
> On Saturday, 21 September 2013 at 4:22 AM, Miles Waller wrote:
>
> Hi,
>
> I upgraded a .net 4.0 project that was working fine to the latest packages
> I could get from nuget:
>
>   <package id="Castle.Core" version="3.2.0" targetFramework="net40" />
>   <package id="Castle.Windsor" version="3.2.1" targetFramework="net40" />
>
> The project builds and runs fine from the command line.  I have VS 2012
> installed, so the 4.5 runtime exists on my machine too, however the project
> is 4.0 and I am using only 4.0 binaries.
>
> I then went to run the executable on a machine that did not have the 4.5
> runtime installed.  My program blows up with this exception:
>
> An exception occurred creating the service: QuartzServer --->
> System.MissingMethodException: Method not found: 'Int32
> System.Environment.get_CurrentManagedThreadId()'.
>    at
> Castle.MicroKernel.Registration.AssemblyFilter.<Castle.Core.Internal.IAssemblyProvider.GetAssemblies>d__5..ctor(Int32
> <>1__state)
>    at
> Castle.MicroKernel.Registration.AssemblyFilter.Castle.Core.Internal.IAssemblyProvider.GetAssemblies()
>    at
> Castle.MicroKernel.Registration.Classes.FromAssemblyInDirectory(AssemblyFilter
> filter)
>
> CurrentManagedThreadId is only available in the 4.5 runtime.
>
> Installing the 4.5 runtime on the target machine fixed the problem.
>
> Has something incompatible slipped into the releases?  I looked  on github
> but I couldn't find the root of this stack trace.
>
> Thanks
>
> Miles
>
> --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected]
> .
> Visit this group at http://groups.google.com/group/castle-project-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>


-- 
Jono

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/castle-project-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to