I have a Pipeline using YAML in Azure DevOps. I have the following task in my YAML file:
- task: XamariniOS#2
inputs:
solutionFile: '**/*iOS.csproj'
configuration: 'Release'
packageApp: false
runNugetRestore: false
I receive the following errors when the Pipeline runs:
ASWebAuthenticationSessionBrowser .cs(6,7): error CS0246: The type or namespace name 'AuthenticationServices' could not be found (are you missing a using directive or an assembly reference?) [/Users/vsts/agent/2.158.0/work/1/s/AgentConnectMobile/AgentConnectMobile.iOS/AgentConnectMobile.iOS.csproj]
ASWebAuthenticationSessionBrowser .cs(14,9): error CS0246: The type or namespace name 'ASWebAuthenticationSession' could not be found (are you missing a using directive or an assembly reference?) [/Users/vsts/agent/2.158.0/work/1/s/AgentConnectMobile/AgentConnectMobile.iOS/AgentConnectMobile.iOS.csproj]
ASWebAuthenticationSessionBrowser .cs(49,72): error CS0246: The type or namespace name 'IASWebAuthenticationPresentationContextProviding' could not be found (are you missing a using directive or an assembly reference?) [/Users/vsts/agent/2.158.0/work/1/s/AgentConnectMobile/AgentConnectMobile.iOS/AgentConnectMobile.iOS.csproj]
ASWebAuthenticationSessionBrowser .cs(51,51): error CS0246: The type or namespace name 'ASWebAuthenticationSession' could not be found (are you missing a using directive or an assembly reference?) [/Users/vsts/agent/2.158.0/work/1/s/AgentConnectMobile/AgentConnectMobile.iOS/AgentConnectMobile.iOS.csproj]
I'm able to build the iOS project manually successfully in Visual Studio. I have tried removing and re-adding project references but it hasn't seemed to help.
My project is setup like the following:
Do I need to configure something differently for Azure DevOps?
Related
I have added a reference for "Xamarin.ios" to my project and it is working fine locally. I have committed the code and made a build for it in appcenter but it is failing and showing me error as mentioned below.
/Users/runner/work/1/s/Project/ViewModels/OrderViewModel.cs(19,7): error CS0246: The type or namespace name 'Foundation' could not be found (are you missing a using directive or an assembly reference?) [/Users/runner/work/1/s/Project/Project.csproj]
/Users/runner/work/1/s/Project/ViewModels/OrderViewModel.cs(20,7): error CS0246: The type or namespace name 'UIKit' could not be found (are you missing a using directive or an assembly reference?) [/Users/runner/work/1/s/Project/Project.csproj]
Time Elapsed 00:00:08.79
##[error]Error: The process '/Library/Frameworks/Mono.framework/Versions/6_12_11/bin/msbuild' failed with exit code 1
I have also tried with various mono versions but it did not work for me. Can you please suggest me the solution for the same?
Ensure that Xamarin.iOS has referenced in iOS project not shared prject, because netstandard project can't use any API specific to Xamarin.iOS .
Open your iOS csproj file to check if <Reference Include="Xamarin.iOS" /> exists there .
Refer to https://github.com/xamarin/xamarin-macios/issues/10191 .
I have a xamarin project that uses some components that are not recognized.
When I try to compile this project it gives the following error:
Error CS0246: The type or namespace name "UIKit" can not be found (is it missing a using directive or an assembly reference?)
Error CS0246: The name of the "CoreLocation" type or namespace can not be found (is it missing a using directive or an assembly reference?)
Anyone have any ideas to solve this?
This is the errors when i build my game for Universal Windows 10 (Unity3D)
Unity3D error CS0246: The type or namespace name could not be found
(are you missing a using directive or an assembly reference
My Question is Unique because it has different Compiler Errors.
I'm trying to use the assemblies like this in a VS2012 project:
using Microsoft.VisualStudio.TestTools.UITesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UITest.Extension;
However I get a bunch of red in my tests:
I can build and run locally even with this red, but I'd like to get this stuff resolving if possible. My build machine rejects this with the following errors:
DashboardTest.cs (7): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
DashboardTest.cs (9): The type or namespace name 'UITest' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
UIMap.cs (9): The type or namespace name 'UITest' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
UIMap.cs (10): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
UIMap.Designer.cs (19): The type or namespace name 'UITest' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
UIMap.Designer.cs (20): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
UIMap.Designer.cs (132): The type or namespace name 'BrowserWindow' could not be found (are you missing a using directive or an assembly reference?)
DashboardTest.cs (10): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
UIMap.cs (12): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
UIMap.cs (13): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
UIMap.Designer.cs (22): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
UIMap.Designer.cs (23): The type or namespace name 'UITesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
DashboardTest.cs (18): The type or namespace name 'CodedUITest' could not be found (are you missing a using directive or an assembly reference?)
DashboardTest.cs (18): The type or namespace name 'CodedUITestAttribute' could not be found (are you missing a using directive or an assembly reference?)
Any tips? All references in my test project are set to copy local = true.
UPDATE - I got the references working locally by adding a reference to visualStudio.TestTools.UITesting, but the CodedUITest attribute is still red and the build still fails with the same errors.
You need to add references such as in the following attachment:
You need to add a reference to: Microsoft.VisualStudio.QualityTools.CodedUITestFramework
In VS2017 I had to use the Visual Studio Installer to install the "Coded UI Test" component on my build server. It is found on the "Individual Components" tab under the "Debugging and Testing" section.
I had a similar problem but in my case I wanted to use a NuGet called CodedUIDependencies and VS kept trying to use the dlls from Program Files. I finally figured out that the project had a setting in the .csproj that was forcing it to use these files.
<IsCodedUITest>True</IsCodedUITest>
By changing this to False I could reinstall my Nuget and VS would finally reference the desired dlls.
I'm having an odd problem on my build server. I'm using the latest version of TeamCity on Windows Server 2008 R2. I used the web platform installer to install ASP.NET MVC on the build server but, my compilation is still failing with messages that it cannot find the System.Web.Mvc.dll. I've verified that it is on the disk at the expected location:
(C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies)
Here is a selection of the messages:
Controllers\AccountController.cs(7, 18): error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Controllers\AccountController.cs(15, 35): error CS0246: The type or namespace name 'Controller' could not be found (are you missing a using directive or an assembly reference?)
Controllers\HomeController.cs(5, 18): error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Controllers\HomeController.cs(9, 32): error CS0246: The type or namespace name 'Controller' could not be found (are you missing a using directive or an assembly reference?)
Global.asax.cs(5, 18): error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Models\AccountModels.cs(8, 18): error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
So what am I missing?
The errors you seem to be inferring that it can't find the correct version of the MVC dll. Is it possible you've installed the MVC (original) or MVC2 instead of the MVC3 from the web platform onto the build server?
Edit:
Also the file should be in the GAC, (not sure the location on Win Server 2008 but guessing it's similar to Win 7.)
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.Mvc\ (then the .Net version folder, mine is v4.0_3.0.0.0)