Solve runtime errors in my visual studio code API - api

I've followed this tutorial:
https://dev.to/jessicanathany/creating-a-simple-project-web-api-with-vscode-and-entity-framework-3jj1
But when I go to run my API I get the errors below:
C:\development\React Projects\API Project\CourseApi\Controllers\CategoryController.cs(4,17): error CS0234: The type or namespace name 'EntityFrameworkCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\development\React Projects\API Project\CourseApi\CourseApi.csproj]
C:\development\React Projects\API Project\CourseApi\Controllers\CourseController.cs(4,17): error CS0234: The type or namespace name 'EntityFrameworkCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\development\React Projects\API Project\CourseApi\CourseApi.csproj]
C:\development\React Projects\API Project\CourseApi\Data\DataContext.cs(1,17): error CS0234: The type or namespace name 'EntityFrameworkCore' does not exist in
the namespace 'Microsoft' (are you missing an assembly reference?) [C:\development\React Projects\API Project\CourseApi\CourseApi.csproj]
C:\development\React Projects\API Project\CourseApi\Data\DataContext.cs(6,32): error CS0246: The type or namespace name 'DbContext' could not be found (are you
missing a using directive or an assembly reference?) [C:\development\React Projects\API Project\CourseApi\CourseApi.csproj]
C:\development\React Projects\API Project\CourseApi\Data\DataContext.cs(11,16):
error CS0246: The type or namespace name 'DbSet<>' could not be found (are you missing a using directive or an assembly reference?) [C:\development\React Projects\API Project\CourseApi\CourseApi.csproj]
C:\development\React Projects\API Project\CourseApi\Data\DataContext.cs(12,16):
error CS0246: The type or namespace name 'DbSet<>' could not be found (are you missing a using directive or an assembly reference?) [C:\development\React Projects\API Project\CourseApi\CourseApi.csproj]
C:\development\React Projects\API Project\CourseApi\Data\DataContext.cs(8,28): error CS0246: The type or namespace name 'DbContextOptions<>' could not be found (are you missing a using directive or an assembly reference?) [C:\development\React Projects\API Project\CourseApi\CourseApi.csproj]
Has anyone encountered this? If so, how did you solve it?

Related

Error when compiling c# project with reference to external DLL

I'm trying to compile the following c# code which relies on the external DLL which source code is located there
So at first I compile the DLL project source code through:
dotnet build NtApiDotNet\NtApiDotNet.Core.csproj -c Release
I obtain the NtApiDotNet.dll, so everything good until there.
But, then I'm trying to compile the c# source code referencing the previous DLL with the following command line:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe /unsafe /platform:anycpu /r:NtApiDotNet.dll /out:poc.exe .\PulseLogPrivesc.cs
I obtain the following error log entries:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe /unsafe /platform:anycpu /r:NtApiDotNet.dll /out:poc.exe .\PulseLogPrivesc.cs
Microsoft (R) Visual C# Compiler version 4.7.2556.0
for C# 5
Copyright (C) Microsoft Corporation. All rights reserved.
This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to C# 5, which is no longer the latest version. For compilers that support newer versions of the C# programming language, see http://go.microsoft.com/fwlink/?LinkID=533240
PulseLogPrivesc.cs(72,17): error CS0012: The type 'System.Object' is defined in an assembly that is
not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
NtApiDotNet.dll: (Location of symbol related to previous error)
PulseLogPrivesc.cs(72,17): error CS0012: The type 'System.IDisposable' is defined in an assembly that
is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
NtApiDotNet.dll: (Location of symbol related to previous error)
PulseLogPrivesc.cs(72,17): error CS0012: The type 'System.IConvertible' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
NtApiDotNet.dll: (Location of symbol related to previous error)
PulseLogPrivesc.cs(72,17): error CS0012: The type 'System.ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
NtApiDotNet.dll: (Location of symbol related to previous error)
NtApiDotNet.dll: error CS0455: Type parameter 'A' inherits conflicting constraints 'System.ValueType'
and 'System.IConvertible'
PulseLogPrivesc.cs(169,21): error CS0012: The type 'System.Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
NtApiDotNet.dll: (Location of symbol related to previous error)
PulseLogPrivesc.cs(174,13): error CS0012: The type 'System.Runtime.InteropServices.SafeBuffer' is
defined in an assembly that is not referenced. You must add a reference to assembly
'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
NtApiDotNet.dll: (Location of symbol related to previous error)
PulseLogPrivesc.cs(186,21): error CS1061: 'NtApiDotNet.NtMappedSection' does not contain a definition
for 'ReadArray' and no extension method 'ReadArray' accepting a first argument of type
'NtApiDotNet.NtMappedSection' could be found (are you missing a using directive or an assembly reference?)
PulseLogPrivesc.cs(191,21): error CS1061: 'NtApiDotNet.NtMappedSection' does not contain a definition
for 'WriteArray' and no extension method 'WriteArray' accepting a first argument of type
'NtApiDotNet.NtMappedSection' could be found (are you missing a using directive or an assembly reference?)
I tried to locate the external DLL on different folders: current directory, csc.exe directory.
Do you know what is the problem?
I also tried to compile the DLL from Visual Studio but I'm getting
the following error message

