.net-3.5

How to deploy a COM

核能气质少年 提交于 2019-12-23 02:52:27
问题 I just finished building my new COM project (C#, .NET 3.5). This project will be called by a VFP application. It's working great on my development machine, but now I need to know how to deploy it on the user's machine. Click Once isn't available for this kind of project, so I guess I'm stuck with manually distributing the DLL. So, where should I put the DLL and how do I register it? BTW, the 3.5 framework is already installed on the user's machine. TIA 回答1: I've really never used RegSvr32

Way to automate setting of MergeOptions

你。 提交于 2019-12-23 02:47:15
问题 I am looking for an automated way to iterate over all ObjectQueries and set the merge option to no tracking (read only context). Once i find out how to do it i will be able to generate a default read only context using a T4 template. Is this possible? For example lets say i have these tables in my object context SampleContext TableA TableB TableC I would have to go through and do the below. SampleContext sc = new SampleContext(); sc.TableA.MergeOption = MergeOption.NoTracking; sc.TableB

ASP.NET MVC 2 with .NET 3.5 on IIS 6

谁都会走 提交于 2019-12-23 01:55:09
问题 Good day to you, I would like to ask you one question that has been my major problem in past few days. I am developing an ASP.NET MVC 2 application. Server runs IIS 6 with wildcard mapping enabled. It works when I'm displaying home page. But when I click a link to navigate me to other pages i get 404 exception. Server runs .net 3.5 SP1 . I don't know where I'm making a mistake . Please help me . Thank you for your answers. 回答1: Have you also cleared the 'check that file exists?' checkbox on

BindingList with my class populating a ComboBox using a property of it?

眉间皱痕 提交于 2019-12-22 22:59:12
问题 I have a BindingList with my class where I would like to populate a ComboBox using a property of it so when my list changes the ComboBox would change as well. public class UserAccess { public override string ToString() { return Access; } public int AccessId { get; set; } public string Access { get; set; } public List<string> Command = new List<string>(); public bool HasCommand(string cmd) { return this.Command.Any(x => x == cmd); } } public BindingList<UserAccess> accessList = new BindingList

keep LinqToSQL sync with the database

百般思念 提交于 2019-12-22 18:56:15
问题 I am going to develop a new website with asp.net 3.5 and LinqToSQL. For maintainability purposes, how can I modify a Linq class if an attribute is added to a table in the database ? Thank you. 回答1: Unfortunately LinqToSQL does not have synchronization support in Visual Studio. The options are: Remove the table and add it again. Of course any customization changes are lost Edit the .dbml file file directly and add the attribute. The file has xml content and when saving it will regenerate the

Custom Serialization using XmlSerializer

梦想与她 提交于 2019-12-22 18:16:11
问题 I have a class that I need to do some custom XML output from, thus I implement the IXmlSerializable interface. However, some of the fields I want to output with the default serialization except I want to change the xml tag names. When I call serializer.Serialize, I get default tag names in the XML. Can I change these somehow? Here is my code: public class myClass: IXmlSerializable { //Some fields here that I do the custom serializing on ... // These fields I want the default serialization on

Excel VSTO Add-in error - application domain could not be created

可紊 提交于 2019-12-22 18:05:09
问题 I have an Excel VSTO Add-in that is not installing on one of my users machines. It installs fine on everyone else's machine so far (8 machines), but on this one specific machine it is giving the following error message. Customization could not be loaded because the application domain could not be created. ************** Exception Text ************** Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateCustomizationDomainException: Customization could not be loaded because the

AutoMapping custom Generic Types - How?

吃可爱长大的小学妹 提交于 2019-12-22 12:46:05
问题 hey guys, I'm using automapper version 1.1.0.188 In my AutoMapper.Configure I'm mapping Entities to DTOs and vice versa, like so: // entity >> DTO Mapper.CreateMap<MetaTemplate, MetaTemplateDTO>(); Mapper.CreateMap<Person, PersonDTO>(); // DTO >> Entity Mapper.CreateMap<MetaTemplateDTO, MetaTemplate>(); Mapper.CreateMap<PersonDTO, Person>(); When I do the below mappings (and vice versa) everything works fine Mapper.Map<entity, entityDTO>(entity); Mapper.Map<List<entity>, List<entityDTO>>

Reference a .net 3.5 assembly in a Script Task in SSIS 2005?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-22 11:31:53
问题 I've got this to work using a very basic example(outlined below) and I want to see if other SOers have experience doing what I'm attempting...using a 3.5 framework assembly in a Script Task in SSIS 2005. I've basically followed the page found here... except I targeted the 3.5 framework while in Visual Studio 2008. Write/compile your code (targeted the 3.5 framework) Just some simple Linq so that I'm using a greater than 2.0 framework feature using System; using System.Collections.Generic;

How to register form for WM_DEVICECHANGE message in windows mobile

a 夏天 提交于 2019-12-22 11:26:49
问题 I am using C# .NET 3.5 Compact Framework to write code.. please can any one tell me how do i register a form for WM_DEVICECHANGE and how to handle that message in WindowProc .. if I do this I get intimation of device hardware change.. I m not getting how to write please tell. Thanks 回答1: The key is to create a class deriving from NativeWindow, give this the handle of your form to call AssignHandle with, and override the WndProc function (allowing you to do what you want with WM_DEVICECHANGE).