I would like to start an external process on the device and would like to capture its output. All the googling showed ProcessStartInfo.RedirectOutput - but it seems like this option is missing in .net compact framework.
Any ideas how this could be solved ?
I've solved this problem by using the memory mapped file from the OpenNETCF.IO project to get data from the called process back to the calling process.
Here is the link to the library: http://www.opennetcf.com/library/sdf/
Related
Using lucene 5.4.1 I am trying to use the AnalyzingInfixSuggester to build a suggestion library and I'm running into an issue where I am unable to load that suggester. I have one process that builds an index out of my data and I have another process(web service) that returns data by searching against that index. However, when I try to open the index, I get nothing from suggester.getCount()
I am calling commit() on my suggester after writing to the directory. On the file system, the files in the directory in question contain about 5.8M of data. However, when I open it to make a search from the web service, I get nothing. I tried calling build and refresh just in case I needed to do that to initialize and still get nothing.
I feel like I'm missing something. Can someone please point me in the direction of some example code that actually reads the suggestion documents from a file system directory?
The answer was much simpler than I thought. A compound of forgetting that my index was built on my machine while the service was running on a vagrant instance. Wrote to a shared directory, removed calls to refresh and build and it works. So to recap, all that is necessary is to construct the suggester by passing the directory and analyzer and it works as expected.
I have a VB6 project I need to migrate to VB.NET.
I tryied with both the migrating tool of VB.NET express 2005 and 2008 with the same result.
When I try to open a form in designer mode containing a videosoft's vsindextab component in the resulting project of the migration, I receive the following error:
Warning 1 Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME)) C:\gestionbtdotnet\FormBT.Designer.vb 261 0
The line in error is in the designer.vb file and is the following:
CType(Me.vsIndexTab1, System.ComponentModel.ISupportInitialize).BeginInit()
(The vsIndexTab being a vsOcx6lib.vsindextab object)
I searched all over the web about it but couldn't find anything.
I tryied using a different .NET Framework version, I tryied copying the ocx file (vsocx6.ocx) to every possible places, I tryied simply erasing the line in error.
No luck.
Can anyone help me?
You can only migrate code. Projects that depend on third-party components that are binary-only and not .Net compatible (like the vsindextab component used here) will not migrate. Here are your options:
Check with the original vendor for a .Net version of the same component.
Find another .Net-compatible replacement for the component, and re-write code to use the new replacement.
Rewrite existing code to avoid using the component anywhere at design time. Factor that section out to it's own library that you can invoke at run-time only. Then build custom dllimport code to use that library at run time.
Write your own replacement for the component, relying on existing .Net widgets.
I am having a very hard time making RavenFS behave properly and was hoping that I could get some help.
I'm running into two separate issues, one where uploading files to the ravenfs while using an embedded db inside a service causes ravendb to fall over, and the other where synchronizing two instances setup in the same way makes the destination server fall over.
I have tried to do my best in documenting this... Code and steps to reproduce these issues are located here (https://github.com/punkcoder/RavenFSFileUploadAndSyncIssue), and video is located here (https://youtu.be/fZEvJo_UVpc). I tried looking for these issues in the issue tracker and didn't find something directly that looked like it related, but I may have missed something.
Solution for this problem was to remove Raven from the project and replace it with MongoDB. Binary storage in Mongo can be done on the record without issue.
When I debug the following code, I receive the message "System.TypeLoadException was caught" when I perform the Delete().
Using db As New ScholarshipEntities
db.ApplicationHistories.Where(Function(h) h.HistoryTypeId = 0).Delete()
db.SaveChanges()
End Using
I am using EF 6.1 in Visual Studio 2013. I also have the EntityFramework.Extended library installed.
I have no trouble querying results. I thought the bug might occur when the Where method has no results, but that is not the case. I also have no problem adding new models (.edmx), which was a problem some people with this exception had.
I just recently upgraded to EF 6.1 and installed the Extended library. This is my first time using one of the extended methods. I've un-installed and re-installed the nuget packages with no success.
IntelliTrace shows the following exceptions from the Delete() call (in order):
'EntityFramework.Reflection.DynamicProxy' does not contain a definition for 'InternalQuery'
Cannot implicitly convert type 'EntityFramework.Reflection.DynamicProxy' to 'System.Data.Entity.Core.Objects.ObjectQuery<Scholarship.ApplicationHistory>'
Could not load type 'System.Data.Entity.Core.Mapping.EntityContainerMapping'
I've added an issue on the Extended library's github.
Update
I've reinstalled EF and the EF.Extended library with no luck. I am able to use RemoveRange in its place. I am able to create a new project, install the packages, add a model mapped to the same database, and successfully use Delete. Obviously, the problem is in my current solution.
In my solution, I have an ASP.NET project and a regular library project. In the ASP project, a page's code behind calls a method in the library RemoveHistory. The library contains classes for the business logic and data access. Both classes implement interfaces. The actual Delete occurs in the data access class. My model also resides in this library project.
I may be able to create a completely new project and bring everything over, but that will take quite some time. Even if I did, I want to understand why it doesn't work in the first place, so that I don't have to repeat this process.
If you want to delete certain rows do it like that:
Using db As New ScholarshipEntities
db.ApplicationHistories.RemoveRange(db.ApplicationHistories.Where(Function(h) h.HistoryTypeId = 0))
db.SaveChanges()
End Using
If you want to remove single entity do it like that:
Using db As New ScholarshipEntities
db.ApplicationHistories.Remove(db.ApplicationHistories.Single(Function(h) h.HistoryTypeId = 0))
db.SaveChanges()
End Using
I "solved" the issue some time ago. I'll eventually go back to try and reproduce the problem to confirm my suspicions.
There were multiple versions of Entity Framework installed in the solution. This didn't appear to affect basic EF functionality, though I'm sure it did in some subtle, potentially buggy fashion.
Every time the solution was opened, NuGet would state that it couldn't complete uninstallation. Uninstalling and restoring via NuGet was unsuccessful, and the packages had to be deleted manually. Once completely removed, I installed the packages again. This resolved the issue.
I wish I could give a more technical answer, though the basic reason was forgetting to look closer at the packages folder and configuration.
I'm attempting to create a new project similar to the SDK project basicoperations for Dynamics CRM 2011. I am using the myorganizationcrmsdktypes.vb file included with the SDK helper code, but when I attempt to build the code I get tons of errors in myorganizationcrmsdktypes.vb and I'm not sure why. The errors look like this:
Type 'Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute' is not defined.
The code works fine when run in the original project, just not in mine?
Add a reference to: Microsoft.Xrm.Sdk (/sdk/bin/microsoft.xrm.sdk.dll)
Also add another reference to: System.Runtime.Serialization
Additionally in your project settings - try clearing the Root namespace
Have you tried your code on a different machine? This is less of a CRM issue and more of a .net issue. If your vb project has a reference to the Microsoft.Xrm.Sdk dll but yet your code can't find the classes within it, I'm almost wondering if something is corrupt.
I'd try recreating the solution / project. I'd also try doing a ctrl-. (control period) to see if VS can resolve it for you...