I'm having some issues trying to run the macOS project of a Xamarin.Forms application.
More information
Xamarin.Forms v4.5.0.356
TargetFrameworkVersion v2.0
The project builds without errors, but when I run the application, it only shows the application bar:
Any ideas?
This should be your custom assembly , you need to add them from your Mac manually .
Each framework within Xamarin ships with over a dozen assemblies. Not all of these assembly packages are referenced in your project by default.
To edit packages that are referenced in your project, use the Edit References dialog, which can be displayed by double-clicking on the References folder, or by selecting Edit References on its context menu actions:
However , from your shared netstandard and System.Drawing.Common.dll assembly , you will not find them in Xamarin.Mac Package . That should be your custom .Net Assembly . You can browse the folder from your mac to select them .
Related
When I try to add a missing assembly to my project (for unit testing specifically) I noticed that the Assemblies tab is missing in the "Add Reference" dialog , see:
Is this a bug or a expected behavior? If it's expected how we are supposed to add the missing assemblies.
Note that I already tried through Nuget package manager and still didn't work.
It is correct behaviour. The Assemblies tab is not available for Net Core projects. You wont be able to add assemblies from your system, because Net Core projects work with dependencies from Nuget. So, to add your references, you need to use the Nuget Package Manager instead.
Right click your project
Choose "Manage Nuget Packages"
Find the package you want to add from the list
You can add external assemblies, e.g. Rebex, by right clicking your project, select Add >> Project Reference... >> Browse and then hit the Browse button.
I've just done that using VS2019 v.16.9.4 on a .Net Core 3.1.x project. No problem at all.
When building a Xamarin Forms app in Visual Studio App Center it complains about the embedded xaml-files when using netstandard2.0.
Locally with updated Visual Studio and Xamarin Forms it works perfect to build and run.
(CheckForDuplicateItems target) ->
/usr/local/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.DefaultItems.targets(276,5):
error : Duplicate 'EmbeddedResource' items were included. The .NET SDK
includes 'EmbeddedResource' items from your project directory by
default. You can either remove these items from your project file, or
set the 'EnableDefaultEmbeddedResourceItems' property to 'false' if
you want to explicitly include them in your project file. For more
information, see https://aka.ms/sdkimplicititems.
How should xaml-files be added to the project if not as embedded?
UPDATE:
The same error is present using VSTS and Hosted Mac Agent
Edit your .csproj file and remove the ItemGroup that contains the EmbeddedResource.
This resolved the issue from me but the original answer came from Xamarin Forums
I've got an ASP.NET MVC 5 project with a reference to a class library project which is using OpenXML installed via NuGet.
Install-Package DocumentFormat.OpenXml
It all works on my development machine. But when I publish the OpenXML assembly (DocumentFormat.OpenXml.dll) is no where to be found on the server.
What do I need to do get it included when I publish?
You should set copy to local to true for that assembly file. To do that, right click on the reference file (which is showed in your image) and then click "properties". In the showed window you can find it.
Try removing any instance of DocumentFormat.OpenXml.dll from your workstation's Global Assembly Cache (GAC).
Open the GAC root in Windows Explorer (Win 7: %windir%\Microsoft.NET\assembly)
Search for OpenXml
Delete any appropriate folders (or to be safe, cut them out to your desktop in case you should want to restore them)
remove the dll and add is a nuget:
Install-Package DocumentFormat.OpenXml
I used the RC version of Visual Studio 2012 to create an ASP.NET Webforms project and I intentionally took the 4.0 version of .Net and of the project template to avoid complications after the release of VS2012.
Now I anyway bumped into the problem, that is revealed in the following error message:
'jquery' is not a valid script name. The name must end in '.js'.
As I noticed in the references, following assembly references are broken:
Microsoft.ScriptManager.jQuery
Microsoft.ScriptManager.jQuery.UI.Component
System.Web.Providers
I tried to re-install jQuery using NuGet but did not find these assemblies.
If I now create a new .Net 4.0 ASP.NET Webforms project in Visual Studio 2012 I get a lot of new references which are not present in my current (originally created in the RC-version, now opened in VS2012 RTM), like:
AspNet.ScriptManager.jQuery
AspNet.ScriptManager.jQuery.UI.Combined
but I can't find them among reference sources if I try to add a new reference to my original project.
How can I make my application runnable in VS2012?
Check packages
AspNet.ScriptManager.jQuery.1.7.1
AspNet.ScriptManager.jQuery.UI.Combined.1.8.20
make sure the following dlls are in the lib folder
AspNet.ScriptManager.jQuery.dll
AspNet.ScriptManager.jQuery.UI.Combined.dll
And check the reference in your project to make sure all references are resolved.
Sometimes, the dlls didn't added to the source control and when you do a get latest from the source control these two dlls are missing.
I'm using VS 2010 with ASP.net MVC 2.
I recieved a program that was completed and when I was debugging the program I recieve an error message.
"Error 4 The type 'System.Web.Routing.RouteTable' exists in both 'C:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Web.dll' and 'C:\Documents and Settings\Vincent\Desktop\3\Manning.ASP.NET.MVC.2.in.Action.Jun.2010\aspnetmvc2inaction_code\lib\AspNetMvc\System.Web.Routing.dll' C:\Documents and Settings\Vincent\Desktop\3\Manning.ASP.NET.MVC.2.in.Action.Jun.2010\aspnetmvc2inaction_code\src\Chapter01\GuestBook\Global.asax.cs"
and
"Error 1 The type 'System.Web.Routing.RequestContext' exists in both 'c:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Web.dll' and 'c:\Documents and Settings\Vincent\Desktop\3\Manning.ASP.NET.MVC.2.in.Action.Jun.2010\aspnetmvc2inaction_code\lib\AspNetMvc\System.Web.Routing.dll' C:\Documents and Settings\Vincent\Desktop\3\Manning.ASP.NET.MVC.2.in.Action.Jun.2010\aspnetmvc2inaction_code\src\Chapter01\GuestBook\Controllers\AccountController.cs".
The program was converted into VS 2010 format.
What should I do?
// Fullmetalboy
When you convert a project from .Net 2.0/3.5 to 4.0 in VS2010 the web projects will prompt you to upgrade the framework to 4.0 but you will need to manually go into the project properties and upgrade class library projects and certain other projects manually in the project properties. So this type of error is probably caused by your web project referencing the 4.0 version of System.Web.Routing but a class library in your solution is still referencing the 3.5 version.
One of the projects in your solution is referencing a single type (RouteTable/RequestContext) in two different places. I always start with cleaning and rebuilding the solution, but if that doesn't fix it, you're going to have to check the project references and resolve it that way. If all else fails, try to make a new project from scratch and manually add the references and projects you need and then copy and paste your old code.
Someone copied the ASP.NET MVC source code into the "lib" folder of your application and either included that folder in the project (so it is getting built when you build your project) or he/she built it before you got it and referenced it from within the project. Now it is in conflict with the ASP.NET libraries that exist in default installation folder on the system 'c:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Web.dll'.
Since you're using the .NET 4.0 Framework, the library System.Web.Routing is ambiguous. Make sure you have referenced System.Web.dll (version 4.0) and remove the reference to System.Web.Routing.dll