简体   繁体   English

在服务器上编译C#代码

[英]Compile C# code on server

I am using a remote windows VM to edit/develop a survey system. 我正在使用远程Windows VM来编辑/开发调查系统。 Using Microsoft Visual Web Developer 2010 Express as my IDE. 使用Microsoft Visual Web Developer 2010 Express作为我的IDE。 I want to compile this project but the option is disabled. 我想编译这个项目,但该选项被禁用。 I'm not even sure if it has to be compiled, though. 不过,我甚至不确定是否需要编译。

(A) Is it possible this is being compiled on runtime? (A)是否有可能在运行时编译?

(B) Is there a way to check if this is working correctly? (B)有没有办法检查这是否正常工作?


This is the master folder: 这是主文件夹:

应用程序的主文件夹

And this is the App_Code folder: 这是App_Code文件夹:

App的App_Code文件夹

When I have the any file open, the Debug > Start Debugging (F5) option is disabled and there are no other “Compile” options. 当我打开任何文件时, Debug > Start Debugging (F5)选项被禁用,并且没有其他“Compile”选项。 I've tried compiling everything as a folder and don't think that worked either. 我已经尝试将所有内容编译为文件夹,并且不认为这也有效。

Thank you in advance. 先感谢您。

~ EDIT ~ 〜编辑〜

The Solutions Explorer Window looks like this: Solutions Explorer窗口如下所示:

Solutions Explorer窗口

RESOLVED 解决

The server automatically compiles the code on run. 服务器在运行时自动编译代码。

Thank you @Ňuf 谢谢你@Ňuf

I'm suspicious that you are missing project file. 我怀疑你缺少项目文件。 If this is the case, go to File->New Project->ASP.NET Web Application->OK and then in Solution Explorer right-click on project->Add->Existing Item and select all files that you created earlier, to add them to the project. 如果是这种情况,请转到File-> New Project-> ASP.NET Web Application-> OK,然后在Solution Explorer中右键单击project-> Add-> Existing Item并选择之前创建的所有文件,将它们添加到项目中。 After that, menu item Debug->Start debugging should be available. 之后,菜单项Debug-> Start debugging应该可用。

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

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