This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi there! I have recently purchased Mindscape's MegaPack, that contains the Lightspeed ORM. I have downloaded it and installed without any errors (version 4 professional). Well, the fact is that it's not working properly in both Visual studio 2008 and 2010. In Visual Studio 2008, everything seems to be normal, excetp that I'm unable to add new properties to my models. When I do rightclick on my entity, there is no option to add a new property: In Visual Studio 2010, a exception is raised every time I try to save my model. So, no code is generated: The full call stack error : Failed to generate code for model. Exception message: Exception has been thrown by the target of an invocation.
Exception details:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Microsoft.VisualStudio.Modeling.Diagrams.Diagram' threw an exception. ---> System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
at System.ModuleHandle.ResolveMethod(RuntimeModule module, Int32 methodToken, IntPtr typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount)
at System.ModuleHandle.ResolveMethodHandleInternalCore(RuntimeModule module, Int32 methodToken, IntPtr[] typeInstantiationContext, Int32 typeInstCount, IntPtr[] methodInstantiationContext, Int32 methodInstCount)
at System.ModuleHandle.ResolveMethodHandleInternal(RuntimeModule module, Int32 methodToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.Reflection.CustomAttributeData..ctor(RuntimeModule scope, CustomAttributeRecord caRecord)
at System.Reflection.CustomAttributeData.GetCustomAttributes(RuntimeModule module, Int32 tkTarget)
at System.Reflection.CustomAttributeData.GetCustomAttributesInternal(RuntimeAssembly target)
at System.Reflection.RuntimeAssembly.GetCustomAttributesData()
at System.Reflection.CustomAttributeData.GetCustomAttributes(Assembly target)
at System.Resources.ManifestBasedResourceGroveler.GetNeutralResourcesLanguage(Assembly a, UltimateResourceFallbackLocation& fallbackLocation)
at System.Resources.ResourceManager.CommonSatelliteAssemblyInit()
at System.Resources.ResourceManager..ctor(String baseName, Assembly assembly)
at Microsoft.VisualStudio.Modeling.Diagrams.DesignSurfaceStrings.getResourceManager()
at Microsoft.VisualStudio.Modeling.Diagrams.DesignSurfaceStrings.getDefaultWatermarkText()
at Microsoft.VisualStudio.Modeling.Diagrams.Diagram..cctor()
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.Modeling.Diagrams.CoreDesignSurfaceSerializationBehaviorBase.getAllSerializers()
at Microsoft.VisualStudio.Modeling.DomainXmlSerializerDirectory.InternalAddBehavior(DomainXmlSerializationBehavior serializationBehavior, Boolean resetSerializers)
at Microsoft.VisualStudio.Modeling.Diagrams.CoreDesignSurfaceSerializationHelperBase.InitializeSerialization(Store store)
at Microsoft.VisualStudio.Modeling.Diagrams.CoreDesignSurfaceDomainModel..ctor(Store store)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct& signature, RuntimeType declaringType)
at System.RuntimeMethodHandle.InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct signature, RuntimeType declaringType)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at Microsoft.VisualStudio.Modeling.DomainModelReflector.ReflectDomainModel(Type type)
at Microsoft.VisualStudio.Modeling.DomainModelReflector.ReflectDomainModels(List I have already followed procedures described in this forum, but they didnt worked. Can someone help please? |
|
|
Thanks for reporting this - do you have .NET 4.5 installed on this machine? This looks like a potential issue stemming from a change between the location of that type between .NET 4 and .NET 4.5 so if you are able to confirm what you have installed that would be most valuable for us to try and reproduce this issue.
|
|
|
As a matter of fact, I have uninstalled Visual Studio 11 beta preview and the framework 4.5 a month ago. Furthermore, I have re-installed the DAC tools according to a blog I've found. Unfortunately, nothing worked. I'll try to do this in another computer to see if the same problem happens. However, let's suppose that the framework 4.5 is the problem: what do I have to perform in order to fix is, since it's already uninstalled? Thank you |
|
|
Thanks for the extra info - let me know what you find with your other machine. We have not seen this before so I am slightly suspicious that it is either related to a change on our build server with the switch to compiling for VS2012 or to do with running into machines which have/had beta bits on them.
|
|
|
Jeremy: Is ILMerge used atall in your build process? This can happen if you have .net 4.5 on the build server and it is being consumed on a non-.net 4.5 machine. See http://www.mattwrock.com/post/2012/02/29/What-you-should-know-about-running-ILMerge-on-Net-45-Beta-assemblies-targeting-Net-40.aspx If this is the case, make sure that your call to ilmerge reference the "Reference Assemblies" typically found in C:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0 and NOT the actual framework assemblies usually here: c:\windows\Microsoft.NET\Framework\v4.0.30319. Matt |
|
|
After installing the Visual Studio 2012 and/or the .net framework 4.5, everything is working fine. But this is kind of a problem to me. I cant, or at least I shouldn't do this in my laptop. Can you fix it, please? Thank you! Christiano Coutinho |
|
|
Yep, we are investigating this so will let you know once we have some more insight on whats going on here and if we need to make a fix. We dont use ILMerge in our build process so this appears to be something else from what we have looked at so far. With your laptop setup - is this a clean environment - e.g. only had 2010 and no previous instances of 2012?
|
|