当我使用. net Framework 4.0 MSBUILD.EXE文件编译我的.csproj文件时,我得到一个错误:“lable01”没有在“website01.csproj”的当前上下文中找到。
实际上,我需要添加每一个ASP。NET页面及其代码隐藏文件的引用。我已经做到了,它工作得很好,但上面的错误是悬而未决的。
我希望这意味着我需要在.csproj文件中添加表单名称“LABLE01”,但我不知道语法。谁能告诉我在。csproj文件中添加表单名的语法。
当我使用. net Framework 4.0 MSBUILD.EXE文件编译我的.csproj文件时,我得到一个错误:“lable01”没有在“website01.csproj”的当前上下文中找到。
实际上,我需要添加每一个ASP。NET页面及其代码隐藏文件的引用。我已经做到了,它工作得很好,但上面的错误是悬而未决的。
我希望这意味着我需要在.csproj文件中添加表单名称“LABLE01”,但我不知道语法。谁能告诉我在。csproj文件中添加表单名的语法。
当前回答
抱歉,最有效的方法,而不是填充您的proj文件是。
right click the file. goto properties where Build Action option is set it to NONE. Do a build (yes you may get build error if you do even better) go back to properties of that file set Build Action option is set it back to Compile. rebuild. Congratulate your self for being smarter than everyone else and not ****ing you project. For me this exercise took under 10 seconds. Where as manually trying to input the compile... line into the csproj not only can render your project unusable but it is also impossible to maintain on large scale application. Better to keep source version control software to do the updates. If you need to cross merge branches then doing the above is amazing :).
其他回答
抱歉,最有效的方法,而不是填充您的proj文件是。
right click the file. goto properties where Build Action option is set it to NONE. Do a build (yes you may get build error if you do even better) go back to properties of that file set Build Action option is set it back to Compile. rebuild. Congratulate your self for being smarter than everyone else and not ****ing you project. For me this exercise took under 10 seconds. Where as manually trying to input the compile... line into the csproj not only can render your project unusable but it is also impossible to maintain on large scale application. Better to keep source version control software to do the updates. If you need to cross merge branches then doing the above is amazing :).
您还可以通过双击项目文件来打开.csproj。所以不需要右键单击并选择编辑项目文件。只需双击,就完成了。
使用实例打开。csproj文件。
打开解决方案资源管理器 1 单击Edit Project File选项 2
以XML格式保存的CSPROJ文件存储项目的所有引用,包括编译选项。还有一个SLN文件,用于存储有关组成解决方案的项目的信息。
如果您正在使用Visual Studio,并且您需要查看或编辑您的CSPROJ文件,而在Visual Studio中,您可以通过以下简单的步骤来做到这一点:
在解决方案资源管理器中右键单击项目并选择卸载项目 右键单击项目(在解决方案资源管理器中标记为不可用)并单击“Edit yourprojproject .csproj”。这将打开您的CSPROJ文件进行编辑。 在进行您想要的更改之后,保存并关闭文件。再次右键单击该节点,完成后选择Reload Project。
有点晚了,但我找到了更好的选择。 在rider中,您可以启用“点击打开项目文件” 只需转到解决方案选项菜单,然后单击打开项目文件与单一点击