Setting VC++ directories in VS 2010

本文转自http://blog.tinybrowser.net/archives/2051,谢谢作者分享。

 

In VS 2010, Tools/Options does not have a VC++ directories tab (where you normally set the include/lib search folders). Instead if you take project settings for a C++ project, you’ll see VC++ Directories listed under Configuration Properties. Of course these are per project and NOT per user (as in VS 2008). If you want to change it for the current user globally, bring up the Property Manager and then you’ll see various property sheets under Debug and Release (there may be more configurations on your machine). Just edit the property sheet named Microsoft.Cpp.Win32.user and now you’ll have set it globally for your user for that specific configuration.

More:

 


### AppContext in .NET Framework Usage and Examples In the context of the .NET framework, `AppContext` serves a critical role in managing application settings that affect runtime behavior. These settings include base directories for assembly resolution, culture information, and other environment-specific configurations. #### Understanding AppContext `AppContext` provides methods to set and retrieve properties specific to an application domain or process. It allows developers to configure various aspects of how their applications interact with the underlying platform without modifying source code directly[^1]. For instance, when transitioning from older versions like `.NET Core 3.1` to newer ones such as `.NET 5`, changes made within project files impact how certain features operate under different environments. With these updates comes enhanced support for specifying operating system dependencies explicitly through extended target frameworks descriptions. However, while this does relate broadly to configuring apps via configuration mechanisms including those provided by `AppContext`, direct interaction between `AppContext` and setting OS-level targets isn't typically highlighted. #### Practical Example Using AppContext Below demonstrates how one might utilize `AppContext.SetSwitch()` method which sets switches controlling internal behaviors: ```csharp using System; class Program { static void Main() { // Set switch before any assemblies are loaded. AppContext.SetSwitch("System.Net.Http.UseSocketsHttpHandler", false); Console.WriteLine($"Using SocketsHttpHandler: {AppContext.TryGetSwitch("System.Net.Http.UseSocketsHttpHandler", out bool result)}"); } } ``` This example shows disabling the default HTTP handler (`SocketsHttpHandler`) introduced starting with .NET Core 2.1 in favor of reverting back to the previous implementation (`HttpClientHandler`). Such adjustments can be crucial depending upon compatibility requirements across varying platforms supported post-.NET 5 release scenarios where multi-platform considerations become increasingly important due to expanded targeting capabilities mentioned earlier. --related questions-- 1. How do configuration options differ between .NET Framework and later unified .NET releases? 2. What types of issues could arise from improper handling of event invocations similar to what was shown incorrectly at [^3] ? 3. Can you provide examples demonstrating proper dependency injection patterns utilizing `RequestServices` property discussed in reference two? 4. Are there notable differences in open-source projects developed using VC++/MFC compared to modern C#/.NET counterparts listed in background material found elsewhere? 5. In what ways has evolving target framework syntax impacted cross-platform development efforts especially concerning mobile devices as alluded to previously regarding future plans around .NET 6?
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值