Removed DLL causing runtime error - c#

I have an ASP.NET web application built in visual studio 2013, .NET framework 4.5.1. The app used to reference a 3rd party dll, but I have refactored the program so it is no longer needed. I have removed the dll from the references and confirmed it is not being used anywhere in the solution. The solution builds just fine.
The problem comes when I try to run it. I get the familiar ASP white screen of death indicating that it cannot find the Namespace. The screen shows that the error occurs in a file in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\ that seems to be generated at runtime. I don't know why or how this file is generated, or why it is still referencing the removed dll.
The Error:
Compiler Error Message: CS0234: The type or namespace name 'Web' does not exist in the namespace 'Telecom' (are you missing an assembly reference?)
Source Error:
Line 17: public class ProfileCommon : System.Web.Profile.ProfileBase {
Line 18:
Line 19: public virtual Telecom.Web.Modules.Common.Code.Preferences Preferences {
Line 20: get {
Line 21: return ((Telecom.Web.Modules.Common.Code.Preferences (this.GetPropertyValue("Preferences")));
Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\sso\8bcf3ae8\e33c1692\App_Code.zywjwlv-.0.cs Line: 19

Related

The name 'BurstTargetCpu' does not exist in the current context

I am using the unity version 2021.2.3f1 and installed ml-agent released 15 version. The installation has been done without any error, new project is running without any issue.
Recently, I opened a unity project (the project is created on Mac) in my windows. I am getting errors while running the project.
This one is the first error
Library\PackageCache\com.unity.burst#1.6.0\Runtime\Editor\BurstReflection.cs(17,18): error CS0246: The type or namespace name 'BurstCompilerOptions' could not be found (are you missing a using directive or an assembly reference?)
and this one is the last error
Library\PackageCache\com.unity.burst#1.6.0\Runtime\Intrinsics\Arm\NEON_AArch64.cs(7552,29): error CS0103: The name 'BurstTargetCpu' does not exist in the current context
In total, I'm getting 127 errors. Please have a look and do let me know how can I solve these errors. Thank you
enter image description here

Finding where I need to update the naming Blazor WebAssembly

I renamed my project, and updated it to .Net 5. Now, I obviously havent catched all the occurances since I get this error:
\source\repos\BlazorBattles\BlazorBattles\Server\obj\Debug\net5.0\Razor\Pages\Error.cshtml.g.cs(78,71): error CS0246: The type or namespace name 'blazor_battles' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\hagenek\source\repos\BlazorBattles\BlazorBattles\Server\BlazorBattles.Server.csproj]
However, it is hard to locate it, because the error shows a file that is being generated by the project ,not a file that is in the core project.
Any tips?
For some reason visual studio could not locate the string "blazor_battles" in the Error.cshtml file inside of Server/Pages directory.
Using hyphens in your project names creates problems. Don't do it.

Getting namespace does not exist error for all the references added in my project

Whenever I take the latest code from TFS and tries to build existing solution, It fails all the project building and says that : The type or namespace name 'XYZ' does not exist in the sampace 'a.b.c' (are you missing an assembly reference?)
This is happening with all the references and only in my system. On the other systems all these code works fine.
Can it be a Visual Studio issue or some setting which might have got changed?

Cannot find classes once ASP.NET website is hosted

My project is an ASP.Net website that connects to an SQL database.
It compiles fine locally in Visual Studio, but once it is hosted (myWindowsHosting.com) it throws this error:
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'IDefaultView' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 9: namespace HFDB2
Line 10: {
Line 11: public partial class Default : System.Web.UI.Page, IDefaultView
Line 12: {
Line 13: public event EventHandler btnNextClicked;
In this example I am trying to implement an Interface to the Default webform. But a similar error occurs for any class I try to reference.
Why cant my project find any classes once it is hosted?
Does it have anything to do with my folder structure?
My classes are not in an App_Code folder because apparently you dont need one for websites. I tried putting them in an App_Code folder anyway, but it gave a different error.
Note that I uploaded everything you see inside my project folder to the host.
I was deploying my application incorrectly. As Ben Robinson's comment says:
Never deploy source code. The easiest way of creating your collection of files to deploy is to use the Publish option in visual studio.

Problem with DevExpress and just my machine

I can navigate to the class in intellisense in the CS. I know it's there. Just can't figure out why I'm getting this error. The project works fine on other peoples computers.
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0012: The type 'DevExpress.Web.ASPxClasses.StylesBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a'.
Source Error:
Line 224:
Line 225: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 226: private void #__BuildControl__control2(DevExpress.Web.ASPxGridView.GridViewStyles #__ctrl) {
Line 227:
Line 228: #line 33 "E:\...\page.aspx"
Source File: c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\94947553\afb27c33\App_Web_pagemanager.aspx.8f36609.6x9twr-m.0.cs Line: 226
Do you have this assembly reference in your project? And if you do is it the right version? or do you have Specific Version = True (if you don't have the exact version).
Compiler Error Message: CS0012: The type 'DevExpress.Web.ASPxClasses.StylesBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a'.
If you have have the reference and Specific Version = False it should work.
You sound like you might be in a situation I was in earlier this year, so I will tell you what worked for me:
Right click on your project in Solution Explorer and click on the Application tab. Check that your target framework is ".NET Framework 4" (or 3.5 etc.).
If it is targeting ".NET Framework 4 Client Profile" and the DevExpress assembily makes use of features not available to the cliet profile, then you find that your reference is ignored.

Categories