C#用户控件库解决方案 [英] C# user control library solution

查看:100
本文介绍了C#用户控件库解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个用户控件库项目。当我尝试测试它时,我收到以下消息:

System.ArgumentException:'Assembly'C:\ Users \ raymo \ OneDrive \ Files \ Visual Studio 2017 \Projects \\无法找到\\ C#%5CModels%5CModels%5Cobj%5CDebug%5CModels.dll'。确保路径正确。'

我怎样才能消除它。



我尝试了什么:



我没有这样的经历,我不知道该怎么办。

解决方案

%5C路径的一部分是编码字符已经用它的十六进制等效替换了实际字符。在这种情况下,%5C正在替换反斜杠字符'\',这意味着路径应该是:

 C:\ Users \ raymo \ OneDriveD \\Documents\Visual Studio 2017 \Projects\C#\Models \ Model#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\来自,当你得到它:如果有必要在Windows资源管理器中进行文件搜索以找到引用该字符串的位置(您可能需要使用高级选项... FileContents来找到它。



一旦找到它,你就可以开始查看编码路径是如何进入的......但是我们无法帮助你做任何事情 - 我们无法访问你的系统。



作为最终的核选项,创建一个全新的解决方案,添加新项目,并缓慢添加文件,直到问题发生,或者你得到一个完整的解决方案。


I wrote a User control library project. when i try to test it i get the following message :
System.ArgumentException: 'Assembly 'C:\Users\raymo\OneDrive\Documents\Visual Studio 2017\Projects\C#%5CModels%5CModels%5Cobj%5CDebug%5CModels.dll' could not be found. Ensure the path is correct.'
how can i eleminate it.

What I have tried:

I have not such a experience, i don't know what to do.

解决方案

The "%5C" parts of the path are "encoding characters" which have replaced the actual character with it's hexadecimal equivalent. In this case, the "%5C" is replacing backslash characters '\' which means the path should be:

C:\Users\raymo\OneDrive\Documents\Visual Studio 2017\Projects\C#\Models\Models\obj\Debug\Models.dll

So start by looking at where the "bad" path is coming from, and when you are getting it: if necessary do a file search in Windows Explorer to find where that string is referenced (You may need to use "Advanced options...FileContents" to locate it.

Once you've found it, you can start looking at how an encoded path got in there ... but we can't help you do any of that - we have no access to your system.

As a final "Nuclear" option, create a brand new solution, add new projects, and add your files to that slowly until either the problem occurs, or you get a working complete solution.


这篇关于C#用户控件库解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