.net-4.0

Visual Studio 2010 .NET framework 3.5 unavailable

。_饼干妹妹 提交于 2019-12-22 10:27:19
问题 I have installed Visual Studio 2010 Professional, and despite my tremendous urge to work on it since it is pleasing to the eye, it seems not to support .NET framework 3.5/3.0. Therefore, I have switched to Visual Studio 2008 rather relunctantly. How do I add .NET framework 3.0/3.5 to the top right combo box within the make new project? (Note: In the top right combo box within the make new project, I have only .NET framework 4.0 available.) 回答1: It should just work absolutely fine - but it

Use classes from another MEF assembly without referencing to it

最后都变了- 提交于 2019-12-22 10:06:49
问题 I have 2 MEF components. Let it be component A and component B. What I need is to be able to access a class from component B in component A without referencing to it. Then I would like to instantiate object of the class manually. Currently I see MEF allows instantiating an object automatically using [Import]. It uses interface which requires to be referenced to. Can I use data types from another assemblies without referencing to it? Is there such mechanism supported by MEF? 回答1: There are a

Communication between two WPF applications

我的梦境 提交于 2019-12-22 09:39:29
问题 I have two WPF applications, I need these two applications to be able to communicate with each other. I just need these applications to send some notifications to each other and nothing more. I have found two techniques yet, one is using WCF, and another is using DDE. But to me these seems too much complicated for my requirement. Please suggest what is the simplest way to go about this? What other options I have? 回答1: If they are both on the same network(otherwise you need to port foward the

MEF: difference between GetExportedValue and SatisfyImports

假装没事ソ 提交于 2019-12-22 08:34:50
问题 We're using MEF (.NET 4, can't use 4.5 at the moment) in a MVVM application. Everything was fine until we needed to create models on the fly, for instance editable rows of a table. I didn't want to run into memory leaks, I found this article http://pglazkov.blogspot.ch/2011/04/mvvm-with-mef-viewmodelfactory.html and I discovered an unexpected behavior that I would like to understand. This is an Item added to the Shell.Items observable collection: [PartCreationPolicy(CreationPolicy.NonShared)]

URL rewriting in .NET 4?

情到浓时终转凉″ 提交于 2019-12-22 08:33:49
问题 I heard that in Visual Studio 2010 give built-in functionality for URL rewriting using its URL Routing engine. I did URL rewriting in earlier version of visual studio by using plug in like intelligencia urlrewrite. Can any one explain me or guide me to understand that? Want to implement dynamic and custom url rewriting in my website. 回答1: Are you refering to .net 4.0 URL Routing ? URL routing was a capability we first introduced with ASP.NET 3.5 SP1, and which is already used within ASP.NET

Could not load type 'System.Reflection.IntrospectionExtensions' from assembly 'mscorlib

谁说胖子不能爱 提交于 2019-12-22 08:29:58
问题 I'm using Unity IoC (Microsoft.Practices.Unity) and I can compile fine, but I'm getting the following error at run time: Could not load type 'System.Reflection.IntrospectionExtensions' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The Unity version is: 3.0.1026.0 Is there a compatibility problem between .Net 4 and this version of Unity. Also, I get the same error when using Unity v2. If so, how might I go about resolving this issue? EDIT: Also, I

IoC is not initialized on Win7/XP

南楼画角 提交于 2019-12-22 08:29:06
问题 I'm facing a quite strange problem trying to run a WPF application on Win7/XP. The WPF application targets .NET 4.0 and it references Caliburn.Micro 1.5.2 and Autofac 3.1.0 . I'm going to start with a summary of the problem and then I'm going to give details about what I've got so far. OVERVIEW In my dev workstation I have Windows 8 and Visual Studio 2012. I'm using Caliburn and Autofac as described in this post (basically a simplified version of this). When I build and run the application in

Could not load type 'System.Reflection.IntrospectionExtensions' from assembly 'mscorlib

你说的曾经没有我的故事 提交于 2019-12-22 08:29:01
问题 I'm using Unity IoC (Microsoft.Practices.Unity) and I can compile fine, but I'm getting the following error at run time: Could not load type 'System.Reflection.IntrospectionExtensions' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The Unity version is: 3.0.1026.0 Is there a compatibility problem between .Net 4 and this version of Unity. Also, I get the same error when using Unity v2. If so, how might I go about resolving this issue? EDIT: Also, I

PartCover 4.0 Only Reports NUnit Libraries

我是研究僧i 提交于 2019-12-22 07:59:13
问题 I'm using PartCover 4.0 (from the sourceforge page, latest dev build) with NUnit 2.5.8 on Windows 7 (x64). PartCover runs ok (using the -x86.exe), but it only shows me coverage for various NUnit packages -- not my own source-code. I originally didn't use CorFlags.exe since I didn't get the COM error; I tried it anyways, and it didn't make any difference. I've looked at all the other questions on Stack Overflow, and none seem to apply; I'm using PartCover 4.0, there are no spaces in any of my

SecurityException - Dapper on shared hosting

回眸只為那壹抹淺笑 提交于 2019-12-22 05:58:07
问题 For my current project I use Dapper. Everything perfect. Then I needed to deploy it on shared hosting. The result can be seen here (copied YSOD): Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Request for the permission of type