Dependencies for using Model Validation in ASP.NET Core App

I make use of the the model validation feature like this:
[StringLength(60, MinimumLength = 3)]
[Required]
But when I start the application I get this:
Author.cs(8,6): error CS0246: The type or namespace name 'StringLengthAttribute' could not be found (are you missing a using directive or an assembly reference?)
Author.cs(8,6): error CS0246: The type or namespace name 'StringLength' could not be found (are you missing a using directive or an assembly reference?)
Author.cs(9,6): error CS0246: The type or namespace name 'RequiredAttribute' could not be found (are you missing a using directive or an assembly reference?)
Author.cs(9,6): error CS0246: The type or namespace name 'Required' could not be found (are you missing a using directive or an assembly reference?)
Author.cs(8,23): error CS0246: The type or namespace name 'MinimumLength' could not be found (are you missing a using directive or an assembly reference?)
Author.cs(11,6): error CS0246: The type or namespace name 'StringLengthAttribute' could not be found (are you missing a using directive or an assembly reference?)
Author.cs(11,6): error CS0246: The type or namespace name 'StringLength' could not be found (are you missing a using directive or an assembly reference?)
Author.cs(12,6): error CS0246: The type or namespace name 'RequiredAttribute' could not be found (are you missing a using directive or an assembly reference?)
Author.cs(12,6): error CS0246: The type or namespace name 'Required' could not be found (are you missing a using directive or an assembly reference?)
Author.cs(11,23): error CS0246: The type or namespace name 'MinimumLength' could not be found (are you missing a using directive or an assembly reference?)
I cannot find out what package I'm missing. My guess was Microsoft.AspNetCore.Mvc.DataAnnotations but that seems not to be it.
So what dependency do I need here?
The dependency seems correct.
But just importing the library/nuget package doesn't mean you can just use it. You also need to put using System.ComponentModel.DataAnnotations (or using System.ComponentModel.Annotations at the top of your *.cs file.
Or just hit Ctrl+. on the error to let VS suggest you the correct namespace.
You have to first install entity framework from the nuget package then only you will be able to get the using System.ComponentModel.Annotations.

Error while compiling MonoDevelop 4.2.2 from tarball in Ubuntu

