Last post Feb 24, 2018 07:23 AM by X.Daisy
Feb 14, 2018 07:28 AM|z080236|LINK
I could add reference to one of my custom made dlls in ConsoleApp, and Web application(Add reference)
But when I added reference to WebSite, and tried to import namespace, it complains the following:
The type of namespace xxxx could not be found. (are you missing a directive or assembly reference)?
Feb 15, 2018 02:53 AM|KathyW|LINK
In a website, put the dll in the Bin folder. Add a using statement in the code behind.
Feb 15, 2018 04:18 AM|z080236|LINK
Feb 15, 2018 04:42 AM|KathyW|LINK
Is the Bin folder right under the root of the site? And I have no idea what "xxx" means. I assure you that it works - I have several asp.net websites that are not applications. You have not posted any code so there is not much more anyone can tell you.
Feb 15, 2018 03:59 PM|z080236|LINK
Feb 15, 2018 07:13 PM|KathyW|LINK
You don't need to "add reference" for a website for code you are putting in the Bin yourself. Again, since I have no visibility to what you are doing, I can't tell what is wrong.
Feb 20, 2018 09:07 AM|z080236|LINK
Feb 24, 2018 07:23 AM|X.Daisy|LINK
How about installing it into the global assembly cache?
(Note:Each computer where the common language runtime is installed has this machine-wide code cache. The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer.)
Add the file to GCA
gacutil.exe /i MyFile.dll
Then you can get the version and
gacutil /l MyFile
For more details, please refer to the following articles: