当我使用. 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文件中添加表单名的语法。
当前回答
有点晚了,但我找到了更好的选择。 在rider中,您可以启用“点击打开项目文件” 只需转到解决方案选项菜单,然后单击打开项目文件与单一点击
其他回答
JetBrains Rider:
第一个选项
卸载项目 双击已卸载的项目
第二选择:
点击项目 按下F4
就是这样!
抱歉,最有效的方法,而不是填充您的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 :).
有一种更简单的方法,因此您不必卸载项目。只需在Visual Studio中安装这个名为EditProj的工具: https://marketplace.visualstudio.com/items?itemName=EdMunoz.EditProj
然后右键单击编辑,你会有一个新的菜单项编辑项目文件:)
在vs 2019版本16.8.2中 右键单击项目名称 点击“编辑项目文件”
它是.Net核心和.Net标准项目的内置选项