“找不到路径的一部分”文件路径错误
我正在在线关注 OpenTK 教程,在遵循之后,我仍然在调试中遇到此错误:
无法找到路径 'C:\Users\Tim\Documents\Coding\OpenTK_HelloTriangle\OpenTK_HelloTriangle 的一部分\bin\Debug\net6.0\Shaders\shader.vert'。
这是错误引导我的代码:
var ShaderSource = File.ReadAllText(vertPath);
这是我引用我希望程序使用的文件的位置(在不同的项目中):
_shader = new Shader("Shaders/shader.vert", "Shaders/shader .frag");
上面提到的两个代码项目都位于着色器文件所在的文件夹“Shaders”之外。
I'm following an OpenTK tutorial online and after following along, I'm still getting this error in the debug:
Could not find a part of the path 'C:\Users\Tim\Documents\Coding\OpenTK_HelloTriangle\OpenTK_HelloTriangle\bin\Debug\net6.0\Shaders\shader.vert'.
Here's the code the error directs me to:
var shaderSource = File.ReadAllText(vertPath);
Here's where I reference the files I want the program to use (in a different project):
_shader = new Shader("Shaders/shader.vert", "Shaders/shader.frag");
Both the code projects mentioned above are outside the folder "Shaders", where the shader files are.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论