I downloaded MonoDevelop 4.2.2 from the official website and install all the dependencies, but when I use "sudo make" command marks me these errors
error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
ParamSpec.cs(221,62): error CS0246: The type or namespace name `GLib' could not be found. Are you missing an assembly reference?
Placeholder.cs(26,48): error CS0246: The type or namespace name `Requisition' could not be found. Are you missing error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
WidgetUtils.cs(37,17): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
WidgetUtils.cs(218,28): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
WidgetUtils.cs(218,47): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
WidgetUtils.cs(230,64): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
WidgetUtils.cs(248,44): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
WidgetUtils.cs(279,17): error CS0246: The type or namespace name `Gdk' could not be found. Are you missing an assembly reference?
WidgetUtils.cs(363,17): error CS0246: The type or namespace name `Gdk' could not be found. Are you missing an assembly reference?
wrapper/Action.cs(34,16): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Action.cs(42,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Action.cs(283,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Action.cs(295,10): error CS0246: The type or namespace name `Gdk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(73,32): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(79,36): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(85,24): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(112,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(730,28): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(735,39): error CS0246: The type or namespace name `GLib' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(740,41): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(776,13): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(815,44): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(864,41): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(872,61): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(882,32): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(898,49): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(913,34): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(918,38): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(933,40): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(956,27): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(956,48): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(965,41): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(965,62): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(972,40): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(972,61): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1009,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1011,31): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1022,33): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1028,16): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1084,26): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1096,26): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1105,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1119,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1121,26): error CS0246: The type or namespace name `Gdk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1134,21): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1144,29): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1190,36): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1204,36): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1219,13): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1259,28): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1282,44): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1282,58): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1315,39): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1346,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1354,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1402,33): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1418,59): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Container.cs(1431,4): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ActionToolbarWrapper.cs(18,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ActionToolbarWrapper.cs(19,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ActionToolbarWrapper.cs(50,17): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ActionToolbarWrapper.cs(88,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ActionTree.cs(50,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ActionTree.cs(67,26): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ActionTree.cs(233,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Bin.cs(9,17): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Box.cs(31,13): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Box.cs(138,31): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Box.cs(163,30): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Box.cs(202,41): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Box.cs(202,62): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Box.cs(211,39): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Box.cs(231,30): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Button.cs(117,11): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ButtonBox.cs(26,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ButtonBox.cs(33,13): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ButtonBox.cs(44,35): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ButtonBox.cs(65,34): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/CheckButton.cs(30,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/CheckButton.cs(66,41): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/CheckButton.cs(66,62): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ComboBox.cs(10,17): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ComboBox.cs(112,40): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ComboBoxEntry.cs(8,21): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Custom.cs(29,3): error CS0246: The type or namespace name `Gdk' could not be found. Are you missing an assembly reference?
wrapper/Custom.cs(31,27): error CS0115: `Stetic.Custom.OnRealized()' is marked as an override but no suitable method found to override
wrapper/Custom.cs(96,42): error CS0246: The type or namespace name `Gdk' could not be found. Are you missing an assembly reference?
wrapper/Window.cs(37,33): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Window.cs(56,10): error CS0246: The type or namespace name `Gdk' could not be found. Are you missing an assembly reference?
wrapper/Window.cs(66,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Window.cs(67,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Window.cs(77,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Window.cs(78,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Window.cs(156,3): error CS0246: The type or namespace name `Gdk' could not be found. Are you missing an assembly reference?
wrapper/Window.cs(157,10): error CS0246: The type or namespace name `Gdk' could not be found. Are you missing an assembly reference?
wrapper/Dialog.cs(59,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Dialog.cs(63,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Dialog.cs(90,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Dialog.cs(115,22): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Dialog.cs(122,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Expander.cs(10,17): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Expander.cs(45,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Expander.cs(51,41): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Expander.cs(51,62): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Fixed.cs(23,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Fixed.cs(35,35): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Fixed.cs(47,43): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Fixed.cs(60,22): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Fixed.cs(74,29): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/FontSelectionDialog.cs(7,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Frame.cs(31,40): error CS0246: The type or namespace name `GLib' could not be found. Are you missing an assembly reference?
wrapper/Frame.cs(37,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Frame.cs(77,41): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Frame.cs(77,62): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Scale.cs(19,45): error CS0246: The type or namespace name `GLib' could not be found. Are you missing an assembly reference?
wrapper/HScale.cs(8,17): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Range.cs(19,45): error CS0246: The type or namespace name `GLib' could not be found. Are you missing an assembly reference?
wrapper/HScrollbar.cs(8,17): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Image.cs(11,17): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Image.cs(56,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/MenuItem.cs(8,17): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/MenuItem.cs(26,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/MenuItem.cs(32,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/MenuItem.cs(80,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ImageMenuItem.cs(8,21): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/MenuBar.cs(26,17): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/MenuBar.cs(225,29): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/MenuBar.cs(253,24): error CS0115: `Stetic.Wrapper.ActionPaletteItem.Dispose()' is marked as an override but no suitable method found to override
wrapper/MessageDialog.cs(46,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/MessageDialog.cs(47,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/MessageDialog.cs(49,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/MessageDialog.cs(100,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/MessageDialog.cs(101,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Notebook.cs(127,11): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Notebook.cs(133,32): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Notebook.cs(143,41): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Notebook.cs(143,62): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Notebook.cs(264,33): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/OptionMenu.cs(63,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Paned.cs(40,13): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Paned.cs(56,41): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Paned.cs(56,62): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ToolButton.cs(19,17): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ToolButton.cs(84,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ToggleToolButton.cs(7,21): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/RadioToolButton.cs(10,21): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ScrolledWindow.cs(9,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ScrolledWindow.cs(10,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ScrolledWindow.cs(24,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ScrolledWindow.cs(30,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ScrolledWindow.cs(38,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ScrolledWindow.cs(55,34): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ScrolledWindow.cs(65,41): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/ScrolledWindow.cs(65,62): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/SpinButton.cs(7,17): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Table.cs(10,9): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Table.cs(11,9): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Table.cs(25,11): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Table.cs(324,34): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Table.cs(330,33): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Table.cs(336,37): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Table.cs(342,36): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Table.cs(348,28): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Table.cs(354,31): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Table.cs(384,4): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Toolbar.cs(35,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Toolbar.cs(53,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Toolbar.cs(92,43): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Toolbar.cs(98,21): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Toolbar.cs(110,22): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Toolbar.cs(127,41): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Toolbar.cs(127,62): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Toolbar.cs(141,22): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Toolbar.cs(151,29): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Toolbar.cs(162,30): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Toolbar.cs(170,11): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Viewport.cs(14,41): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Viewport.cs(14,62): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/VScale.cs(8,17): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/VScrollbar.cs(8,17): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Widget.cs(1002,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Widget.cs(1012,40): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/Widget.cs(1054,53): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/WidgetEventHandler.cs(10,3): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/WidgetEventHandler.cs(12,27): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
wrapper/WidgetEventHandler.cs(25,10): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
TopLevelWindow.cs(10,3): error CS0246: The type or namespace name `Gdk' could not be found. Are you missing an assembly reference?
TopLevelWindow.cs(24,10): error CS0246: The type or namespace name `Gdk' could not be found. Are you missing an assembly reference?
TopLevelDialog.cs(10,3): error CS0246: The type or namespace name `HButtonBox' could not be found. Are you missing an assembly reference?
TopLevelDialog.cs(11,3): error CS0246: The type or namespace name `VBox' could not be found. Are you missing an assembly reference?
TopLevelDialog.cs(12,3): error CS0246: The type or namespace name `HSeparator' could not be found. Are you missing an assembly reference?
TopLevelDialog.cs(25,10): error CS0246: The type or namespace name `HButtonBox' could not be found. Are you missing an assembly reference?
TopLevelDialog.cs(29,10): error CS0246: The type or namespace name `VBox' could not be found. Are you missing an assembly reference?
wrapper/NotifyWorkaround.cs(62,36): error CS0246: The type or namespace name `GLib' could not be found. Are you missing an assembly reference?
wrapper/NotifyWorkaround.cs(62,66): error CS0246: The type or namespace name `NotifyHandler' could not be found. Are you missing an assembly reference?
wrapper/NotifyWorkaround.cs(68,39): error CS0246: The type or namespace name `GLib' could not be found. Are you missing an assembly reference?
wrapper/NotifyWorkaround.cs(68,54): error CS0246: The type or namespace name `NotifyHandler' could not be found. Are you missing an assembly reference?
wrapper/NotifyWorkaround.cs(73,39): error CS0246: The type or namespace name `GLib' could not be found. Are you missing an assembly reference?
wrapper/NotifyWorkaround.cs(73,71): error CS0246: The type or namespace name `NotifyHandler' could not be found. Are you missing an assembly reference?
wrapper/NotifyWorkaround.cs(78,39): error CS0246: The type or namespace name `GLib' could not be found. Are you missing an assembly reference?
wrapper/NotifyWorkaround.cs(78,69): error CS0246: The type or namespace name `NotifyHandler' could not be found. Are you missing an assembly reference?
wrapper/NotifyWorkaround.cs(84,42): error CS0246: The type or namespace name `GLib' could not be found. Are you missing an assembly reference?
wrapper/NotifyWorkaround.cs(84,57): error CS0246: The type or namespace name `NotifyHandler' could not be found. Are you missing an assembly reference?
editor/GtkWorkarounds.cs(38,43): error CS0246: The type or namespace name `Gdk' could not be found. Are you missing an assembly reference?
editor/GtkWorkarounds.cs(43,43): error CS0246: The type or namespace name `Gdk' could not be found. Are you missing an assembly reference?
editor/GtkWorkarounds.cs(73,40): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?
editor/GtkWorkarounds.cs(225,10): error CS0246: The type or namespace name `Gdk' could not be found. Are you missing an assembly reference?
/usr/local/lib/mono/4.5/Microsoft.Common.targets: warning : Reference 'Microsoft.VisualBasic' not resolved
/home/raven/Downloads/monodevelop/Main.sln: error : Could not find the project file '/home/raven/Downloads/monodevelop/tests/TestRunner/TestRunner.csproj'
/home/raven/Downloads/monodevelop/Main.sln: error : Could not find the project file '/home/raven/Downloads/monodevelop/src/core/MonoDevelop.TextEditor.Tests/MonoDevelop.TextEditor.Tests.csproj'
/home/raven/Downloads/monodevelop/Main.sln: error : Could not find the project file '/home/raven/Downloads/monodevelop/tests/Ide.Tests/Ide.Tests.csproj'
make[1]: *** [sln_build] Error 1
make[1]: Leaving directory `/home/raven/Downloads/monodevelop'
make: *** [all-recursive] Error 1
Someone could tell me what I'm doing wrong??
I'm using Ubuntu 13.10 and my mono version is 3.4.1
This SO answer helped me eliminate the errors you received.
Specifically doing this:
cd /usr/lib/mono/gac/
sudo gacutil -i glib-sharp/2.12.0.0__35e10195dab3c99f/glib-sharp.dll &&
sudo gacutil -i atk-sharp/2.12.0.0__35e10195dab3c99f/atk-sharp.dll &&
sudo gacutil -i gdk-sharp/2.12.0.0__35e10195dab3c99f/gdk-sharp.dll &&
sudo gacutil -i gtk-sharp/2.12.0.0__35e10195dab3c99f/gtk-sharp.dll &&
sudo gacutil -i glade-sharp/2.12.0.0__35e10195dab3c99f/glade-sharp.dll &&
sudo gacutil -i pango-sharp/2.12.0.0__35e10195dab3c99f/pango-sharp.dll &&
sudo gacutil -i gnome-sharp/2.24.0.0__35e10195dab3c99f/gnome-sharp.dll &&
sudo gacutil -i gconf-sharp/2.24.0.0__35e10195dab3c99f/gconf-sharp.dll &&
sudo gacutil -i gnome-vfs-sharp/2.24.0.0__35e10195dab3c99f/gnome-vfs-sharp.dll

MSBuild failing on Automated Test project

I just added an automated test project to my C# solution and checked it into my build server.
When the build script runs using MSBuild (.NET Framework 3.5), it gives me several errors (such as the following):
**cs(2,17): error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
**.cs(21,17): error CS0246: The type or namespace name 'TestContext' could not be found (are you missing a using directive or an assembly reference?)
**.cs(73,10): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?)
**.cs(73,10): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?)
**.cs(14,6): error CS0246: The type or namespace name 'TestClass' could not be found (are you missing a using directive or an assembly reference?)
**.cs(14,6): error CS0246: The type or namespace name 'TestClassAttribute' could not be found (are you missing a using directive or an assembly reference?)
When I run the .NET 3.5 msbuild on my computer, it builds correctly.
The build server does not have .NET 4.0 on it, and stepping it up is not an option. Can anyone suggest what could be causing the difference and what I can do to get the test project building successfully ?
Thanks
As stated above, the easiest thing to do is to install the appropriate version of Visual Studio on your build server to get all of the MSTest dependencies. This is what is typically done.
If for whatever reason you can't do that, the following page shows how to get your dependencies available without the VS2008 install:
http://www.shunra.com/shunrablog/index.php/2009/04/23/running-mstest-without-visual-studio/

msbuild - UnitTestFramework reference could not be resolved

I'm trying to run msbuild in Jenkins.
When it reaches the UniTest-Project an error occures:
Project "C:\Program Files (x86)\Jenkins\jobs\***\workspace\***.sln" (1) is building "C:\Program Files (x86)\Jenkins\jobs\***\workspace\***.unitTests\***.unitTests.csproj" (4) on node 0 (default targets).
Project file contains ToolsVersion="4.0", which is not supported by this version of MSBuild. Treating the project as if it had ToolsVersion="3.5".
ResolveAssemblyReferences:
Primary reference "Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL".
Could not find dependent files. Could not load file or assembly 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.QualityTools.UnitTestFramework, 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.
For SearchPath "{Registry:Software\Microsoft\.NetFramework,v4.0,AssemblyFoldersEx}".
Considered "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VSTSDB\Microsoft.VisualStudio.QualityTools.UnitTestFramework.exe", but it didn't exist.
Considered "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VSTSDB\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll", but it didn't exist.
Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\2.0\Runtime\v4.0\Microsoft.VisualStudio.QualityTools.UnitTestFramework.exe", but it didn't exist.
Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\2.0\Runtime\v4.0\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll", but it didn't exist.
Considered "C:\Program Files (x86)\MySQL\MySQL Connector Net 6.3.6\Assemblies\v2.0\Microsoft.VisualStudio.QualityTools.UnitTestFramework.exe", but it didn't exist.
Considered "C:\Program Files (x86)\MySQL\MySQL Connector Net 6.3.6\Assemblies\v2.0\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll", but it didn't exist.
Considered "C:\Program Files (x86)\MySQL\MySQL Connector Net 6.3.6\Assemblies\v4.0\Microsoft.VisualStudio.QualityTools.UnitTestFramework.exe", but it didn't exist.
Considered "C:\Program Files (x86)\MySQL\MySQL Connector Net 6.3.6\Assemblies\v4.0\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll", but it didn't exist.
Considered "C:\Program Files (x86)\Microsoft.NET\Primary Interop Assemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.exe", but it didn't exist.
Considered "C:\Program Files (x86)\Microsoft.NET\Primary Interop Assemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll", but it didn't exist.
Considered "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.exe", but it didn't exist.
CalculatorServiceTest.cs(1,17): error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
CalculatorServiceTest.cs(11,10): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?)
CalculatorServiceTest.cs(11,10): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?)
CalculatorServiceTest.cs(24,10): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?)
CalculatorServiceTest.cs(24,10): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?)
CalculatorServiceTest.cs(37,10): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?)
CalculatorServiceTest.cs(37,10): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?)
CalculatorServiceTest.cs(6,6): error CS0246: The type or namespace name 'TestClass' could not be found (are you missing a using directive or an assembly reference?)
CalculatorServiceTest.cs(6,6): error CS0246: The type or namespace name 'TestClassAttribute' could not be found (are you missing a using directive or an assembly reference?)
Done Building Project "C:\Program Files (x86)\Jenkins\jobs\***\workspace\***.unitTests\***.unitTests.csproj" (default targets) -- FAILED.
Done Building Project "C:\Program Files (x86)\Jenkins\jobs\***\workspace\***.sln" (default targets) -- FAILED.
Build FAILED.
Any suggestions what the problem could be? Running ms build from the command works for the solution and without any additional parameters when the project was compiles in VS bevor. After a clean solution the same errors occur. Must be some parameter or reference problem; Line two talks bout v4 and v3.5 problems; but i can't figure out how to solve this.
Greets
Error info directly shows that you use incorrect version of MSBuild
This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Try to rebuild with MSBuild 4.0
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe *.sln /t:rebuild
OR/AND from VS2010 Command Line.
I had a similar problem which seemed to be caused by running Jenkins as a service under the SYSTEM account. Somehow cmd.exe was not referencing all the necessary environment variables to be able to find my NUnit assemblies.
If you're running Jenkins as a service, try setting it to run as your user account and see if that helps.
Im building from the default windows cmd using:
C:...\MSBuild.exe *.sln
The solution-projects are all 3.5; only the Unit-Test Project is 4.0 (as you can't change this)
I just mentioned, that building it that way works, when i build it first with VS and don't deleted (clean solution) the binaries. Never mind.
How do i have to use msbuild from cmd to build a *.sln including unittests?