I am quite sure this issues has not yet been addressed before.
I am adding [assembly: RequiresSTA] to my AssemblyInfo.cs file in my C# project.
But it does not like the RequiresSTA word.
VS states "The type or namespace name"RequriesSTA" could not be found (are you missing or using directive or an assembly reference?)".
I am referencing WatIn 2.1 and NUnit 2.4.1.
I have added using nunit.framework & WatIn.core.
My C# project is output type 'Console Application' and target framework '.Net Framework 4'
Any suggestions?
Thank You
Related
So I have the following line at line 1 of the file.
using Microsoft.Extensions.Logging;
On building it throws
CS0234 C# The type or namespace name 'Logging' does not exist in the namespace (are you missing an assembly reference?)
Have tried searching around but was unable to find any solution or reason. The project is set to build in .net core 2.0, have downloaded and installed .NET Core 2.0 SDK (v2.1.202), but the error remains.
Have tried changing the build version to 2.1, 3.0 didn't help either.
Getting the error
The type or namespace name 'VisualStudio' does not exist in the
namespace 'Microsoft' (are you missing an assembly reference?)
on a project using MS Test 2 Framework. I read the link here but it didn't help.
I believe I have the required references and object browser seems to find them:
References
Object Browser:
Nevertheless I'm getting tons of errors in my unit test project, starting with the one above.
How can I resolve this so the build can find the references it needs?
In my case (vs2017 + TFS Builds), I ended up removing the MSTest v2 packages and installed the MSTest v1 package because our build servers don't support v2 yet. My solution would build locally but fail on our build server.
Went into Manage NuGet Packages
Uninstalled MSTest.TestAdapter & MSTest.TestFramework
Installed VS.QualityTools.UnitTestFramework
Rebuild & Run tests to make sure and then check-in.
I need to change the .NET framework of an existing solution from 4.5.1 to 4.0.
Several of the projects in the solution reference OData.
I have updated the references (luckilly NuGet is used here) but it seems like the namespaces are different, or I've made a glaring error somewhere.
I get the following errors when I try a build:
The type or namespace name 'Http' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
This is a typical reference list:
using System.Web.Http.OData.Builder;
using System.Web.Http.OData.Extensions;
No amount of changing references seems to help, so I'd be grateful for any suggestions!
It looks like this is the reason:
http://docs.telerik.com/data-access/developers-guide/using-web-services/asp.net-web-api/developer-guide-wcfservices-web-api-install-nuget-netframework40
I am unable to include System.Threading.Tasks in my project.
I am Using Asp.net 2013 (4.5)
I am getting the following error -
The type or namespace name 'Tasks' does not exist in the namespace 'System.Threading' (are you missing an assembly reference?)
I had refered earlier questions and they suggested in 4.0+ versions of ASP.NET it will work fine but I coudnt include it in my project.
Help me thanks.
System.Threading.Tasks.Task is in mscorlib which in .NET4.5. My project is not targeting, so in project properties need to change the target to 4.5.
I am using MVC 5, C#, .NET 4.5.1 in Visual Studio 2013. Following a Microsoft/Windows Update yesterday (15 October 2014) my program refuses to compile with multiple errors of the two types below:
The type or namespace name 'Mvc' does not exist in the namespace 'System.Web'
The type or namespace name 'ControllerContext' could not be found (are you missing a using directive or an assembly reference?)
I have tried this on a different computer (also with the patches) and had the same errors. The program in question is in production and compiled perfectly before the changes.
Before I start uninstalling and restoring the different patches, has anyone else seen this problem and is a solution/workaround known.
I got the same error yesterday. I assumed it was something I had done. One of the projects in our solution had a reference to System.Web.Mvc 4.0.0.0 and it could no longer find it. I updated that project using NuGet to System.Web.Mvc 5.2.0.0 (which is what all the other projects in the solution were using anyway) and all was well.