GetExportedValue cannot be called before prerequisite import has been set?
We are using MEF in a WPF application. And we are getting this error:GetExportedValue cannot be called before prerequisite import 'MyNamespace.MyMainClass..ctor (Parameter="myParameter",...
View ArticleHow to deploy assembly 32 from installer 64 ?
Hi,I have 2 assemblies 32 and 64. I want to put them in GAC folder in Deployment project target x64. I already put them in GAC folder. When I try to install, I got error 2908 and after click OK, it...
View ArticleRandom 4 groups from one Group (Playing Cards Game)
Hi , I want to make playing cards game . I give every card a number from 1 to 52 now I need give cards to 4 players (every player has 13 cards) . so how I can make random 4 groups (every groups contain...
View ArticleRetrieving the COM class factory for component with...
application type- C#, Web ApplicationCOM component- Excel reference added to bin folder:-Microsoft.Office.Interop.ExcelIt is working on local environment but giving error in server environment.
View ArticleAddress array element and thread-safe
Hello!I have red that access to different element of array is thread-safe, but to same is not.But why this code work without any trouble? var array = new int[1]; Parallel.For(0, 10000000, i =>...
View ArticleUnable to create file from Application_Start() event.
Hi,(Sorry if this is in the wrong forum, but I couldn't find a better one.) I have some code which attempts to create and write to a log file in a subdirectory of my website (shown below). If I put the...
View ArticlePOS for Net updates
So the last update to the pos for net installer was in 2008.today we have .net 4.5 and pos for net is requiring the install of .net 2 and changes to application config files to work.is anyone at...
View ArticleReading Binary Format (QBasic) with C#
I have a binary file with data stored in an old format [Microsoft Binary Format (QBasic)]The file is configured like this-----------------------------------------------------Start Byte | End Byte |...
View ArticlePrinting Directly to Printer
I have a client that has a process which builds a text file. This text file contains commands that is used by their thermal printer,...
View ArticlePreventing function from being called using reflection
HiHow can we prevent a function to be called using reflection ? From what i noticed is that event private function can be called using reflection, so is there anyway we can restrict even that ?
View Articleunable run a batch file using .net code at server
Hi,while i execute solution to form an batch file in which psftp is called to pull files from server using .net code,It works fine with my local machine. but at server nothing is happening.Can anyone...
View ArticleMessageBox.Show in .NET 4 versus .NET 2
I have an odd problem with .NET COM interop where MessageBox.Show doesn't display the message box if I am using .NET 4. It works fine with .NET 2 (I am changing the setting in the VS 2012 project I...
View ArticleParalell getting information from array
Hello!I have some shell of array and several write and read methods. I want to get it thread-safe and have opportunity to get data from different threads at the same time.For example:class MyClass {...
View ArticlePlease help!! Having a problem with my web.config file
Hello!I am getting an error inside Visual Studio and can't run my applications anymore. The error says could not load file or assembly 'Microsoft.Data.Edm' or one of it's dependencies. I really need...
View ArticleWebBrowser control Memory Leak
I created an .NET C#application to continuously creating and closing WebBrowser control for testing. I noticed that my application memory usage has been going up per WebBrowser control.I looked though...
View ArticleLanguage Neutral Attribute is not supported in .net framework 4.0
We have a .NET class library which contains "Language Neutral" attribute in AssemblyInfo.VB file as shown below...assembly:AssemblyCulture("Language Neutral")When I reference this library in .NET 3.5...
View ArticleCompiling and executing code using anonymous types with VBCodeProvider fails
Using VBCodeProvider I am trying to compile and execute a block of VB code that performs a LINQ query and then processes the results. Two problems: 1. The code will not compile unless the anonymous...
View ArticleProgrammatically Disable or Set GPO to Not Configured
Looking for a programmatic solution that has the same effect as setting the "Configure Windows NTP Client" state in GPOEAdministrative Templates > System > Windows Time Service > Time...
View ArticleNew interfaces IReadOnlyList and IReadOnlyDictionary
Hello,I apploud to the long-awaited intoduction of interfaces for read-only collections.However, I also have some questions. First of all, why there's no general IReadOnlyCollection interface. public...
View Article