I have not used my Visual Studio 2010 for 2 weeks. Did not even touch my computer and now I am trying to work on a project.
Loaded in the project and none of the errors are shown (not even in the errorlist window). When I click build it says: build succeeded (but a bit too fast for my saying). I have tried to reload the references and even created a new project and copied the code in to it. None of this works. If I then run the project I get current error:
A first chance exception of type 'System.MissingMemberException' occurred in Microsoft.VisualBasic.dll
System.MissingMemberException: Der öffentliche Member Domains für den Typ Iref wurde nicht gefunden.
bei Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)
bei Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
bei myprogram.myfunction() in projectpath/myprogram.vb:Line 132.
Iref is a reference and I am 100 procent sure that the Domains member still exists in this reference.
Anyone have any ideas how I can fix this?
Fixed this by putting on the Option Strict to ON.
Not really the best solution but will do for the meanwhile
I encountered the same problem. I solved this by changing the Active Solution Platform to Mixed Platform. To do so, go to Configuration Manager and set the Active Solution Platform in the upper right corner.
Related
All,
I am using ZeroFormatter for serialization of a big object, sometimes it is giving following error while serializing the error, this issue is observed after using Union concept of ZeroFormatter for inheritence.
Here are the exception details:
System.InvalidProgramException: Common Language Runtime detected an invalid program.
at ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_DefaultResolver.Colibrium.Common.Ontology.Rating.Factors.RateFactor$Formatter.Serialize(Byte[]& , Int32 , RateFactor )
at ZeroFormatter.Formatters.CollectionFormatter3.Serialize(Byte[]& bytes, Int32 offset, TCollection value)
at ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_DefaultResolver.Colibrium.Common.Ontology.Rating.RateClass$Formatter.Serialize(Byte[]& , Int32 , RateClass )
at ZeroFormatter.Formatters.CollectionFormatter3.Serialize(Byte[]& bytes, Int32 offset, TCollection value)
at ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_DefaultResolver.Colibrium.Common.Ontology.Rating.PackagePlan$Formatter.Serialize(Byte[]& , Int32 , PackagePlan )
at ZeroFormatter.Formatters.CollectionFormatter3.Serialize(Byte[]& bytes, Int32 offset, TCollection value)
at ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_DefaultResolver.Colibrium.Common.Ontology.Rating.Package$Formatter.Serialize(Byte[]& , Int32 , Package )
at ZeroFormatter.Formatters.CollectionFormatter3.Serialize(Byte[]& bytes, Int32 offset, TCollection value)
at ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_DefaultResolver.Colibrium.Common.Ontology.Rating.PackageGroup$Formatter.Serialize(Byte[]& , Int32 , PackageGroup )
at ZeroFormatter.Formatters.CollectionFormatter3.Serialize(Byte[]& bytes, Int32 offset, TCollection value)
at ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_DefaultResolver.Colibrium.Common.Ontology.Rating.Group.GroupRatingResults$Formatter.Serialize(Byte[]& , Int32 , GroupRatingResults )
at ZeroFormatter.ZeroFormatterSerializer.CustomSerializer1.Serialize[T](T obj)
at Colibrium.Utility.Library.ObjectConverter`1.ConvertO
bjectToBinaryZeroFormatter(T p_object)
in C:\TFS\UPMC\Repos\Colibrium.Utility.Library\ObjectConverter.cs:line 407
Looking at the source code for DynamicFormatter it appears the library tries to optimize formatting of your user types by generating CLR types at runtime to serialize / deserialize the user type to a byte array. Based on the error, it seems there must be a bug in this IL generation.
You should report this problem in the ZeroFormatter project issues but note you will likely need to have a good way to reproduce this issue, as tracking down an InvalidProgramException is very challenging.
In case you happen to have Application Insights in use, the exception may be thrown due to issue 18323 reported to .Net Core CRL
The issue is reported on .Net core, but I have also reported it on .Net Framework due to the solution seeming to work also there.
ApplicationInsights has moved towards a Preinstalled Site Extension model and does not have the offending bits anymore. In addition, the private Site Extension will not be updated as it is estimated to be deprecated within a month. You should be able to upgrade to the preinstalled site extension through the ApplicationInsights configuration in the AppService blade in Azure.
However, if you want an immediate solution for the private site extension, you can workaround the issue by removing the following two files in the site extension and restarting the site:
Instrumentation32\ProductionBreakpoints_x86.config
Instrumentation64\ProductionBreakpoints_x64.config
This will effectively remove the part of AppInsights extension causing issues.
As my first task working with vb.net, I was assigned the job of migrating a VB6 project over to vb.net using Visual Studio 2008. I am now working with Visual Studio 2017 and have gone through and cleared up all of the Upgrade Warnings that the conversion process gave me. The only remaining issues I have are with two instances of "Class Not Registered" Exceptions.
Things to note:
the original vb6 program was on a Windows XP machine. I am currently working on a Windows 7 64bit system.
I have read a couple of other posts here and here, but I haven't been able to solve my issue.
This warning is more specifically related to a Design view of a form
I believe the issue is probably something to do with a missing dll, as I had to move the source code to another computer to do the debugging.
Here is the call stack if anyone can help point me in the right direction:
Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
Instances of this error (2)
1. Hide Call Stack
at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.set_Site(ISite value)
at System.ComponentModel.Container.Add(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.PerformAdd(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.ComponentCodeDomSerializer.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.DeserializeStatementToInstance(IDesignerSerializationManager manager, CodeStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.Windows.Forms.Design.ControlCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.DeserializeName(IDesignerSerializationManager manager, String name, CodeStatementCollection statements)
Thanks for the help!
I have an SSIS package that retrieves a days worth of information from a data warehouse into a table in SQL Server and then exports that data to a flat file.
The package then generates a PDF report from the same data that was exported.
In order to export the PDF file, the report had to be created in SSRS and published to a URL the SSIS package could get to.
The package contains three connection managers, one to SQL Server, one to the Flat File and one to SSRS via an HTTP Connection Manager.
The HTTP Connection Manager allows me to create a connection to my SSRS instance and there is a button on that dialog that allows you to test the connection.
The connection tests correctly and I receive a success message.
I have done this exact thing in numerous other environments and it works correctly.
Some things to be aware of are, I created this package on another machine and copied it to numerous environments. Because of this, I use a configuration file to store many of the settings the package uses, file paths, login credentials and other things.
I also made sure that the connection settings were correct and that I could browse to the Report Server and view the report I am trying to download in SSIS.
When I execute the package, I receive the following error message from the package:
Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: Exception from HRESULT: 0xC001600E ---> System.Runtime.InteropServices.COMException (0xC001600E): Exception from HRESULT: 0xC001600E
at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSHttpClientConnection100.DownloadFile(String FileName, Boolean vbOverwriteDestination)
at Microsoft.SqlServer.Dts.Runtime.HttpClientConnection.DownloadFile(String fileName, Boolean OverwriteDestination)
--- End of inner exception stack trace ---
at Microsoft.SqlServer.Dts.Runtime.HttpClientConnection.DownloadFile(String fileName, Boolean OverwriteDestination)
at ST_6b197a6290df4aff91a6881078049a14.csproj.ScriptMain.Main()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()
That's about all I can think of that would be useful, but if you have any questions, I'll be monitoring this thread for a couple of hours.
Thanks.
I am following the steps as outlined on MSDN Blogs > ADO.NET team blog > Walkthrough: POCO Template for the Entity Framework.
I created a simple model in the Keith.Data Project (and Namespace). I created a Keith.Model Project and added it to the solution, dropped the Class.cs file, dragged and dropped the DataEntities.tt file into the Keith.Model project and added a reference to Keith.Model in my Keith.Data project. I then changed the path reference in the DataEntities.tt file from #"DataModel.edmx" to #"..\Keith.Data\DataModel.edmx". When I saved it I got this error:
Running transformation: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Unable to locate file
at Microsoft.VisualStudio.TextTemplating.VSHost.TextTemplatingService.ResolvePath(String path)
at Microsoft.VisualStudio.TextTemplating.VSHost.TextTemplatingService.ResolvePath(String path)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.VisualStudio.TextTemplating6A60439B68BD2BCE671B842FB15E35C4.GeneratedTextTransformation.DynamicHost.ResolvePath(String path)
at Microsoft.VisualStudio.TextTemplating6A60439B68BD2BCE671B842FB15E35C4.GeneratedTextTransformation.MetadataLoader.TryCreateEdmItemCollection(String sourcePath, String[] referenceSchemas, EdmItemCollection& edmItemCollection)
at Microsoft.VisualStudio.TextTemplating6A60439B68BD2BCE671B842FB15E35C4.GeneratedTextTransformation.MetadataLoader.CreateEdmItemCollection(String sourcePath, String[] referenceSchemas)
at Microsoft.VisualStudio.TextTemplating6A60439B68BD2BCE671B842FB15E35C4.GeneratedTextTransformation.TransformText()
at Microsoft.VisualStudio.TextTemplating.TransformationRunner.RunTransformation(TemplateProcessingSession session, String source, ITextTemplatingEngineHost host, String& result)
Anyone run into this and know what the problem is? I am sure I missed something but for the life of me I cannot figure out what.
TIA
I replicated the scenario you mentioned and got the same error when the Path to the .edmx file in POCO.tt (DataEntities.tt in your scenario) was wrong. Double check if the path you have specified is correct.
I use EF4/POCO but have all my entitites defined in code not an edmx so I'm not an expert in the approach you're using...
That said, a simple way to identify what the app is doing: download the sysinternals Proces Monitor and point it at VS - then have a look at what files it's trying to access (filter on DataModel.edmx). This will at least tell you where it's expecting the file to be - it's possible your relative path is incorrect.
I'm sure other devs with more experience in this topic can give you a better answer but this is how I'd approach solving it...
There are issue with using WebBrowser late bind calls related to object/property names generation.
For example:
WebBrowser1.Document.DomDocument.Forms.Myform.mycontrol.Value = "test"
will fail with more than one instance of the WebBrowser control
what actually happen is that mycontrol object become Mycontrol and compiled vb.net application will fail with error
Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))
at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType,
String name, Object[] args, String[] paramnames, Boolean[] CopyBack)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance,
Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames,
Type[] TypeArguments, Boolean[] CopyBack)
at Execute() in C:\Projects\WebBrowser\SampleCall.vb:line 16
Is there are any solutions for this issue?
Same code will work with vb6 app with multiple WebBrowser controls
Edit: This code is comipled with: Option Strict Off
#bugtussle
Next assignments will work:
WebBrowser1.Document.Forms("Myform").Children("mycontrol").InnerText = "test"
WebBrowser1.Document.DomDocument.Forms("Myform").all("mycontrol").Value = "test"
WebBrowser1.Document.DomDocument.Forms.Myform.all.mycontrol.Value = "test"
The problem with this approach that is required to change and retest a lot of code
If you take a look into Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet method using reflector utility, you can find that BindingFlags.IgnoreCase flag is used in binder.InvokeMember call.
I do undestant that this call is done through COM, and was reading somewhere that COM interop is using one version of name in a lookup table. Like if parameter name was initially entered into that table as "MyControl" than this version will be used, not "mycontrol". I think because of that later on InvokeMember is failing to find correct member.
Try setting the value a different way:
WebBrowser1.Document.Forms("Myform").children("mycontrol").Value = "test"