简体   繁体   English

无法在Visual Studio中构建C#项目

[英]Cannot build C# project in Visual Studio

I am an experienced developer who is completely new to C# and windows development. 我是一位经验丰富的开发人员,对C#和Windows开发完全陌生。

I would like to contribute to Rocksmith custom song creator with a simple feature, but I don't even know how to build and run the project in Visual Studio 2012. I cloned the git repository, double clicked on devtools/devtools.csproj then Debug -> Start Debugging but I get an error about not being able to start a class directly. 我想用一个简单的功能为Rocksmith自定义歌曲创建者做贡献,但我甚至不知道如何在Visual Studio 2012中构建和运行该项目。我克隆了git存储库,双击devtools/devtools.csproj然后Debug -> Start Debugging但是我收到一条关于无法直接启动类的错误。

You can browse the source code of the project at: https://code.google.com/p/rocksmith-custom-song-creator/source/browse/ 您可以在以下网址浏览项目的源代码: https//code.google.com/p/rocksmith-custom-song-creator/source/browse/

From what I can tell, you have selected a sub-project in your solution to be the starting-project. 据我所知,您已在解决方案中选择了一个子项目作为启动项目。
See, if there is project that defines a Window (WinForms or WPF), right-click this project and select it as starting project. 请参阅,如果有项目定义了一个Window(WinForms或WPF),请右键单击该项目并将其选为启动项目。


From MSDN 来自MSDN

You can specify which project or projects within a multi-project solution Visual Studio will build and debug first. 您可以指定Visual Studio将首先构建和调试的多项目解决方案中的哪个或哪些项目。

To set a single startup project 设置单个启动项目

  1. In Solution Explorer, select the desired startup project within your solution. 在Solution Explorer中,在解决方案中选择所需的启动项目。
  2. On the Project menu, choose Set as StartUp Project. 在项目菜单上,选择设置为启动项目。

.csproj只是一个项目,您需要将其放入解决方案(或打开包含的解决方案,如果有的话)

Do you have a .sln file? 你有.sln文件吗? Probably that's the one you must open. 可能那是你必须打开的那个。

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

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