System.BadImageFormatException in VS2010 XAML-Designer - visual-studio-2010

i use SQLite 1.0.79 (64 bit Setup over "sqlite-netFx40-setup-bundle-x64-2010-1.0.79.0.exe")
in my project.
Binding the SQLite over GAC.
But in the XAML-Designer throw follow Exception:
System.BadImageFormatException
Die Datei oder Assembly "System.Data.SQLite, Version=1.0.79.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" oder eine Abhängigkeit davon wurde nicht gefunden. Es wurde versucht, eine Datei mit einem falschen Format zu laden.
bei System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
bei System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
bei System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
bei System.Reflection.Assembly.Load(AssemblyName assemblyRef)
bei MS.Internal.Package.VSIsolationProviderService.RemoteReferenceProxy.VsReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly)
bei Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.CachingReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly)
bei Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.Microsoft.Windows.Design.Metadata.IReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly)
bei MS.Internal.Metadata.ClrAssembly.GetRuntimeMetadata(Object reflectionMetadata)
bei Microsoft.Windows.Design.Metadata.AttributeTableContainer.d__c.MoveNext()
bei Microsoft.Windows.Design.Metadata.AttributeTableContainer.GetAttributes(Assembly assembly, Type attributeType, Func`2 reflectionMapper)
bei MS.Internal.Metadata.ClrAssembly.GetAttributes(ITypeMetadata attributeType)
bei MS.Internal.Design.Metadata.Xaml.XamlAssembly.get_XmlNamespaceCompatibilityMappings()
bei Microsoft.Windows.Design.Metadata.Xaml.XamlExtensionImplementations.GetXmlNamespaceCompatibilityMappings(IAssemblyMetadata sourceAssembly)
bei Microsoft.Windows.Design.Metadata.Xaml.XamlExtensions.GetXmlNamespaceCompatibilityMappings(IAssemblyMetadata source)
bei MS.Internal.Design.Metadata.ReflectionProjectNode.BuildSubsumption()
bei MS.Internal.Design.Metadata.ReflectionProjectNode.SubsumingNamespace(Identifier identifier)
bei MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScope parentScope, IParseContext context)
bei MS.Internal.Design.Markup.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider, Boolean visitCodeModel)
bei MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.FullParse(Boolean convertToXamlWithErrors)
bei MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.get_RootItem()
bei Microsoft.Windows.Design.DocumentModel.Trees.ModifiableDocumentTree.get_ModifiableRootItem()
bei Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.get_LoadState()
bei MS.Internal.Host.PersistenceSubsystem.Load()
bei MS.Internal.Host.Designer.Load()
bei MS.Internal.Designer.VSDesigner.Load()
bei MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load()
bei MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView view)
bei MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)
bei MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)
bei MS.Internal.Host.Isolation.IsolatedDesigner.Load()
bei MS.Internal.Designer.DesignerPane.LoadDesignerView(Boolean isReload)
This Exception occurs on all Xaml-files.
But the program runs without error.
... EDIT ...
I have edited, because I'm not even allowed to respond
problem identified and resolved...
i had only installed the 64bit SQLite, but the VS2010 is a 32bit process.
Installing also the 32bit SQLite resolve the Problem

You only installed the 64bit SQLite, but the VS2010 is a 32bit process.
Installing also the 32bit SQLite will resolve the Problem.

Related

The service '/app/notificationsregistrationhandler.svc' cannot be activated due to an exception during compilation

On developement site this REST web service works fine but on production site I get this error:
Server Error in '/app' Application.
The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
[ConfigurationErrorsException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
>System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +163
System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +53
System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +175
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +86
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +261
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +101
System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +83
System.Web.Compilation.BuildManager.GetCompiledCustomString(String virtualPath) +27
System.ServiceModel.HostingManager.GetCompiledCustomString(String normalizedVirtualPath) +134
System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +25
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +42
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +479
[ServiceActivationException: The service '/app/notificationsregistrationhandler.svc' cannot be activated due to an exception during compilation. The exception message is: The specified module could not be found. (Exception from HRESULT: 0x8007007E).]
System.ServiceModel.AsyncResult.End(IAsyncResult result) +11653822
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +194
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +176
System.ServiceModel.Activation.HttpHandler.ProcessRequest(HttpContext context) +23
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
web.config on development site is the same on production site (except for datasource connection info).
KB is developed using Genexus EV3 U3 and was migrated from EV2 U7
Development site is Windows 7 sp3 and production site is Windows Server 2008 R2
Production site works fine except for REST web services
URL Rewrite module is configured
anotificationsregistrationhandler.dll is on bin directory
What else can I check?
Could you please empty the following directories:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
And then Restart IIS: cmd.exe "iisreset"
Besides de URL Rewrite Module, you must also enable the following Windows Features:
1).NET Framework 4.5 Advanced Services -> WCF Services -> HTTP Activation
2) Microsoft .NET Framework 3.5 -> Windows Communication Foundation HTTP-Activation

Visual Studio - can't build anything

I worked arround with visual studio and cordova every thing was fine but suddenly when i want to build the app for iOS (doesn't matter if ripple or remote device) after a abouut two seconds I get the following error message.
It really appeared from one to another second... I did nothing special.
Also when i create a blank project it doesn't work - same issue!
Error - Cannot load global packages. System.AggregateException:
Mindestens ein Fehler ist aufgetreten. --->
Microsoft.NodejsTools.Npm.PackageJsonException: Error reading
package.json at
'C:\Users\m.hüttl\AppData\Roaming\npm\node_modules\phonegap\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\graceful-fs\package.json':
Error reading package.json. The file may be parseable JSON but may
contain objects with duplicate properties.
The following error occurred:
Can not add Newtonsoft.Json.Linq.JValue to
Newtonsoft.Json.Linq.JObject. --->
Microsoft.NodejsTools.Npm.PackageJsonException: Error reading
package.json. The file may be parseable JSON but may contain objects
with duplicate properties.
The following error occurred:
Can not add Newtonsoft.Json.Linq.JValue to
Newtonsoft.Json.Linq.JObject. ---> System.ArgumentException: Can not
add Newtonsoft.Json.Linq.JValue to Newtonsoft.Json.Linq.JObject.
bei Newtonsoft.Json.Linq.JObject.ValidateToken(JToken o, JToken
existing) bei Newtonsoft.Json.Linq.JContainer.InsertItem(Int32
index, JToken item, Boolean skipParentCheck) bei
Newtonsoft.Json.Linq.JObject.InsertItem(Int32 index, JToken item,
Boolean skipParentCheck) bei
Newtonsoft.Json.Linq.JContainer.AddInternal(Int32 index, Object
content, Boolean skipParentCheck) bei
Newtonsoft.Json.Linq.JContainer.Add(Object content) bei
Newtonsoft.Json.Linq.JTokenWriter.AddValue(JValue value, JsonToken
token) bei Newtonsoft.Json.Linq.JTokenWriter.WriteNull() bei
Newtonsoft.Json.JsonWriter.AutoCompleteClose(JsonContainerType type)
bei Newtonsoft.Json.JsonWriter.WriteEndObject() bei
Newtonsoft.Json.JsonWriter.WriteEnd(JsonContainerType type) bei
Newtonsoft.Json.JsonWriter.WriteEnd() bei
Newtonsoft.Json.JsonWriter.AutoCompleteAll() bei
Newtonsoft.Json.Linq.JTokenWriter.Close() bei
Newtonsoft.Json.JsonWriter.System.IDisposable.Dispose() bei
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateJObject(JsonReader
reader) bei
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader
reader, Type objectType, JsonContract contract, JsonProperty member,
JsonContainerContract containerContract, JsonProperty containerMember,
Object existingValue) bei
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader
reader, Type objectType, JsonContract contract, JsonProperty member,
JsonContainerContract containerContract, JsonProperty containerMember,
Object existingValue) bei
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader
reader, Type objectType, Boolean checkAdditionalContent) bei
Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader,
Type objectType) bei
Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type,
JsonSerializerSettings settings) bei
Microsoft.NodejsTools.Npm.ReaderPackageJsonSource..ctor(TextReader
reader) --- Ende der internen Ausnahmestapelüberwachung --- bei
Microsoft.NodejsTools.Npm.ReaderPackageJsonSource..ctor(TextReader
reader) bei
Microsoft.NodejsTools.Npm.FilePackageJsonSource..ctor(String
fullPathToFile) --- Ende der internen Ausnahmestapelüberwachung ---
bei
Microsoft.NodejsTools.Npm.FilePackageJsonSource.WrapExceptionAndRethrow(String
fullPathToFile, Exception ex) bei
Microsoft.NodejsTools.Npm.FilePackageJsonSource..ctor(String
fullPathToFile) bei
Microsoft.NodejsTools.Npm.DirectoryPackageJsonSource..ctor(String
fullDirectoryPath) bei
Microsoft.NodejsTools.Npm.SPI.RootPackage..ctor(String
fullPathToRootDirectory, Boolean showMissingDevOptionalSubPackages)
bei Microsoft.NodejsTools.Npm.SPI.NodeModules..ctor(IRootPackage
parent, Boolean showMissingDevOptionalSubPackages) bei
Microsoft.NodejsTools.Npm.SPI.RootPackage..ctor(String
fullPathToRootDirectory, Boolean showMissingDevOptionalSubPackages)
bei Microsoft.NodejsTools.Npm.SPI.NodeModules..ctor(IRootPackage
parent, Boolean showMissingDevOptionalSubPackages) bei
Microsoft.NodejsTools.Npm.SPI.RootPackage..ctor(String
fullPathToRootDirectory, Boolean showMissingDevOptionalSubPackages)
bei Microsoft.NodejsTools.Npm.SPI.NodeModules..ctor(IRootPackage
parent, Boolean showMissingDevOptionalSubPackages) bei
Microsoft.NodejsTools.Npm.SPI.RootPackage..ctor(String
fullPathToRootDirectory, Boolean showMissingDevOptionalSubPackages)
bei Microsoft.NodejsTools.Npm.SPI.NodeModules..ctor(IRootPackage
parent, Boolean showMissingDevOptionalSubPackages) bei
Microsoft.NodejsTools.Npm.SPI.RootPackage..ctor(String
fullPathToRootDirectory, Boolean showMissingDevOptionalSubPackages)
bei Microsoft.NodejsTools.Npm.SPI.NodeModules..ctor(IRootPackage
parent, Boolean showMissingDevOptionalSubPackages) bei
Microsoft.NodejsTools.Npm.SPI.RootPackage..ctor(String
fullPathToRootDirectory, Boolean showMissingDevOptionalSubPackages)
bei
Microsoft.NodejsTools.Npm.SPI.NpmController.d__1.MoveNext()
--- Ende der internen Ausnahmestapelüberwachung ---
---> (Interne Ausnahme #0) Microsoft.NodejsTools.Npm.PackageJsonException: Error reading
package.json at
'C:\Users\m.hüttl\AppData\Roaming\npm\node_modules\phonegap\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\graceful-fs\package.json':
Error reading package.json. The file may be parseable JSON but may
contain objects with duplicate properties.
The following error occurred:
Can not add Newtonsoft.Json.Linq.JValue to
Newtonsoft.Json.Linq.JObject. --->
Microsoft.NodejsTools.Npm.PackageJsonException: Error reading
package.json. The file may be parseable JSON but may contain objects
with duplicate properties.
The following error occurred:
Can not add Newtonsoft.Json.Linq.JValue to
Newtonsoft.Json.Linq.JObject. ---> System.ArgumentException: Can not
add Newtonsoft.Json.Linq.JValue to Newtonsoft.Json.Linq.JObject.
bei Newtonsoft.Json.Linq.JObject.ValidateToken(JToken o, JToken
existing) bei Newtonsoft.Json.Linq.JContainer.InsertItem(Int32
index, JToken item, Boolean skipParentCheck) bei
Newtonsoft.Json.Linq.JObject.InsertItem(Int32 index, JToken item,
Boolean skipParentCheck) bei
Newtonsoft.Json.Linq.JContainer.AddInternal(Int32 index, Object
content, Boolean skipParentCheck) bei
Newtonsoft.Json.Linq.JContainer.Add(Object content) bei
Newtonsoft.Json.Linq.JTokenWriter.AddValue(JValue value, JsonToken
token) bei Newtonsoft.Json.Linq.JTokenWriter.WriteNull() bei
Newtonsoft.Json.JsonWriter.AutoCompleteClose(JsonContainerType type)
bei Newtonsoft.Json.JsonWriter.WriteEndObject() bei
Newtonsoft.Json.JsonWriter.WriteEnd(JsonContainerType type) bei
Newtonsoft.Json.JsonWriter.WriteEnd() bei
Newtonsoft.Json.JsonWriter.AutoCompleteAll() bei
Newtonsoft.Json.Linq.JTokenWriter.Close() bei
Newtonsoft.Json.JsonWriter.System.IDisposable.Dispose() bei
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateJObject(JsonReader
reader) bei
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader
reader, Type objectType, JsonContract contract, JsonProperty member,
JsonContainerContract containerContract, JsonProperty containerMember,
Object existingValue) bei
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader
reader, Type objectType, JsonContract contract, JsonProperty member,
JsonContainerContract containerContract, JsonProperty containerMember,
Object existingValue) bei
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader
reader, Type objectType, Boolean checkAdditionalContent) bei
Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader,
Type objectType) bei
Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type,
JsonSerializerSettings settings) bei
Microsoft.NodejsTools.Npm.ReaderPackageJsonSource..ctor(TextReader
reader) --- Ende der internen Ausnahmestapelüberwachung --- bei
Microsoft.NodejsTools.Npm.ReaderPackageJsonSource..ctor(TextReader
reader) bei
Microsoft.NodejsTools.Npm.FilePackageJsonSource..ctor(String
fullPathToFile) --- Ende der internen Ausnahmestapelüberwachung ---
bei
Microsoft.NodejsTools.Npm.FilePackageJsonSource.WrapExceptionAndRethrow(String
fullPathToFile, Exception ex) bei
Microsoft.NodejsTools.Npm.FilePackageJsonSource..ctor(String
fullPathToFile) bei
Microsoft.NodejsTools.Npm.DirectoryPackageJsonSource..ctor(String
fullDirectoryPath) bei
Microsoft.NodejsTools.Npm.SPI.RootPackage..ctor(String
fullPathToRootDirectory, Boolean showMissingDevOptionalSubPackages)
bei Microsoft.NodejsTools.Npm.SPI.NodeModules..ctor(IRootPackage
parent, Boolean showMissingDevOptionalSubPackages) bei
Microsoft.NodejsTools.Npm.SPI.RootPackage..ctor(String
fullPathToRootDirectory, Boolean showMissingDevOptionalSubPackages)
bei Microsoft.NodejsTools.Npm.SPI.NodeModules..ctor(IRootPackage
parent, Boolean showMissingDevOptionalSubPackages) bei
Microsoft.NodejsTools.Npm.SPI.RootPackage..ctor(String
fullPathToRootDirectory, Boolean showMissingDevOptionalSubPackages)
bei Microsoft.NodejsTools.Npm.SPI.NodeModules..ctor(IRootPackage
parent, Boolean showMissingDevOptionalSubPackages) bei
Microsoft.NodejsTools.Npm.SPI.RootPackage..ctor(String
fullPathToRootDirectory, Boolean showMissingDevOptionalSubPackages)
bei Microsoft.NodejsTools.Npm.SPI.NodeModules..ctor(IRootPackage
parent, Boolean showMissingDevOptionalSubPackages) bei
Microsoft.NodejsTools.Npm.SPI.RootPackage..ctor(String
fullPathToRootDirectory, Boolean showMissingDevOptionalSubPackages)
bei Microsoft.NodejsTools.Npm.SPI.NodeModules..ctor(IRootPackage
parent, Boolean showMissingDevOptionalSubPackages) bei
Microsoft.NodejsTools.Npm.SPI.RootPackage..ctor(String
fullPathToRootDirectory, Boolean showMissingDevOptionalSubPackages)
bei
Microsoft.NodejsTools.Npm.SPI.NpmController.d__1.MoveNext()<---

How to get EnvDte.DTE in an assembly referenced by a T4 Template

In an assembly referenced by a T4 template using the <## assembly #> directive, I execute the code var dte = (EnvDTE.DTE)serviceProvider.GetService(typeof(EnvDTE.DTE)); which results in the following exception and stack trace.
Error 1 Running transformation: System.IO.FileNotFoundException: Could not load file or assembly 'MyProjectName.TextTemplating, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'MyProjectName.TextTemplating, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
Server stack trace:
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at System.UnitySerializationHolder.GetRealObject(StreamingContext context)
at System.Runtime.Serialization.ObjectManager.ResolveObjectReference(ObjectHolder holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.DeserializeObject(MemoryStream stm)
at System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage.FixupForNewAppDomain()
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoDispatch(Byte[] reqStmBuff, SmuggledMethodCallMessage smuggledMcm, SmuggledMethodReturnMessage& smuggledMrm)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatchCallback(Object[] args)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.IServiceProvider.GetService(Type serviceType)
at MyProjectName.TextTemplating.MyProjectNameTextTransformation.GetCurrentProject() in C:\Users\n1200632d\Documents\Visual Studio 2010\Projects\DataAccessLayerTests\MyProjectName.TextTemplating\MyProjectNameTextTransformation.cs:line 123
In the referenced assembly toggling the ComVisible assembly attribute either through the project's assembly properties or directly in the AssemblyInfo code file using the attribute [assembly: ComVisible(..)] appears to resolve the exception.

WP7 AdMob SDK doesn't Work

I always get an error when I start an app with an AdMob BannerAd. I just added the control to the toolbox and copy pasted in in the form.
Here is the relevant code:
<my:BannerAd HorizontalAlignment="Left" Margin="0,522,0,0" Name="bannerAd1" VerticalAlignment="Top" />
When I run the app I get this error:
System.NullReferenceException wurde nicht behandelt.
Message=NullReferenceException
StackTrace:
bei Google.AdMob.Ads.WindowsPhone7.WPF.DisplayAdBase.<>c__DisplayClass3c.<LoadDisplay>b__38()
bei System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
bei System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
bei System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
bei System.Delegate.DynamicInvokeOne(Object[] args)
bei System.MulticastDelegate.DynamicInvokeImpl(Object[] args)
bei System.Delegate.DynamicInvoke(Object[] args)
bei System.Windows.Threading.DispatcherOperation.Invoke()
bei System.Windows.Threading.Dispatcher.Dispatch(DispatcherPriority priority)
bei System.Windows.Threading.Dispatcher.OnInvoke(Object context)
bei System.Windows.Hosting.CallbackCookie.Invoke(Object[] args)
bei System.Windows.Hosting.DelegateWrapper.InternalInvoke(Object[] args)
bei System.Windows.RuntimeHost.ManagedHost.InvokeDelegate(IntPtr pHandle, Int32 nParamCount, ScriptParam[] pParams, ScriptParam& pResult)
I'm using AldarIT SuperAds for three production Apps with AdMob as primary ad provider. No problems so far after 5 Months.
Im using http://wp7adrotator.codeplex.com/. Having no problems still on my app.
http://www.aldarit.com/superads.html is a good solution too. Used it before started using wp7adrotator. You might give it a try too.
Hope it helps.

Help compiling a silverlight project!

Hi every body
I try to compile my project' but I get this error:
Error 1 The "ValidateXaml" task failed unexpectedly.
System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Documents and Settings\arielih\My Documents\Downloads\פרויקט\RubikCube\obj\Debug\RubikCube.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Documents and Settings\arielih\My Documents\Downloads\פרויקט\RubikCube\obj\Debug\RubikCube.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Microsoft.Silverlight.Build.Tasks.ValidateXaml.XamlValidator.Execute(ITask task)
at Microsoft.Silverlight.Build.Tasks.ValidateXaml.XamlValidator.Execute(ITask task)
at Microsoft.Silverlight.Build.Tasks.ValidateXaml.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)
RubikCube
What should I do?
If you downloaded the file RubikCube from the internet, it may be blocked. Right click on it in the explorer and "unblock it" in the file properties.

Resources