Win7上的C#表单代码!!!!!! [英] c# form code on Win7 !!!!!!

查看:51
本文介绍了Win7上的C#表单代码!!!!!!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Win7上运行c#表单代码

无需安装Visual Studio

How to run c# form code on Win7

without instalation of Visual Studio

推荐答案

您不必安装Visual Studio.网络框架就足够了. Net Framework 3.5包含在Windows 7中,因此,如果您以它(或之前的版本)为目标,那么一切都应该很好.如果您使用的是较新的框架,则应先安装它.如果您使用的是安装程序,则可以通过将其作为先决条件来完成.

关键是要从debug或release目录中获取已编译的二进制文件,然后通过复制或使用更高级的技术(例如ClickOnce)来分发它们.

如果您使用具有很多特权的凭据开发了程序,则必须考虑UAC.有关更多信息,请参见: http://msdn.microsoft.com/en-us/library/bb756973. aspx [ ^ ].即使该主题是针对Vista的,这些想法也适用于Windows 7.
You don''t have to install Visual Studio. Net framework is adequate. Net framework 3.5 is included with Windows 7 so if you''re targeting it (or previous) then everything should be fine. If you''re using a newer framework, then it should be installed first. If you''re using a setup program, this can be done by making it a prerequisite.

The key thing is that you take the compiled binaries from your debug or release directory and distribute them either by copying or with some more advanced techique (for example ClickOnce).

If you have developed the program with credentials with lots of privileges you must take the UAC into account. For more information, see: http://msdn.microsoft.com/en-us/library/bb756973.aspx[^]. Even though the topic is for Vista the ideas apply also to Windows 7.


除了Mika的正确回答:甚至不需要Visual Studio从源代码构建程序集. .NET Framework包含(免费重新分发)所有需要构建的内容:C#和VB.NET编译器,MSBuild等.您可以仅使用编译器命令行来构建所有内容,也可以使用以下项目或解决方案文件来构建它: MSBuild.EXE.有关更多详细信息,请参见每个工具的帮助.



很高兴知道Visual Studio不构建任何.NET项目.而是运行在.NET Framework中找到的MSBuild(可能间接通过代码DOM),并将输出重定向到IDE.您还可以使用Code DOM创建应用程序,该程序将使用C#或VB.NET源代码制作一个项目,并进行编译和运行.除了.NET Framework可再发行组件包之外,此应用程序不需要任何先决条件.

请参阅 http://msdn.microsoft.com/en-us/library/y2k85ax6.aspx [ ^ ].

—SA
In addition to the correct answer by Mika: Visual Studio is not even needed to build the assemblies from the source code. All you need to build it is included in (freely redistributable) .NET Framework: C# and VB.NET compilers, MSBuild, etc. You can either build it all using just a compiler command line, or build by a project or solution file using MSBuild.EXE. For more detail, see the help on each of those tools.



It''s good to understand that Visual Studio does not build any .NET projects; instead, it runs MSBuild found in .NET Framework (maybe indirectly, via Code DOM) and redirects outputs to IDE. You also can create application using Code DOM which would make a project out of C# or VB.NET source code, compile and run it. This application would not require any prerequisites except .NET Framework redistributable package.

See http://msdn.microsoft.com/en-us/library/y2k85ax6.aspx[^].

—SA


制作项目的安装文件,并将其安装到具有.NET Framework的任何PC上.您可以在没有Visual Studio的情况下运行它.
make setup file of your project and install it to any PC having .NET Framework. You can run it without having Visual Studio.


这篇关于Win7上的C#表单代码!!!!!!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