I've struggled a few minutes too long to resolve this problem.
I writed a new class with some type inside, added by a new Namespace.
I added the relative reference on the project.
The solution compiles correctly, but at the site's launch on localhost, I obtained the following error
WTF?!
Solution
Check if has been added the dll relative to the reference added and/or in the web.config has been added the relative assembly reference.
If not, the solution is to manually add the reference in the following manner
(in my case System.Security)
To find the exact string to write in the web.config, search in the machine.config that shows all packages already installed on your PC.
Enjoy!
I writed a new class with some type inside, added by a new Namespace.
I added the relative reference on the project.
The solution compiles correctly, but at the site's launch on localhost, I obtained the following error
BC30002: Type 'NameClass' not defined
WTF?!
Solution
Check if has been added the dll relative to the reference added and/or in the web.config has been added the relative assembly reference.
If not, the solution is to manually add the reference in the following manner
(in my case System.Security)
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>
</compilation>
To find the exact string to write in the web.config, search in the machine.config that shows all packages already installed on your PC.
Enjoy!
No comments:
Post a Comment