Skip to content
Fix Code Error

The type or namespace name could not be found

March 13, 2021 by Code Error
Posted By: Anonymous

I have a C# solution with several projects in Visual Studio 2010.
One is a test project (I’ll call it “PrjTest“), the other is a Windows Forms Application project (I’ll call it “PrjForm“). There is also a third project referenced by PrjForm, which it is able to reference and use successfully.

PrjForm references PrjTest, and PrjForm has a class with a using statement:

using PrjTest;
  1. Reference has been correctly added
  2. using statement is correctly in place
  3. Spelling is correct
  4. PrjTest builds successfully
  5. PrjForm almost builds, but breaks on the using PrjTest; line with the error:

The type or namespace name ‘PrjTest’ could not be found (are you missing a using directive or an assembly reference?)

I’ve tried the following to resolve this:

  1. Removed Resharper (since Resharper had no trouble recognizing the referenced project, I thought it might be worth a shot)
  2. Removed and re-added the reference and using statement
  3. Recreated PrjForm from scratch
  4. PrjForm currently resides inside the PrjTest folder, I tried moving it to an outside folder
  5. Loaded the solution on a different computer with a fresh copy of VS 2010

I have done my homework and spent far too long looking for an answer online, none of the solutions has helped yet.

What else could I try?

Solution

See this question.

Turns out this was a client profiling issue.

PrjForm was set to “.Net Framework 4 Client Profile”
I changed it to “.Net Framework 4”, and now I have a successful build.

Thanks everyone!
I guess it figures that after all that time spent searching online, I find the solution minutes after posting, I guess the trick is knowing the right question to ask..

Answered By: Anonymous

Related Articles

  • How to generate JAXB classes from XSD?
  • How to retrieve a value from a different column by…
  • ComboBox.SelectedItem giving Null value
  • How to Detect if I'm Compiling Code with a…
  • What are the undocumented features and limitations…
  • AppCompat v7 r21 returning error in values.xml?
  • Get operating system info
  • Error: Can't set headers after they are sent to the client
  • Unity Scripts edited in Visual studio don't provide…
  • How can I find the product GUID of an installed MSI setup?
  • Adding a guideline to the editor in Visual Studio
  • Detect if Visual C++ Redistributable for Visual…
  • How to completely uninstall Visual Studio 2010?
  • What is the difference between Visual Studio Express…
  • How do I include certain conditions in SQL Count
  • Error: the entity type requires a primary key
  • Visual Studio 2010 always thinks project is out of…
  • The 'compilation' argument must be an instance of…
  • python pandas extract year from datetime: df['year']…
  • error LNK2005: ✘✘✘ already defined in…
  • CMake error at CMakeLists.txt:30 (project): No…
  • MSBuild doesn't copy references (DLL files) if using…
  • Chart creating dynamically. in .net, c#
  • MySQL Data Source not appearing in Visual Studio
  • Using SSIS BIDS with Visual Studio 2012 / 2013
  • Cannot find control with name: formControlName in…
  • Error 'LINK : fatal error LNK1123: failure during…
  • ember: understand errors
  • Visual Studio 2015 or 2017 does not discover unit tests
  • Attempted to read or write protected memory
  • Can't add C# class in visual studio 2019 anymore -…
  • How do SO_REUSEADDR and SO_REUSEPORT differ?
  • How can I center all my contents in html?
  • Creating and maintaining same codebase (class…
  • Iterator invalidation rules
  • Cannot read property '$i18n' of undefined when using…
  • Python Pandas replicate rows in dataframe
  • Create MSI or setup project with Visual Studio 2012
  • ASP.NET Web Site or ASP.NET Web Application?
  • What is your most productive shortcut with Vim?
  • Proper way to rename solution (and directories) in…
  • Visual Studio debugging/loading very slow
  • What are the best JVM settings for Eclipse?
  • 'cl' is not recognized as an internal or external command,
  • How do I use namespaces with TypeScript external modules?
  • Force uninstall of Visual Studio
  • Could not load file or assembly…
  • Ubuntu apt-get unable to fetch packages
  • Logging best practices
  • Can Windows Containers be hosted on linux?
  • Polymer - Show empty state on nested dom-repeat with filter
  • Detect whether Office is 32bit or 64bit via the registry
  • Xamarin 2.0 vs Appcelerator Titanium vs PhoneGap
  • The type or namespace name does not exist in the…
  • What is a 'workspace' in Visual Studio Code?
  • Why widget EmailInput style doesn't apply
  • How to dynamically change content of component with JSON?
  • laravel remove old excel file after upload new excel…
  • Page or Form Not showing validation Error Django
  • Error: request entity too large
  • ExpressJS How to structure an application?
  • Installation of VB6 on Windows 7 / 8 / 10
  • What is a NullReferenceException, and how do I fix it?
  • How to add "on delete cascade" constraints?
  • How do I fix a .NET windows application crashing at…
  • SQL Server Group By Month
  • Visual Studio build fails: unable to copy exe-file…
  • Cannot open include file: 'stdio.h' - Visual Studio…
  • Targeting .NET Framework 4.5 via Visual Studio 2010
  • Best way to namespace multiple or suit of emberjs apps
  • Java SimpleDateFormat for time zone with a colon separator?
  • Visual Studio 2013 License Product Key
  • Install Visual Studio 2013 on Windows 7
  • What does a "Cannot find symbol" or "Cannot resolve…
  • Using Java with Microsoft Visual Studio 2012
  • What are the differences between Visual Studio Code…
  • Mismatch Detected for 'RuntimeLibrary'
  • SQL Server FOR EACH Loop
  • How to use Boost in Visual Studio 2010
  • How can I pass a wct test while rearranging children…
  • How to add a reference programmatically
  • Cannot import the keyfile 'blah.pfx' - error 'The…
  • What is the best (safest) way to rename WPF file…
  • Smart way to truncate long strings
  • How to use ember cli with visual studio
  • Error message "No exports were found that match the…
  • .Net picking wrong referenced assembly version
  • C# Error "The type initializer for ... threw an exception
  • How to extend namespaces with EmberJS
  • Install Windows Service created in Visual Studio
  • Invoke or BeginInvoke cannot be called on a control…
  • What does T&& (double ampersand) mean in C++11?
  • Django - update inline formset not updating
  • GWT Custom event trigger in Javascript
  • Visual Studio 2015 Update 3 Offline Installer (ISO)
  • Stop the TypeScript definition wack-a-mole between…
  • Memcached vs. Redis?
  • discord.ext.commands.errors.CommandInvokeError:…
  • How to show to average sales for each year within…
  • How to declare global variables in Android?

Disclaimer: This content is shared under creative common license cc-by-sa 3.0. It is generated from StackExchange Website Network.

Post navigation

Previous Post:

event.preventDefault() vs. return false

Next Post:

How do I get ASP.NET Web API to return JSON instead of XML using Chrome?

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

.net ajax android angular arrays aurelia backbone.js bash c++ css dataframe ember-data ember.js excel git html ios java javascript jquery json laravel linux list mysql next.js node.js pandas php polymer polymer-1.0 python python-3.x r reactjs regex sql sql-server string svelte typescript vue-component vue.js vuejs2 vuetify.js

  • you shouldn’t need to use z-index
  • No column in target database, but getting “The schema update is terminating because data loss might occur”
  • Angular – expected call-signature: ‘changePassword’ to have a typedeftslint(typedef)
  • trying to implement NativeAdFactory imports deprecated method by default in flutter java project
  • What should I use to get an attribute out of my foreign table in Laravel?
© 2022 Fix Code Error