I'm receiving the following error:
Error 26 The type or namespace name 'Controls' does not exist in the namespace 'Microsoft.Windows' (are you missing an assembly reference?)
These two assemblies appear in the .g.cs file:
using Microsoft.Windows.Controls;
using Microsoft.Windows.Controls.Primitives;
When I remove them, the error returns.
Check your XAML code. Probably there will be xmlns pointing Microsoft.Windows.Controls.Primitives or Microsoft.Windows.Controls.
Related
Hi I am trying to implement Unit test cases in Unity for my project using testrunner. I have created the test folder for edit mode. In the test folder there is the assembly definition file.In the assembly definition file you have to give reference to where the scripts are created.
In the scripts folder I have created the assembly definition file by right-clicking in the scripts folder->Create->Assembly definition.But the moment I create this file,problems start arising like :
Assets\Scripts\ExplodeViewLabels.cs(4,7): error CS0246: The type or namespace name 'TMPro' could not be found (are you missing a using directive or an assembly reference?)
Assets\Scripts\LandingGear.cs(5,7): error CS0246: The type or namespace name 'TMPro' could not be found (are you missing a using directive or an assembly reference?)
Assets\Scripts\SceneController.cs(3,17): error CS0234: The type or namespace name 'MixedReality' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
and much more the screenshot I am attaching here
I tried overcoming the error by giving reference to the assembly definition file in the scripts as Unity.TextMeshPro and then click apply. The error for textMeshPro was done but other errors still persists like
Assets\Scripts\SceneController.cs(3,17): error CS0234: The type or namespace name 'MixedReality' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
and much more. I tried to give whatever reference I had with Microsoft.MixedReality, like the ones I have indicated in this screenshot. I addded all the three which I have indicated in the red box in the screenshot but there is no use.
Go to your SceneController.cs script and see which using statements you have. I think probably you're missing assembly definitions to the actual package(s) you're using in the script. Assembly definitions are kind of a pain to use and it's not enough to have SOME of the files included.
I have seen so many QA about this error, but none of them solved my issue,
Here we go:
I have this namespace: Microsoft.MixedReality.Toolkit.SpatialAwareness.Processing
Which is included in a DLL called: Microsoft.MixedReality.Toolkit.PlaneFinding
Now, there is a second DLL called Microsoft.MixedReality.Toolkit.SDK
Which is referencing the first DLL, and also defines a constant called PLANE_FINDING_PRESENT the somehow relates to it (Here are some photos from the inspector and VS to show what i mean)
Inside of the DLL called Microsoft.MixedReality.Toolkit.SDK there is a file called SurfaceMeshesToPlanes
In this file i am attempting to be using the namespace Microsoft.MixedReality.Toolkit.SpatialAwareness.Processing like so:
I am expecting this whole thing to work but i am getting error:
Library\PackageCache\com.microsoft.mixedreality.toolkit.foundation#2eb95bb1aae9-1646916095499\SDK\Experimental\SpatialAwareness\SurfaceMeshesToPlanes.cs(13,55): error CS0234: The type or namespace name 'Processing' does not exist in the namespace 'Microsoft.MixedReality.Toolkit.SpatialAwareness' (are you missing an assembly reference?)
Any thoughts?
The problem was in the platforms section in the desired dll, once i changed it to any it became visible to the other dll
I am working on an C#/MVC project in corporation with other developers. The project works just fine with everyone except my machine.
We are using git with the project.
Whenever I try to build the project, I get the below errors/warnings:
Severity Code Description Project File Line Suppression State
Error CS0234 The type or namespace name 'Reporting' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) MvcPortal C:\xxx\xxx\xxx\MvcPortal\Controllers\TestingController.cs 18 Active
Error CS0234 The type or namespace name 'Reporting' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) MvcPortal C:\xxx\xxx\xxx\MvcPortal\Helpers\ReportUtils.cs 6 Active
Error CS0246 The type or namespace name 'LocalReport' could not be found (are you missing a using directive or an assembly reference?) MvcPortal C:\xxx\xxx\xxx\MvcPortal\Helpers\ReportUtils.cs 84 Active
Error CS0246 The type or namespace name 'LocalReport' could not be found (are you missing a using directive or an assembly reference?) MvcPortal C:\xxx\xxx\xxx\MvcPortal\Helpers\ReportUtils.cs 96 Active
Error CS0246 The type or namespace name 'LocalReport' could not be found (are you missing a using directive or an assembly reference?) MvcPortal C:\xxx\xxx\xxx\MvcPortal\Helpers\ReportUtils.cs 124 Active
Warning CS0108 'SupplierLController.View()' hides inherited member 'Controller.View()'. Use the new keyword if hiding was intended. MvcPortal C:\xxx\xxx\xxx\MvcPortal\Controllers\SupplierLiaisonController.cs 60 Active
Warning The referenced component 'Microsoft.ReportViewer.WebForms' could not be found. MvcPortal
Warning Could not resolve this reference. Could not locate the assembly "Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. MvcPortal
When I Googled these errors, I found some solutions, but if I perform any of these solutions, they will get pushed into the repository and then pulled by other developers! This might cause further problems because my machine is the only one that has these errors?
Any thoughts?
I have configured tfs build definition for our project. And also i have added Nuget package to the solution.
When i tried to build the defination, i'm getting following error.
App_Start\BundleConfig.cs (7): The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Global.asax.cs (10): The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
App_Start\BundleConfig.cs (20): The type or namespace name 'BundleCollection' could not be found (are you missing a using directive or an assembly reference?)
I don't know why i'm getting this error.
Could anyone please help me with this????
Check your Build definition -> Source Settings tab. You should add path to packages folder where referenced packages are stored.
I've added a specflow feature to a project and the project won't build.
The errors I recieve are:
Error 1 The type or namespace name 'CodeDom' does not exist in the namespace 'Absolute.Website.System' (are you missing an assembly reference?) C:\source\dot_net\BWO\src\Absolute.Website.System.Tests\test.feature.cs 17 13 Absolute.Website.System.Tests
Error 3 The type or namespace name 'Runtime' does not exist in the namespace 'Absolute.Website.System' (are you missing an assembly reference?) C:\source\dot_net\BWO\src\Absolute.Website.System.Tests\test.feature.cs 18 13 Absolute.Website.System.Tests
The problem seems to lie in the auto generated test.feature.cs file with these two lines:
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.6.1.0")]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
I have added a reference to the system assembly and can't figure out what could be causing the build error. Any ideas?
It seems the problem was due to the name of the namespace being in the form of xxxx.System.yyyy. When I renamed the assembly the problem to remove the xxxx.System.yyyy patern the project built.