Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Updated 24-Jun-17 18:56pm

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900