简体   繁体   English

针对微型应用程序瞄准.NET 2.0

[英]Targeting .NET 2.0 for a tiny app

I have a really small app that I put together in VS 2008 Express to try out .NET development for the first time. 我有一个非常小的应用程序,我在VS 2008 Express中首次尝试.NET开发。

I want to send it to a couple of friends, however when I installed this on a second computer it went and downloaded the whole .NET 3.5 runtime, and I don't wish to force anyone to do this. 我想把它发送给几个朋友,但是当我在第二台计算机上安装它时,它就下载了整个.NET 3.5运行时,我不想强​​迫任何人这样做。 My mistake as the default setting targets .NET 3.5. 我作为默认设置的错误针对的是.NET 3.5。

I went back and changed the project settings to target .NET 2.0. 我回去并将项目设置更改为目标.NET 2.0。 There's no LINQ, no collections, nothing complicated. 没有LINQ,没有收藏,没有什么复杂的。 This may seem a silly question but: 这似乎是个愚蠢的问题,但是:

Will a simple application that targets .NET 2.0 install and run with absolutely no problems on a machine with .NET framework > 2.0? 一个针对.NET 2.0的简单应用程序是否会在.NET框架> 2.0的机器上安装和运行时完全没有问题?

Yes; 是; .NET 3.0 and 3.5 are actually extensions to 2.0; .NET 3.0和3.5实际上是2.0的扩展 ; 2.0 code will with a few edge cases work unchanged. 2.0代码将使一些边缘情况不变。

Note that you can use LINQ-to-Objects on .NET 2.0 (via C# 3.0) with LINQBridge . 请注意,您可以使用LINQBridge在.NET 2.0上使用LINQ-to-Objects(通过C#3.0)。

是的,这将在任何具有.NET 2.0 / 3.0或3.5的计算机上运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM