VS2017 Could not load file or assembly Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll or one of its dependencies

I had a similar issue (with the additional message The “BuildShadowTask” task failed unexpectedly) with a project originally developed with VS2010, and got to spend the last few hours learning about yet another legacy facet of the build process. There is a good chance that you are dealing with private accessor files (.accessor), which were … Read more

How to access a specific cell value of a datatable

If you need a weak reference to the cell value: object field = d.Rows[0][3] or object field = d.Rows[0].ItemArray[3] Should do it If you need a strongly typed reference (string in your case) you can use the DataRowExtensions.Field extension method: string field = d.Rows[0].Field<string>(3); (make sure System.Data is in listed in the namespaces in this … Read more

How to get the value of built, encoded ViewState?

Rex, I suspect a good place to start looking is solutions that compress the ViewState — they’re grabbing ViewState on the server before it’s sent down to the client and gzipping it. That’s exactly where you want to be. Scott Hanselman on ViewState Compression (2005) ViewState Compression with System.IO.Compression (2007)

Creating Reports in ASP.Net with Entity Framework

Below is a quick sample of how i set the report datasource in one of my .NET winForms applications. public void getMyReportData() { using (myEntityDataModel v = new myEntityDataModel()) { var reportQuery = (from r in v.myTable select new { l.ID, l.LeaveApplicationDate, l.EmployeeNumber, l.EmployeeName, l.StartDate, l.EndDate, l.Supervisor, l.Department, l.Col1, l.Col2, ……., ……., l.Address }).ToList(); reportViewer1.LocalReport.DataSources.Clear(); … Read more

Adding NUnit to the options for ASP.NET MVC test framework

After a bunch of research and experimentation, I’ve found the answer. For the record, the current release of nUnit 2.5 Alpha does not seem to contain templates for test projects in Visual Studio 2008. I followed the directions here which describe how to create your own project templates and then add appropriate registry entries that … Read more

Connection problems with SQL Server in ASP.NET applications using out-of-process session state

Transport level errors are often linked to the connection to sql server being broken … usually network. Timeout Expired is usually thrown when a sql query takes too long to run. So I would troubleshoot the link to your Sql Server and then monitor to see what queries are timing out. Sounds like a SQL … Read more

Where cookies are stored in system?

IE and Windows keeps cookies here: %AppData%\Microsoft\Windows\Cookies Points to the same directory as @Sohnee’s does under Windows Visa and newer, but his doesn’t under Windows XP and earlier, my – does. also Temporary Internet Files can contain some cookies. Meanwhile Firefox keeps cookies into SQLite database under profile root: %AppData%\Mozilla\Firefox\Profiles\%FirefoxProfile%\cookies.sqlite To read the data you … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)